Scheduler

class Scheduler

Scheduler for agent based modelling

handle_delayed_event(event, dt)
This method checks to see whether the event is a DelayedEvent. If not, it simply returns the event. If yes, it counts down the delay by one timestep (dt), caches the event in delayed_events and returns None.
param event

the event to check

param dt

the timestep to count down.

return

the event if this is not a DelayedEvent or the delay<=0 , otherwise None

run(model, progress_widget=None, collect_data=True)
Override this in a subclass
param model

Model instance

param progress_widget

If true, show a progress widget during execution

return

run_step(model, sim_round, dt, progress_widget=None, collect_data=True)
Override this in a subclass
param model

Model instance

param sim_round

round of simulator

param dt

Current step of round

param progress_widget

Live instance of FloatProgressBar