All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----simulation.events.Event
Class TimeEvent is used to describe the time events of a model, i.e., those events scheduled to occur at specified points in time.
Class StateEvent is used to describe the state events of a model, i.e., those events scheduled to occur to occur when the state of the system fulfills a specified condition.
The actions method is used to describe the actions associated with a class of events. When an event occurs, its action are executed.
public Event()
public static final double time()
public static final void runSimulation(double period)
Time will start at 0 and jump from event time to event time until either this period is over, there are no more scheduled events, or the stopSimulation method is called.
All scheduled state events are held in list, and all scheduled time events are held in a list ordered by their associated event times.
At each event time, the wait list is examined to see whether any state event has its condition fulfilled. In that case, the event is removed from the list and its actions are executed.
When no more state events occur, time advances to the next imminent time event, and the associated actions of this time event are executed.
This continues until the simulation ends
public static final void stopSimulation()
public final void cancel()
The activity is removed from the the list of which it is a member (the event list or the wait list).
If it is not scheduled, the call has no effect.
All Packages Class Hierarchy This Package Previous Next Index