Package org.simplesim.simulator
Class SequentialDESimulator
java.lang.Object
org.simplesim.simulator.BasicSimulator
org.simplesim.simulator.SequentialDESimulator
- All Implemented Interfaces:
Simulator
- Direct Known Subclasses:
ConcurrentDESimulator
Sequential simulator for discrete event models using a single threads
This simulator identifies all due agents of a model using a global event
queue. Then the doEventSim method of these imminent agents is called
sequentially.
Uses a SortedBucketQueue as default implementation of the global
event queue
This implementation is especially useful to run DES models.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.simplesim.simulator.Simulator
Simulator.InvalidSimulatorStateException -
Constructor Summary
ConstructorsConstructorDescriptionQuick start constructor of a sequential discrete-event simulator with a given modelSequentialDESimulator(BasicDomain root, EventQueue<Agent> queue) SequentialDESimulator(BasicDomain root, EventQueue<Agent> queue, MessageForwardingStrategy forwarding) Constructs a new sequential simulator with given model, queue implementation and messaging strategy -
Method Summary
Methods inherited from class org.simplesim.simulator.BasicSimulator
getCurrentEventList, getRootDomain, getSimulationTime, registerEventsProcessedListener, unregisterEventsProcessedListener
-
Constructor Details
-
SequentialDESimulator
public SequentialDESimulator(BasicDomain root, EventQueue<Agent> queue, MessageForwardingStrategy forwarding) Constructs a new sequential simulator with given model, queue implementation and messaging strategy- Parameters:
root- the root domain of the modelqueue- the queue implementation to use as global event queueforwarding- the strategy to use for message forwarding
-
SequentialDESimulator
Quick start constructor of a sequential discrete-event simulator with a given modelUses
RecursiveMessageForwardingand aHeapEventQueueas default options.- Parameters:
root- the root domain of the model
-
SequentialDESimulator
-
-
Method Details
-
runSimulation
Description copied from class:BasicSimulatorStarts a simulation run- Specified by:
runSimulationin interfaceSimulator- Specified by:
runSimulationin classBasicSimulator- Parameters:
stop- simulation time when the simulation should stop
-