public class SimpleAnimator extends OTSDEVSRealTimeClock implements SimpleSimulatorInterface, Serializable
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.
$LastChangedDate: 2017-04-17 17:27:27 +0200 (Mon, 17 Apr 2017) $, @version $Revision: 3447 $, by $Author: averbraeck $,
initial version 11 mei 2015
DEVSRealTimeClock.CalendarDouble, DEVSRealTimeClock.CalendarFloat, DEVSRealTimeClock.CalendarLong, DEVSRealTimeClock.TimeDouble, DEVSRealTimeClock.TimeDoubleUnit, DEVSRealTimeClock.TimeFloat, DEVSRealTimeClock.TimeFloatUnit, DEVSRealTimeClock.TimeLong, DEVSRealTimeClock.TimeLongUnitDEVSSimulatorInterface.CalendarDouble, DEVSSimulatorInterface.CalendarFloat, DEVSSimulatorInterface.CalendarLong, DEVSSimulatorInterface.TimeDouble, DEVSSimulatorInterface.TimeDoubleUnit, DEVSSimulatorInterface.TimeFloat, DEVSSimulatorInterface.TimeFloatUnit, DEVSSimulatorInterface.TimeLong, DEVSSimulatorInterface.TimeLongUnitAnimatorInterface.AnimationThreadBACKLOG_EVENT, CHANGE_SPEED_FACTOR_EVENTeventListreplication, running, semaphore, simulatorTime, workerEVENTLIST_CHANGED_EVENTEND_OF_REPLICATION_EVENT, START_EVENT, START_REPLICATION_EVENT, STEP_EVENT, STOP_EVENT, TIME_CHANGED_EVENT, WARMUP_EVENTFIRST_POSITION, LAST_POSITIONANIMATION_DELAY_CHANGED_EVENT, DEFAULT_ANIMATION_DELAY, UPDATE_ANIMATION_EVENT| Constructor and Description |
|---|
SimpleAnimator(org.djunits.value.vdouble.scalar.Time startTime,
org.djunits.value.vdouble.scalar.Duration warmupPeriod,
org.djunits.value.vdouble.scalar.Duration runLength,
OTSModelInterface model)
Create a simulation engine with animation; the easy way.
|
SimpleAnimator(org.djunits.value.vdouble.scalar.Time startTime,
org.djunits.value.vdouble.scalar.Duration warmupPeriod,
org.djunits.value.vdouble.scalar.Duration runLength,
OTSModelInterface model,
int replication)
Create a simulation engine with animation and prescribed replication number; the easy way.
|
| Modifier and Type | Method and Description |
|---|---|
SimEvent<OTSSimTimeDouble> |
scheduleEvent(org.djunits.value.vdouble.scalar.Time executionTime,
short priority,
Object source,
Object target,
String method,
Object[] args)
Construct and schedule a SimEvent using a Time to specify the execution time.
|
initialize, relativeMillis, runUpTo, toStringgetSpeedFactor, getUpdateMsec, isCatchup, run, setCatchup, setSpeedFactor, setSpeedFactor, setUpdateMsecgetAnimationDelay, setAnimationDelay, updateAnimationautoPauseSimulator, cancelEvent, getEventList, isPauseOnError, 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, start, start, step, stopaddListener, 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, getReplication, runUpTo, scheduleEvent, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventNow, scheduleEventNow, scheduleEventRel, scheduleEventRel, setEventListisPauseOnError, runUpToAndIncluding, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventNow, scheduleEventNow, scheduleEventRel, scheduleEventRel, setPauseOnErrorgetSimulatorTime, initialize, isRunning, start, step, stopstart, step, stopaddListener, addListener, addListener, addListener, removeListenergetAnimationDelay, setAnimationDelay, updateAnimationpublic SimpleAnimator(org.djunits.value.vdouble.scalar.Time startTime,
org.djunits.value.vdouble.scalar.Duration warmupPeriod,
org.djunits.value.vdouble.scalar.Duration runLength,
OTSModelInterface model)
throws SimRuntimeException,
NamingException,
org.opentrafficsim.base.modelproperties.PropertyException
startTime - Time; the start time of the simulationwarmupPeriod - Duration; the warm up period of the simulation (use new Duration(0, SECOND) if you don't know what
this is)runLength - Duration; the duration of the simulationmodel - OTSModelInterface; the simulation to executeSimRuntimeException - on ???NamingException - when context for the animation cannot be createdorg.opentrafficsim.base.modelproperties.PropertyException - when one of the user modified properties has the empty string as keypublic SimpleAnimator(org.djunits.value.vdouble.scalar.Time startTime,
org.djunits.value.vdouble.scalar.Duration warmupPeriod,
org.djunits.value.vdouble.scalar.Duration runLength,
OTSModelInterface model,
int replication)
throws SimRuntimeException,
NamingException,
org.opentrafficsim.base.modelproperties.PropertyException
startTime - Time; the start time of the simulationwarmupPeriod - Duration; the warm up period of the simulation (use new Duration(0, SECOND) if you don't know what
this is)runLength - Duration; the duration of the simulationmodel - OTSModelInterface; the simulation to executereplication - int; the replication numberSimRuntimeException - on ???NamingException - when context for the animation cannot be createdorg.opentrafficsim.base.modelproperties.PropertyException - when one of the user modified properties has the empty string as keypublic final SimEvent<OTSSimTimeDouble> scheduleEvent(org.djunits.value.vdouble.scalar.Time executionTime, short priority, Object source, Object target, String method, Object[] args) throws SimRuntimeException
scheduleEvent in interface SimpleSimulatorInterfaceexecutionTime - Time; the time at which the event must happenpriority - short; should be between SimEventInterface.MAX_PRIORITY and
SimEventInterface.MIN_PRIORITY; most normal events should use
SimEventInterface.NORMAL_PRIORITYsource - Object; the object that creates/schedules the eventtarget - Object; the object that must execute the eventmethod - String; the name of the method of target that must execute the eventargs - Object[]; the arguments of the method that must execute the eventSimRuntimeException - when the executionTime is in the pastCopyright © 2014–2017 Delft University of Technology. All rights reserved.