Package strategies
Class StrategiesDemo
- java.lang.Object
-
- org.opentrafficsim.swing.script.AbstractSimulationScript
-
- strategies.StrategiesDemo
-
- All Implemented Interfaces:
Serializable,EventListener,Checkable,EventListenerInterface
public class StrategiesDemo extends AbstractSimulationScript
Demo of lane change strategies.Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version 4 jun. 2018
- Author:
- Wouter Schakel
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedStrategiesDemo()Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateGtu(Lane lane, Length pos, GTUType gtuType, Speed initialSpeed, OTSRoadNetwork net)Creates a GTU.static voidmain(String[] args)Main method.protected voidsetupDemo(OTSAnimationPanel animation, OTSRoadNetwork network)protected OTSRoadNetworksetupSimulation(OTSSimulatorInterface sim)-
Methods inherited from class org.opentrafficsim.swing.script.AbstractSimulationScript
addTabs, animateNetwork, check, getGtuColorer, getNetwork, getSeed, getSimulationTime, getSimulator, getStartTime, getWarmupTime, isAutorun, notify, onSimulationEnd, setAnimationToggles, setGtuColorer, start
-
-
-
-
Method Detail
-
main
public static void main(String[] args)
Main method.- Parameters:
args- String[]; arguments
-
setupDemo
protected void setupDemo(OTSAnimationPanel animation, OTSRoadNetwork network)
- Overrides:
setupDemoin classAbstractSimulationScript
-
setupSimulation
protected OTSRoadNetwork setupSimulation(OTSSimulatorInterface sim) throws Exception
- Specified by:
setupSimulationin classAbstractSimulationScript- Throws:
Exception
-
createGtu
public void createGtu(Lane lane, Length pos, GTUType gtuType, Speed initialSpeed, OTSRoadNetwork net) throws NamingException, GTUException, NetworkException, SimRuntimeException, OTSGeometryException
Creates a GTU.- Parameters:
lane- Lane; lanepos- Length; positiongtuType- GTUType; GTU typeinitialSpeed- Speed; initial speednet- OTSRoadNetwork; network- Throws:
NamingException- on exceptionGTUException- on exceptionNetworkException- on exceptionSimRuntimeException- on exceptionOTSGeometryException- on exception
-
-