It is currently possible to add events with execution time that has passed.
Ex.
Current time = 5.0
Add new event at time 4.5
This should throw an error.
The way I think this could be done is by keeping "last_event_exec_time" in the event queue, and having the sim_engine.run() update this attribute for each event that it executes. Then every time that a new event is added we can check that it is greater than or equal to the last event time (to allow for more events to occur at the same time or after the current time).
It is currently possible to add events with execution time that has passed.
Ex.
Current time = 5.0
Add new event at time 4.5
This should throw an error.
The way I think this could be done is by keeping "last_event_exec_time" in the event queue, and having the sim_engine.run() update this attribute for each event that it executes. Then every time that a new event is added we can check that it is greater than or equal to the last event time (to allow for more events to occur at the same time or after the current time).