taxi simulator using coroutines
This commit is contained in:
@@ -91,8 +91,8 @@ class Simulator:
|
|||||||
except StopIteration:
|
except StopIteration:
|
||||||
del self.actors[current_event.actor_id] # <12>
|
del self.actors[current_event.actor_id] # <12>
|
||||||
else:
|
else:
|
||||||
self.events.put(next_event) # <14>
|
self.events.put(next_event) # <13>
|
||||||
else: # <15>
|
else: # <14>
|
||||||
msg = '*** end of simulation time: {} events pending ***'
|
msg = '*** end of simulation time: {} events pending ***'
|
||||||
print(msg.format(self.events.qsize()))
|
print(msg.format(self.events.qsize()))
|
||||||
# END TAXI_SIMULATOR
|
# END TAXI_SIMULATOR
|
||||||
|
|||||||
Reference in New Issue
Block a user