23 #ifndef MSEventControl_h 24 #define MSEventControl_h 60 typedef std::pair< Command*, SUMOTime >
Event;
147 return e1.second > e2.second;
Sort-criterion for events.
MSEventControl()
Default constructor.
virtual void execute(SUMOTime time)
Executes time-dependant commands.
Base (microsim) event class.
bool operator()(const Event &e1, const Event &e2) const
compares two events
SUMOTime currentTimeStep
The Current TimeStep.
void setCurrentTimeStep(SUMOTime time)
Set the current Time.
std::pair< Command *, SUMOTime > Event
Combination of an event and the time it shall be executed at.
AdaptType
Defines what to do if the insertion time lies before the current simulation time. ...
EventCont myEvents
Event-container, holds executable events.
SUMOTime getCurrentTimeStep()
get the Current TimeStep used in addEvent.
MSEventControl & operator=(const MSEventControl &)
invalid assignment operator.
virtual SUMOTime addEvent(Command *operation, SUMOTime execTimeStep, AdaptType type)
Adds an Event.
virtual ~MSEventControl()
Destructor.
bool isEmpty()
Returns whether events are in the que.
std::priority_queue< Event, std::vector< Event >, EventSortCrit > EventCont
Container for time-dependant events, e.g. traffic-light-change.
Patch the time in a way that it is at least as high as the simulation begin time. ...
Stores time-dependant events and executes them at the proper time.