public class StdSimulation extends Simulation
Modifier and Type | Field and Description |
---|---|
protected Model |
model |
protected SimulationEnvironment |
simEnv |
batchHandler, transientPhaseHandler
Constructor and Description |
---|
StdSimulation(Model model,
SimulationEnvironment simEnv) |
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
executes clean-up jobs like canceling all events in the calendar at the end of simulation
|
void |
handleEndOfCurrentBatch() |
void |
handleEndOfTransientPhase() |
void |
initSimulation()
initializes internal data structures
|
protected void |
printBatchResults(int batchNumber) |
void |
printResults()
prints the simulation results
|
void |
runSimulation()
executes the actual simulation with a subdivision in simulation phases
- a warm-up (transient) phase at the beginning of simulation - several batches during which statistical data is collected In each phase event generation and processing is started by calling the method processPendingEvents() of the model object given as parameter
on construction of StdSimulation - notifies the SimulationControlManager at the beginning
and end of each simulation phase as well as at the end of the simulation- prints the partial results after each batch ( printBatchResults() ) |
getBatchNotifier, getTransientPhaseNotifier, run, startSimulation
protected final Model model
protected final SimulationEnvironment simEnv
public StdSimulation(Model model, SimulationEnvironment simEnv)
protected void printBatchResults(int batchNumber)
public void cleanup()
cleanup
in class Simulation
public void handleEndOfCurrentBatch()
handleEndOfCurrentBatch
in class Simulation
public void handleEndOfTransientPhase()
handleEndOfTransientPhase
in class Simulation
public void initSimulation()
initSimulation
in class Simulation
public void printResults()
printResults
in class Simulation
public void runSimulation()
processPendingEvents()
of the model object given as parameter
on construction of StdSimulation
SimulationControlManager
at the beginning
and end of each simulation phase as well as at the end of the simulationprintBatchResults()
)runSimulation
in class Simulation