Skip to content

Commit

Permalink
calculate number of individuals in system in a simpler way
Browse files Browse the repository at this point in the history
  • Loading branch information
geraintpalmer committed Apr 12, 2024
1 parent 7150683 commit 1147be6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ciw/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def number_of_individuals(self):
"""
The number of individuals currently in the system.
"""
return sum(n.number_of_individuals for n in self.transitive_nodes)
return (self.nodes[0].number_of_individuals - 1) - self.nodes[-1].number_of_individuals

def find_arrival_dists(self):
"""
Expand Down

0 comments on commit 1147be6

Please sign in to comment.