public class SimpleSimulator extends Object
Copyright (c) 2013-2014 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights
reserved.
BSD-style license. See OpenTrafficSim License.
| Constructor and Description |
|---|
SimpleSimulator(DoubleScalar.Abs<TimeUnit> startTime,
DoubleScalar.Rel<TimeUnit> warmupPeriod,
DoubleScalar.Rel<TimeUnit> runLength,
OTSModelInterface model)
Create a simulation engine without animation; the easy way.
|
SimpleSimulator(DoubleScalar.Abs<TimeUnit> startTime,
DoubleScalar.Rel<TimeUnit> warmupPeriod,
DoubleScalar.Rel<TimeUnit> runLength,
OTSModelInterface model,
Rectangle2D extent)
Create a simulation engine with animation; the easy way.
|
| Modifier and Type | Method and Description |
|---|---|
nl.tudelft.simulation.dsol.gui.swing.DSOLPanel<DoubleScalar.Abs<TimeUnit>,DoubleScalar.Rel<TimeUnit>,OTSSimTimeDouble> |
getPanel()
To use in a Swing application add the DSOLPanel to a JFrame.
|
nl.tudelft.simulation.dsol.simulators.DEVSSimulator<DoubleScalar.Abs<TimeUnit>,DoubleScalar.Rel<TimeUnit>,OTSSimTimeDouble> |
getSimulator()
Access to the simulator is needed to create simulated objects.
|
void |
runUpTo(DoubleScalar.Abs<TimeUnit> when)
Run the simulation up to the specified time.
|
public SimpleSimulator(DoubleScalar.Abs<TimeUnit> startTime, DoubleScalar.Rel<TimeUnit> warmupPeriod, DoubleScalar.Rel<TimeUnit> runLength, OTSModelInterface model) throws RemoteException, nl.tudelft.simulation.dsol.SimRuntimeException
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 ???public SimpleSimulator(DoubleScalar.Abs<TimeUnit> startTime, DoubleScalar.Rel<TimeUnit> warmupPeriod, DoubleScalar.Rel<TimeUnit> runLength, OTSModelInterface model, Rectangle2D extent) throws RemoteException, nl.tudelft.simulation.dsol.SimRuntimeException
startTime - DoubleScalar.Abs<TimeUnit>; 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 executeextent - Rectangle2D; bottom left corner, length and width of the area (world) to animate.RemoteException - on communications failurenl.tudelft.simulation.dsol.SimRuntimeException - on ???public final nl.tudelft.simulation.dsol.gui.swing.DSOLPanel<DoubleScalar.Abs<TimeUnit>,DoubleScalar.Rel<TimeUnit>,OTSSimTimeDouble> getPanel()
public final nl.tudelft.simulation.dsol.simulators.DEVSSimulator<DoubleScalar.Abs<TimeUnit>,DoubleScalar.Rel<TimeUnit>,OTSSimTimeDouble> getSimulator()
public final void runUpTo(DoubleScalar.Abs<TimeUnit> when) throws nl.tudelft.simulation.dsol.SimRuntimeException
when - DoubleScalar.Abs<TimeUnit>; the stop time.nl.tudelft.simulation.dsol.SimRuntimeException - when the specified time lies in the pastCopyright © 2014–2015 Delft University of Technology. All rights reserved.