Package org.simplesim.simulator
Interface Simulator
- All Known Implementing Classes:
BasicSimulator,ConcurrentDESimulator,ConcurrentTSSimulator,DynamicDecorator,SequentialDESimulator,SequentialTSSimulator
public interface Simulator
The simulator runs the simulation model. Its functionality comprises:
- Maintaining the global event queue (geq)
- Scheduling of the agents' time of next events (tonie)
- Task management, starting the agents'
doEventmethods
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classException to be thrown if an invalid state occurs during simulation -
Method Summary
Modifier and TypeMethodDescriptionvoidregisterEventsProcessedListener(Listener<Simulator> listener) Registers anEventsProcessedListenerto be called after each simulation cycle.voidrunSimulation(Time stop) Starts a simulation runvoidunregisterEventsProcessedListener(Listener<Simulator> listener) Unregisters anEventsProcessedListener.
-
Method Details
-
runSimulation
Starts a simulation run- Parameters:
stop- simulation time when the simulation should stop- Throws:
Simulator.InvalidSimulatorStateException- if there is an error during simulation
-
getRootDomain
Domain getRootDomain() -
getSimulationTime
Time getSimulationTime() -
getCurrentEventList
-
registerEventsProcessedListener
Registers anEventsProcessedListenerto be called after each simulation cycle.- Parameters:
listener- theListenerimplementation to be added
-
unregisterEventsProcessedListener
Unregisters anEventsProcessedListener.- Parameters:
listener- theListenerimplementation to be removed
-