Model is the standard model for normal simulation. After ProcessPendingEvents
is called by the simulation control class (Simulation), it retrieves events
from the calendar and processes them. This goes on until no more events are
available, or StopProcessingEvents has been called.
The class Model has the following characteristics:
- The function
processPendingEvents()
, which is generally called by sequence control
upon begin of each batch, processes events in a loop by calling the calendar method
processNextEvent()
.
- The function
stopProcessingEvents()
, which is generally called by sequence control
at the end of each batch, indirectly causes the termination of the loop in
processPendingEvents()
by setting the flag
done
, which is checked after each loop
run, to true.
For parallel simulation you must supply new versions of this class that
synchronize themselves.