Skip to content

Make it impossible to add events with passed execution time #3

Description

@Elock98

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions