Skip to content

Commit

Permalink
Small fix to sim.initialize()
Browse files Browse the repository at this point in the history
  • Loading branch information
LarrySnyder committed Aug 10, 2022
1 parent c7921a9 commit 96a71d5
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/_build/html/searchindex.js

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions src/stockpyl/sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ def initialize(network, num_periods, rand_seed=None):
"""Initialize the simulation:
* Check validity of the network
* Initialize ``network.period`` to 0
* Initialize state and decision variables at each node
* Set the numpy PRNG seed
* Set network.period to None (will be set to 0 in first call to :func:`stockpyl.sim.step`)
Expand Down Expand Up @@ -163,9 +162,6 @@ def initialize(network, num_periods, rand_seed=None):

# INITIALIZATION

# Initialize time period.
network.period = 0

# Check that the network doesn't contain a directed cycle.
if network.has_directed_cycle():
raise ValueError("network may not contain a directed cycle")
Expand Down

0 comments on commit 96a71d5

Please sign in to comment.