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'
doEvent
methods
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
Exception to be thrown if an invalid state occurs during simulation -
Method Summary
Modifier and TypeMethodDescriptionvoid
registerEventsProcessedListener
(Listener<Simulator> listener) Registers anEventsProcessedListener
to be called after each simulation cycle.void
runSimulation
(Time stop) Starts a simulation runvoid
unregisterEventsProcessedListener
(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 anEventsProcessedListener
to be called after each simulation cycle.- Parameters:
listener
- theListener
implementation to be added
-
unregisterEventsProcessedListener
Unregisters anEventsProcessedListener
.- Parameters:
listener
- theListener
implementation to be removed
-