Discrete event simulation

Event-driven simulation is a kind of discrete simulation. In the event-driven simulation of the simulation progress is effected by events.

An event- oriented simulation model can be uniquely described by a state model, an event calendar (or a list of events ), event handlers and time. The event calendar contains a list of future events with the name and type of event and the time of its occurrence. This can trigger new events in the future certain events again. Thus, complex behavior can be simulated. In the program implementation of the event list is sorted by date of occurrence and always processed the next incoming event.

The event handlers contain instructions for performing each of an event type and define the logic according to which the simulation has to run. Only if there is a formal model of the state model, the corresponding simulation model can be processed by a computer program.

Example: Simulation of a traffic intersection

State model

At time 0, the lights 1, 2, 3 and 4 are on red traffic lights before 2 are 300 cars because has just taken place in the direction of a game in the Bundesliga and the spectators, of all people all want to go home over this intersection.

Event Calendar

Occur the following events:

  • After 44 seconds before traffic light comes 1 to a car.
  • After 60 seconds, the traffic light changes from red to green and 4 is 30 seconds green.
  • After 90 seconds, the traffic light changes from red to green one.

Event routines

  • Car arrives at traffic lights 1: The car will be placed in the queue before the traffic lights.
  • Traffic light changes from red to green, Give freely the traffic lights so that cars can pass. Create a follow-up event: " traffic light changes from green to red ." This event occurs 30 seconds later and prevents cars arrive this traffic through the intersection.
  • Traffic light changes from green to red: Set the traffic light is red, so no cars can pass this traffic light. Generate a follow - event traffic light changes from red to green, which again releases the traffic light after 90 seconds, so that cars can cross the intersection.
  • Intersection crossing: Evidence crossing six seconds so that no other car can through the intersection, even if the corresponding light is green.
  • The state model in 89 seconds shows the traffic lights 1-3 on red, the traffic light 4 on green, with a car in front of traffic lights and one 300 face lights 2.
  • 95 At the time the car is in front of the green traffic light 1 straight on the junction, while the others are still waiting in front of traffic lights 2.
311400
de