We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07abfdf commit 3363765Copy full SHA for 3363765
examples/wolf_sheep/wolf_sheep/scheduler.py
@@ -22,6 +22,8 @@ def get_type_count(
22
Returns the current number of agents of certain type in the queue
23
that satisfy the filter function.
24
"""
25
+ if type_class not in self.agents_by_type:
26
+ return 0
27
count = 0
28
for agent in self.agents_by_type[type_class]:
29
if filter_func is None or filter_func(agent):
0 commit comments