Package org.opentrafficsim.core.dsol
Class OTSLoggingAnimator
- java.lang.Object
-
- org.djutils.event.EventProducer
-
- nl.tudelft.simulation.dsol.simulators.Simulator<A,R,T>
-
- nl.tudelft.simulation.dsol.simulators.DEVSSimulator<A,R,T>
-
- nl.tudelft.simulation.dsol.simulators.DEVSAnimator<A,R,T>
-
- nl.tudelft.simulation.dsol.simulators.DEVSRealTimeAnimator<Time,Duration,SimTimeDoubleUnit>
-
- nl.tudelft.simulation.dsol.simulators.DEVSRealTimeAnimator.TimeDoubleUnit
-
- org.opentrafficsim.core.dsol.OTSAnimator
-
- org.opentrafficsim.core.dsol.OTSLoggingAnimator
-
- All Implemented Interfaces:
Serializable,Runnable,Remote,AnimatorInterface,DEVSSimulatorInterface<Time,Duration,SimTimeDoubleUnit>,DEVSSimulatorInterface.TimeDoubleUnit,SimulatorInterface<Time,Duration,SimTimeDoubleUnit>,SimulatorInterface.TimeDoubleUnit,EventProducerInterface,OTSAnimatorInterface,OTSSimulatorInterface
public class OTSLoggingAnimator extends OTSAnimator
Construct a DSOL DEVSRealTimeAnimator the easy way.Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
$LastChangedDate: 2018-10-30 14:03:57 +0100 (Tue, 30 Oct 2018) $, @version $Revision: 4727 $, by $Author: pknoppers $, initial version 11 mei 2015
BSD-style license. See OpenTrafficSim License.- Author:
- Alexander Verbraeck, Peter Knoppers
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class nl.tudelft.simulation.dsol.simulators.DEVSRealTimeAnimator
DEVSRealTimeAnimator.TimeDouble, DEVSRealTimeAnimator.TimeDoubleUnit, DEVSRealTimeAnimator.TimeFloat, DEVSRealTimeAnimator.TimeFloatUnit, DEVSRealTimeAnimator.TimeLong
-
Nested classes/interfaces inherited from class nl.tudelft.simulation.dsol.simulators.Simulator
Simulator.SimulatorWorkerThread
-
Nested classes/interfaces inherited from interface nl.tudelft.simulation.dsol.simulators.AnimatorInterface
AnimatorInterface.AnimationThread
-
Nested classes/interfaces inherited from interface nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface
DEVSSimulatorInterface.TimeDouble, DEVSSimulatorInterface.TimeDoubleUnit, DEVSSimulatorInterface.TimeFloat, DEVSSimulatorInterface.TimeFloatUnit, DEVSSimulatorInterface.TimeLong
-
Nested classes/interfaces inherited from interface nl.tudelft.simulation.dsol.simulators.SimulatorInterface
SimulatorInterface.TimeDouble, SimulatorInterface.TimeDoubleUnit, SimulatorInterface.TimeFloat, SimulatorInterface.TimeFloatUnit, SimulatorInterface.TimeLong
-
-
Field Summary
-
Fields inherited from class nl.tudelft.simulation.dsol.simulators.DEVSRealTimeAnimator
BACKLOG_EVENT, CHANGE_SPEED_FACTOR_EVENT
-
Fields inherited from class nl.tudelft.simulation.dsol.simulators.DEVSSimulator
eventList
-
Fields inherited from class nl.tudelft.simulation.dsol.simulators.Simulator
model, replication, replicationState, runState, runUntilIncluding, runUntilTime, semaphore, simulatorTime, worker
-
Fields inherited from class org.djutils.event.EventProducer
eventProducerImpl
-
Fields inherited from interface nl.tudelft.simulation.dsol.simulators.AnimatorInterface
ANIMATION_DELAY_CHANGED_EVENT, DEFAULT_ANIMATION_DELAY, UPDATE_ANIMATION_EVENT
-
Fields inherited from interface nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface
EVENTLIST_CHANGED_EVENT
-
Fields inherited from interface org.djutils.event.EventProducerInterface
FIRST_POSITION, LAST_POSITION
-
Fields inherited from interface nl.tudelft.simulation.dsol.simulators.SimulatorInterface
START_EVENT, STARTING_EVENT, STOP_EVENT, STOPPING_EVENT, TIME_CHANGED_EVENT
-
-
Constructor Summary
Constructors Constructor Description OTSLoggingAnimator(String path, Serializable simulatorId)Construct an OTSAnimator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialize(OTSModelInterface model, OTSReplication replication)Initialize a simulation engine without animation; the easy way.voidrun()StringtoString()-
Methods inherited from class org.opentrafficsim.core.dsol.OTSAnimator
getReplication, scheduleEvent
-
Methods inherited from class nl.tudelft.simulation.dsol.simulators.DEVSRealTimeAnimator.TimeDoubleUnit
simulatorTimeForWallClockMillis
-
Methods inherited from class nl.tudelft.simulation.dsol.simulators.DEVSRealTimeAnimator
getSpeedFactor, getUpdateMsec, isAnimation, isCatchup, setAnimation, setCatchup, setSpeedFactor, setSpeedFactor, setUpdateMsec
-
Methods inherited from class nl.tudelft.simulation.dsol.simulators.DEVSAnimator
getAnimationDelay, setAnimationDelay, updateAnimation
-
Methods inherited from class nl.tudelft.simulation.dsol.simulators.DEVSSimulator
cancelEvent, endReplication, getEventList, initialize, isPauseOnError, scheduleEvent, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventNow, scheduleEventNow, scheduleEventNow, scheduleEventNow, scheduleEventRel, scheduleEventRel, scheduleEventRel, scheduleEventRel, setEventList, setPauseOnError, stepImpl
-
Methods inherited from class nl.tudelft.simulation.dsol.simulators.Simulator
cleanUp, fireTimedEvent, getLogger, getModel, getReplicationState, getRunState, getSimTime, getSimulatorTime, getSourceId, runUpTo, runUpToAndIncluding, start, startImpl, step, stop, stopImpl, warmup
-
Methods inherited from class org.djutils.event.EventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, getEventTypesWithListeners, getListenerReferences, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface nl.tudelft.simulation.dsol.simulators.AnimatorInterface
getAnimationDelay, setAnimationDelay, updateAnimation
-
Methods inherited from interface nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface
cancelEvent, getEventList, isPauseOnError, scheduleEvent, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventNow, scheduleEventNow, scheduleEventNow, scheduleEventNow, scheduleEventRel, scheduleEventRel, scheduleEventRel, scheduleEventRel, setEventList, setPauseOnError
-
Methods inherited from interface org.djutils.event.EventProducerInterface
addListener, addListener, addListener, addListener, getEventTypesWithListeners, hasListeners, numberOfListeners, removeListener
-
Methods inherited from interface nl.tudelft.simulation.dsol.simulators.SimulatorInterface
cleanUp, getLogger, getModel, getReplicationState, getRunState, getSimTime, getSimulatorTime, getSourceId, initialize, isInitialized, isStartingOrRunning, isStoppingOrStopped, runUpTo, runUpToAndIncluding, start, step, stop
-
-
-
-
Constructor Detail
-
OTSLoggingAnimator
public OTSLoggingAnimator(String path, Serializable simulatorId)
Construct an OTSAnimator.- Parameters:
path- String; path for loggingsimulatorId- Serializable; the id of the simulator to use in remote communication
-
-
Method Detail
-
initialize
public void initialize(OTSModelInterface model, OTSReplication replication) throws SimRuntimeException
Initialize a simulation engine without animation; the easy way. PauseOnError is set to true;- Specified by:
initializein interfaceOTSSimulatorInterface- Overrides:
initializein classOTSAnimator- Parameters:
model- OTSModelInterface; the simulation to executereplication- OTSReplication; the replication with the run control parameters- Throws:
SimRuntimeException- when e.g., warmupPeriod is larger than runLength
-
toString
public String toString()
- Overrides:
toStringin classOTSAnimator
-
run
public void run()
- Specified by:
runin interfaceRunnable- Overrides:
runin classDEVSRealTimeAnimator<Time,Duration,SimTimeDoubleUnit>
-
-