Interface | Description |
---|---|
CalendarCallback | |
EventToken |
Interface describing the object an entity gets when posting an event.
|
Exception | Description |
---|---|
EventException |
The simulation library is based on the principle of event-driven simulation.
Stemming from a model in which state transitions take place at discrete
points in time (therefore discrete time simulation), the simulated time of
the original system is represented by the real-time of the simulation so that
the "idle time" between state transitions is bridged and no further
processing time is needed (see Figure).
Events during the simulation
The state transitions are described with the help of events. These events have two characteristics. One is a time stamp, which defines the simulated point in time at which the event occurred. The other is a pointer to a function which defines the actions of the event (e.g.the state transition). An example of an event might be the arrival of a request at the generator or the end of service for a request in a service unit.
In the current version of the IKR SimLib, there is no separate class which
models an event. Instead, events are created implicitly in the calendar upon
call of the
Calendar.postEvent(CalendarCallback, CalendarCallback, PointInTime)
method. When this method is called, the calendar schedules the execution of
the specified CalendarCallback
upon the specified
system time. In addition, the calendar returns an
EventToken
, which allows for event-specific
interaction with the calendar.