We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2a87126 commit f4e8b7bCopy full SHA for f4e8b7b
1 file changed
ciw/simulation.py
@@ -171,9 +171,9 @@ def find_next_active_node(self):
171
"""
172
Returns the next active node:
173
174
+ next_event_date = min([nd.next_event_date for nd in self.nodes])
175
next_active_node_indices = [i for i, x in enumerate([
- nd.next_event_date for nd in self.nodes]) if x == min([
176
- nd.next_event_date for nd in self.nodes])]
+ nd.next_event_date for nd in self.nodes]) if x == next_event_date]
177
if len(next_active_node_indices) > 1:
178
return self.nodes[random_choice(next_active_node_indices)]
179
return self.nodes[next_active_node_indices[0]]
0 commit comments