public class SimpleSimulator extends OTSDEVSSimulator implements SimpleSimulation
Copyright (c) 2013-2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2015-08-30 00:16:51 +0200 (Sun, 30 Aug 2015) $, @version $Revision: 1329 $, by $Author: averbraeck $,
initial version 12 nov. 2014
nl.tudelft.simulation.dsol.simulators.DEVSSimulator.CalendarDouble, nl.tudelft.simulation.dsol.simulators.DEVSSimulator.CalendarFloat, nl.tudelft.simulation.dsol.simulators.DEVSSimulator.CalendarLong, nl.tudelft.simulation.dsol.simulators.DEVSSimulator.TimeDouble, nl.tudelft.simulation.dsol.simulators.DEVSSimulator.TimeDoubleUnit, nl.tudelft.simulation.dsol.simulators.DEVSSimulator.TimeFloat, nl.tudelft.simulation.dsol.simulators.DEVSSimulator.TimeFloatUnit, nl.tudelft.simulation.dsol.simulators.DEVSSimulator.TimeLong, nl.tudelft.simulation.dsol.simulators.DEVSSimulator.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_EVENT| Constructor and Description |
|---|
SimpleSimulator(org.djunits.value.vdouble.scalar.DoubleScalar.Abs<org.djunits.unit.TimeUnit> startTime,
org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.TimeUnit> warmupPeriod,
org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.TimeUnit> runLength,
OTSModelInterface model)
Create a simulation engine without animation; the easy way.
|
| Modifier and Type | Method and Description |
|---|---|
nl.tudelft.simulation.dsol.formalisms.eventscheduling.SimEvent<OTSSimTimeDouble> |
scheduleEvent(org.djunits.value.vdouble.scalar.DoubleScalar.Abs<org.djunits.unit.TimeUnit> executionTime,
short priority,
Object source,
Object target,
String method,
Object[] args)
Construct and schedule a SimEvent using a DoubleScalar.Abs<TimeUnit> to specify the execution time.
|
autoPauseSimulator, cancelEvent, getEventList, initialize, isPauseOnError, run, runUpTo, scheduleEvent, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventNow, scheduleEventNow, 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, toString, wait, wait, waitcancelEvent, getEventList, isPauseOnError, runUpTo, scheduleEvent, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventAbs, scheduleEventNow, scheduleEventNow, scheduleEventRel, scheduleEventRel, setEventList, setPauseOnErrorpublic SimpleSimulator(org.djunits.value.vdouble.scalar.DoubleScalar.Abs<org.djunits.unit.TimeUnit> startTime,
org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.TimeUnit> warmupPeriod,
org.djunits.value.vdouble.scalar.DoubleScalar.Rel<org.djunits.unit.TimeUnit> runLength,
OTSModelInterface model)
throws RemoteException,
nl.tudelft.simulation.dsol.SimRuntimeException,
NamingException
startTime - OTSSimTimeDouble; the start time of the simulationwarmupPeriod - DoubleScalar.Rel<TimeUnit>; the warm up period of the simulation (use new
DoubleScalar.Rel<TimeUnit>(0, TimeUnit.SECOND) if you don't know what this is)runLength - DoubleScalar.Rel<TimeUnit>; the duration of the simulationmodel - OTSModelInterface; the simulation to executeRemoteException - on communications failurenl.tudelft.simulation.dsol.SimRuntimeException - on ???NamingException - when the context for the replication cannot be createdpublic final nl.tudelft.simulation.dsol.formalisms.eventscheduling.SimEvent<OTSSimTimeDouble> scheduleEvent(org.djunits.value.vdouble.scalar.DoubleScalar.Abs<org.djunits.unit.TimeUnit> executionTime, short priority, Object source, Object target, String method, Object[] args) throws nl.tudelft.simulation.dsol.SimRuntimeException
scheduleEvent in interface SimpleSimulationexecutionTime - DoubleScalar.Abs<TimeUnit>; 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 eventnl.tudelft.simulation.dsol.SimRuntimeException - when the executionTime is in the pastCopyright © 2014–2015 Delft University of Technology. All rights reserved.