pathsim.events.schedule module
- class pathsim.events.schedule.Schedule(t_start=0, t_end=None, t_period=1, func_act=None, tolerance=0.0001)[source]
Bases:
EventSubclass of base ‘Event’ that triggers dependent on the evaluation time.
Monitors time in every timestep and triggers periodically (period). This event does not have an event function as the event condition only depends on time.
time == next_schedule_time -> event
- Parameters:
- detect(t)[source]
Check if the event condition is satisfied, i.e. if the time period switch is within the current timestep.
- Parameters:
t (float) – evaluation time for detection
- Returns:
detected (bool) – was an event detected?
close (bool) – are we close to the event?
ratio (float) – interpolated event location ratio in timestep