public class StrategiesDemo extends AbstractSimulationScript
Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Modifier | Constructor and Description |
---|---|
protected |
StrategiesDemo(String[] properties)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
createGtu(Lane lane,
Length pos,
GTUType gtuType,
Speed initialSpeed,
OTSNetwork net)
Creates a GTU.
|
static void |
main(String[] args)
Main method.
|
protected void |
setDefaultProperties() |
protected void |
setupDemo(AbstractWrappableAnimation animation,
OTSNetwork net) |
protected OTSNetwork |
setupSimulation(DEVSSimulatorInterface.TimeDoubleUnit sim) |
addAnimationToggles, addTabs, animateNetwork, getBooleanProperty, getDoubleProperty, getDurationProperty, getGtuColorer, getIntegerProperty, getNetwork, getProperty, getSimulator, getTimeProperty, notify, onSimulationEnd, setGtuColorer, setProperty, start
protected StrategiesDemo(String[] properties)
properties
- String[]; propertiespublic static void main(String[] args)
args
- String[]; argumentsprotected void setDefaultProperties()
setDefaultProperties
in class AbstractSimulationScript
protected void setupDemo(AbstractWrappableAnimation animation, OTSNetwork net)
setupDemo
in class AbstractSimulationScript
protected OTSNetwork setupSimulation(DEVSSimulatorInterface.TimeDoubleUnit sim) throws Exception
setupSimulation
in class AbstractSimulationScript
Exception
public void createGtu(Lane lane, Length pos, GTUType gtuType, Speed initialSpeed, OTSNetwork net) throws NamingException, GTUException, NetworkException, SimRuntimeException, OTSGeometryException
lane
- Lane; lanepos
- Length; positiongtuType
- GTUType; GTU typeinitialSpeed
- Speed; initial speednet
- OTSNetwork; networkNamingException
- on exceptionGTUException
- on exceptionNetworkException
- on exceptionSimRuntimeException
- on exceptionOTSGeometryException
- on exceptionCopyright © 2014–2018 Delft University of Technology. All rights reserved.