Class DevsRealTimeAnimator.TimeDoubleUnit
java.lang.Object
org.djutils.event.LocalEventProducer
nl.tudelft.simulation.dsol.simulators.Simulator<T>
nl.tudelft.simulation.dsol.simulators.DevsSimulator<T>
nl.tudelft.simulation.dsol.simulators.DevsAnimator<T>
nl.tudelft.simulation.dsol.simulators.DevsRealTimeAnimator<Duration>
nl.tudelft.simulation.dsol.simulators.DevsRealTimeAnimator.TimeDoubleUnit
- All Implemented Interfaces:
Serializable
,Runnable
,Remote
,AnimatorInterface
,DevsSimulatorInterface<Duration>
,SimulatorInterface<Duration>
,org.djutils.event.EventProducer
- Enclosing class:
- DevsRealTimeAnimator<T extends Number & Comparable<T>>
public static class DevsRealTimeAnimator.TimeDoubleUnit
extends DevsRealTimeAnimator<Duration>
implements DevsSimulatorInterface<Duration>
Easy access class RealTimeClock<Duration>.
- See Also:
-
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
-
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, runflag, runState, runUntilIncluding, runUntilTime, semaphore, simulatorTime, worker
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.EventProducer
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
-
Method Summary
Modifier and TypeMethodDescriptionsimulatorTimeForWallClockMillis
(double wallMilliseconds) Calculate the how much simulation duration corresponds to the number of wall clock milliseconds indicated in the parameter.Methods inherited from class nl.tudelft.simulation.dsol.simulators.DevsRealTimeAnimator
getSpeedFactor, getUpdateMsec, isAnimation, isCatchup, run, 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, scheduleEventNow, scheduleEventNow, scheduleEventNow, scheduleEventNow, scheduleEventRel, scheduleEventRel, scheduleEventRel, scheduleEventRel, setEventList, setPauseOnError, stepImpl
Methods inherited from class nl.tudelft.simulation.dsol.simulators.Simulator
addScheduledMethodOnInitialize, cleanUp, fireTimedEvent, getErrorLogLevel, getErrorStrategy, getLogger, getModel, getReplication, getReplicationState, getRunState, getSimulatorTime, handleSimulationException, runUpTo, runUpToAndIncluding, setErrorLogLevel, setErrorStrategy, setErrorStrategy, start, startImpl, step, stop, stopImpl, warmup
Methods inherited from class org.djutils.event.LocalEventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, getEventListenerMap, getEventTypesWithListeners, getListenerReferences, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface nl.tudelft.simulation.dsol.simulators.DevsSimulatorInterface
cancelEvent, getEventList, isPauseOnError, scheduleEvent, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventNow, scheduleEventNow, scheduleEventNow, scheduleEventNow, scheduleEventNow, scheduleEventNow, scheduleEventRel, scheduleEventRel, scheduleEventRel, scheduleEventRel, scheduleEventRel, scheduleEventRel, setEventList, setPauseOnError
Methods inherited from interface org.djutils.event.EventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, getEventListenerMap, getEventTypesWithListeners, getListenerReferences, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListener
Methods inherited from interface nl.tudelft.simulation.dsol.simulators.SimulatorInterface
addScheduledMethodOnInitialize, addScheduledMethodOnInitialize, cleanUp, endReplication, getErrorLogLevel, getErrorStrategy, getLogger, getModel, getReplication, getReplicationState, getRunState, getSimulatorTime, initialize, isInitialized, isStartingOrRunning, isStoppingOrStopped, runUpTo, runUpToAndIncluding, setErrorLogLevel, setErrorStrategy, setErrorStrategy, start, step, stop
-
Constructor Details
-
TimeDoubleUnit
Construct a DevsRealTimeClock<Duration>.- Parameters:
id
- the id of the simulator, used in logging and firing of events.
-
-
Method Details
-
simulatorTimeForWallClockMillis
Calculate the how much simulation duration corresponds to the number of wall clock milliseconds indicated in the parameter. When the DevsRealTimeClock works with djunits Time or Duration, and the simulation is scaled to milliseconds, the simulatorTimeForWallClockMillis of a millisecond is a Duration of 1 millisecond. When 1 simulated time unit stands for a second, the simulatorTimeForWallClockMillis is 0.001.- Specified by:
simulatorTimeForWallClockMillis
in classDevsRealTimeAnimator<Duration>
- Parameters:
wallMilliseconds
- double; the number of milliseconds to calculate the corresponding simulation time for- Returns:
- the relative time step.
-