public class OTSDEVSRealTimeClock extends nl.tudelft.simulation.dsol.simulators.DEVSRealTimeClock<org.djunits.value.vdouble.scalar.DoubleScalar.Abs<org.djunits.unit.TimeUnit>,org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.TimeUnit>,OTSSimTimeDouble> implements OTSDEVSSimulatorInterface, OTSAnimatorInterface
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
nl.tudelft.simulation.dsol.simulators.DEVSRealTimeClock.CalendarDouble, nl.tudelft.simulation.dsol.simulators.DEVSRealTimeClock.CalendarFloat, nl.tudelft.simulation.dsol.simulators.DEVSRealTimeClock.CalendarLong, nl.tudelft.simulation.dsol.simulators.DEVSRealTimeClock.TimeDouble, nl.tudelft.simulation.dsol.simulators.DEVSRealTimeClock.TimeDoubleUnit, nl.tudelft.simulation.dsol.simulators.DEVSRealTimeClock.TimeFloat, nl.tudelft.simulation.dsol.simulators.DEVSRealTimeClock.TimeFloatUnit, nl.tudelft.simulation.dsol.simulators.DEVSRealTimeClock.TimeLong, nl.tudelft.simulation.dsol.simulators.DEVSRealTimeClock.TimeLongUnitnl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.CalendarDouble, nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.CalendarFloat, nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.CalendarLong, nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.TimeDouble, nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.TimeDoubleUnit, nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.TimeFloat, nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.TimeFloatUnit, nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.TimeLong, nl.tudelft.simulation.dsol.simulators.DEVSSimulatorInterface.TimeLongUnitreplication, running, semaphore, simulatorTime, workerEVENTLIST_CHANGED_EVENTEND_OF_REPLICATION_EVENT, START_EVENT, START_REPLICATION_EVENT, STEP_EVENT, STOP_EVENT, TIME_CHANGED_EVENT, WARMUP_EVENT| Constructor and Description |
|---|
OTSDEVSRealTimeClock()
Create a new OTSRealTimeClock.
|
| Modifier and Type | Method and Description |
|---|---|
void |
initialize(nl.tudelft.simulation.dsol.experiment.Replication<org.djunits.value.vdouble.scalar.DoubleScalar.Abs<org.djunits.unit.TimeUnit>,org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.TimeUnit>,OTSSimTimeDouble> initReplication,
nl.tudelft.simulation.dsol.experiment.ReplicationMode replicationMode) |
protected org.djunits.value.vdouble.scalar.Duration |
relativeMillis(double factor) |
void |
runUpTo(org.djunits.value.vdouble.scalar.Time when)
Runs the simulator up to a certain time; events at that time will not yet be executed.
|
void |
scheduleEventAbs(org.djunits.value.vdouble.scalar.Time absoluteTime,
Object source,
Object target,
String method,
Object[] args)
schedules a methodCall at an absolute time.
|
void |
scheduleEventAbs(org.djunits.value.vdouble.scalar.Time absoluteTime,
short priority,
Object source,
Object target,
String method,
Object[] args)
schedules a methodCall at an absolute time.
|
void |
scheduleEventRel(org.djunits.value.vdouble.scalar.Duration relativeDelay,
Object source,
Object target,
String method,
Object[] args)
schedules a methodCall at a relative duration.
|
void |
scheduleEventRel(org.djunits.value.vdouble.scalar.Duration relativeDelay,
short priority,
Object source,
Object target,
String method,
Object[] args)
schedules a methodCall at a relative duration.
|
String |
toString() |
getSpeedFactor, getUpdateMsec, isCatchup, run, setCatchup, setSpeedFactor, setUpdateMsecgetAnimationDelay, setAnimationDelay, updateAnimationautoPauseSimulator, cancelEvent, getEventList, isPauseOnError, runUpTo, runUpToAndIncluding, scheduleEvent, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventNow, scheduleEventNow, scheduleEventNow, scheduleEventNow, scheduleEventRel, scheduleEventRel, scheduleEventRel, scheduleEventRel, setEventList, setPauseOnError, step, stopcleanUp, getReplication, getSimulatorTime, isRunning, startaddListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, removeAllListeners, removeAllListeners, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcancelEvent, getEventList, scheduleEvent, scheduleEventAbs, scheduleEventAbs, scheduleEventNow, scheduleEventNow, setEventListisPauseOnError, runUpTo, runUpToAndIncluding, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventNow, scheduleEventNow, scheduleEventRel, scheduleEventRel, scheduleEventRel, scheduleEventRel, setPauseOnErrorgetSimulatorTime, isRunning, start, step, stopgetReplicationpublic OTSDEVSRealTimeClock()
public final void initialize(nl.tudelft.simulation.dsol.experiment.Replication<org.djunits.value.vdouble.scalar.DoubleScalar.Abs<org.djunits.unit.TimeUnit>,org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.TimeUnit>,OTSSimTimeDouble> initReplication, nl.tudelft.simulation.dsol.experiment.ReplicationMode replicationMode) throws nl.tudelft.simulation.dsol.SimRuntimeException
initialize in interface nl.tudelft.simulation.dsol.simulators.SimulatorInterface<org.djunits.value.vdouble.scalar.DoubleScalar.Abs<org.djunits.unit.TimeUnit>,org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.TimeUnit>,OTSSimTimeDouble>initialize in interface OTSSimulatorInterfaceinitialize in class nl.tudelft.simulation.dsol.simulators.DEVSSimulator<org.djunits.value.vdouble.scalar.DoubleScalar.Abs<org.djunits.unit.TimeUnit>,org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.TimeUnit>,OTSSimTimeDouble>nl.tudelft.simulation.dsol.SimRuntimeExceptionpublic final void scheduleEventRel(org.djunits.value.vdouble.scalar.Duration relativeDelay,
short priority,
Object source,
Object target,
String method,
Object[] args)
throws nl.tudelft.simulation.dsol.SimRuntimeException
scheduleEventRel in interface OTSDEVSSimulatorInterfacerelativeDelay - the relativeDelay in timeUnits of the simulator.priority - the priority compared to other events scheduled at the same time.source - the source of the eventtarget - the targetmethod - the methodargs - the arguments.nl.tudelft.simulation.dsol.SimRuntimeException - whenever the event is scheduled in the past.public final void scheduleEventRel(org.djunits.value.vdouble.scalar.Duration relativeDelay,
Object source,
Object target,
String method,
Object[] args)
throws nl.tudelft.simulation.dsol.SimRuntimeException
scheduleEventRel in interface OTSDEVSSimulatorInterfacerelativeDelay - the relativeDelay in timeUnits of the simulator.source - the source of the eventtarget - the targetmethod - the methodargs - the arguments.nl.tudelft.simulation.dsol.SimRuntimeException - whenever the event is scheduled in the past.public final void scheduleEventAbs(org.djunits.value.vdouble.scalar.Time absoluteTime,
Object source,
Object target,
String method,
Object[] args)
throws nl.tudelft.simulation.dsol.SimRuntimeException
scheduleEventAbs in interface OTSDEVSSimulatorInterfaceabsoluteTime - the exact time to schedule the method on the simulator.source - the source of the eventtarget - the targetmethod - the methodargs - the arguments.nl.tudelft.simulation.dsol.SimRuntimeException - whenever the event is scheduled in the past.public final void scheduleEventAbs(org.djunits.value.vdouble.scalar.Time absoluteTime,
short priority,
Object source,
Object target,
String method,
Object[] args)
throws nl.tudelft.simulation.dsol.SimRuntimeException
scheduleEventAbs in interface OTSDEVSSimulatorInterfaceabsoluteTime - the exact time to schedule the method on the simulator.priority - the priority compared to other events scheduled at the same time.source - the source of the eventtarget - the targetmethod - the methodargs - the arguments.nl.tudelft.simulation.dsol.SimRuntimeException - whenever the event is scheduled in the past.public final void runUpTo(org.djunits.value.vdouble.scalar.Time when)
throws nl.tudelft.simulation.dsol.SimRuntimeException
runUpTo in interface OTSDEVSSimulatorInterfacewhen - the absolute time till when we want to run the simulationnl.tudelft.simulation.dsol.SimRuntimeException - whenever starting fails. Possible occasions include starting a started simulatorprotected final org.djunits.value.vdouble.scalar.Duration relativeMillis(double factor)
relativeMillis in class nl.tudelft.simulation.dsol.simulators.DEVSRealTimeClock<org.djunits.value.vdouble.scalar.DoubleScalar.Abs<org.djunits.unit.TimeUnit>,org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.TimeUnit>,OTSSimTimeDouble>Copyright © 2014–2016 Delft University of Technology. All rights reserved.