We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a4ccdb2 commit f3116bfCopy full SHA for f3116bf
1 file changed
ciw/simulation.py
@@ -172,8 +172,8 @@ def find_next_active_node(self):
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([
176
- nd.next_event_date for nd in self.nodes]) if x == next_event_date]
+ next_active_node_indices = [i for i, nd in enumerate(
+ self.nodes) if nd.next_event_date == 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