Skip to content

Commit

Permalink
Merge pull request #219 from galenseilis/patch-1
Browse files Browse the repository at this point in the history
Update tracker parameter in simulation.py
  • Loading branch information
geraintpalmer authored Nov 14, 2023
2 parents a992299 + 0578591 commit 48e8a98
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ciw/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def __init__(
network,
exact=False,
name="Simulation",
tracker=trackers.StateTracker(),
tracker=None,
deadlock_detector=deadlock.NoDetection(),
node_class=None,
arrival_node_class=None,
Expand Down Expand Up @@ -51,7 +51,10 @@ def __init__(
self.nodes = [self.ArrivalNodeType(self)] + self.transitive_nodes + [ExitNode()]
self.active_nodes = self.nodes[:-1]
self.nodes[0].initialise()
self.statetracker = tracker
if tracker is None:
self.statetracker = trackers.StateTracker()
else:
self.statetracker = tracker
self.statetracker.initialise(self)
self.times_dictionary = {self.statetracker.hash_state(): 0.0}
self.times_to_deadlock = {}
Expand Down

0 comments on commit 48e8a98

Please sign in to comment.