Package org.simplesim.simulator
Class DynamicDecorator
java.lang.Object
org.simplesim.simulator.DynamicDecorator
- All Implemented Interfaces:
- Simulator
Decorator class to enable dynamic changes of the model during simulation run.
 
 This class wraps any other simulator implementation and registers itself as
 EventsProcessedListener to be called after each simulation cycle.
 Communication of the agents' change requests is done by a static and
 thread-safe queue within the AbstractAgent class. Changes are done by
 concrete implementations of the ChangeRequest interface. So, agents
 prepare and organize the change process whereas the the various change
 request implementations are responsible for the conduct of the specified
 model change. This class ensures the processing of the change requests.
 
 To use model change functionality, agents have to issue change request via
 AbstractAgent#addModelChangeRequest(ChangeRequest) class.
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.simplesim.simulator.SimulatorSimulator.InvalidSimulatorStateException
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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.
- 
Constructor Details- 
DynamicDecorator
 
- 
- 
Method Details- 
runSimulationDescription copied from interface:SimulatorStarts a simulation run- Specified by:
- runSimulationin interface- Simulator
- Parameters:
- stop- simulation time when the simulation should stop
 
- 
getRootDomain- Specified by:
- getRootDomainin interface- Simulator
 
- 
getSimulationTime- Specified by:
- getSimulationTimein interface- Simulator
 
- 
getCurrentEventList- Specified by:
- getCurrentEventListin interface- Simulator
 
- 
registerEventsProcessedListenerDescription copied from interface:SimulatorRegisters anEventsProcessedListenerto be called after each simulation cycle.- Specified by:
- registerEventsProcessedListenerin interface- Simulator
- Parameters:
- listener- the- Listenerimplementation to be added
 
- 
unregisterEventsProcessedListenerDescription copied from interface:SimulatorUnregisters anEventsProcessedListener.- Specified by:
- unregisterEventsProcessedListenerin interface- Simulator
- Parameters:
- listener- the- Listenerimplementation to be removed
 
 
-