Class StrategiesDemo
java.lang.Object
org.opentrafficsim.swing.script.AbstractSimulationScript
org.opentrafficsim.demo.strategies.StrategiesDemo
- All Implemented Interfaces:
Serializable
,Remote
,EventListener
,org.djutils.cli.Checkable
,org.djutils.event.EventListener
Demo of lane change strategies.
Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
- Author:
- Wouter Schakel
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescription(package private) class
Perception factory.(package private) class
IDM factory with socio speed. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createGtu
(Lane lane, org.djunits.value.vdouble.scalar.Length pos, org.opentrafficsim.core.gtu.GtuType gtuType, org.djunits.value.vdouble.scalar.Speed initialSpeed, RoadNetwork net) Creates a GTU.static void
Main method.protected void
setupDemo
(OtsAnimationPanel animation, RoadNetwork network) protected RoadNetwork
setupSimulation
(org.opentrafficsim.core.dsol.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
-
Constructor Details
-
StrategiesDemo
protected StrategiesDemo()Constructor.
-
-
Method Details
-
main
Main method.- Parameters:
args
- String[]; arguments
-
setupDemo
- Overrides:
setupDemo
in classAbstractSimulationScript
-
setupSimulation
protected RoadNetwork setupSimulation(org.opentrafficsim.core.dsol.OtsSimulatorInterface sim) throws Exception - Specified by:
setupSimulation
in classAbstractSimulationScript
- Throws:
Exception
-
createGtu
public void createGtu(Lane lane, org.djunits.value.vdouble.scalar.Length pos, org.opentrafficsim.core.gtu.GtuType gtuType, org.djunits.value.vdouble.scalar.Speed initialSpeed, RoadNetwork net) throws NamingException, org.opentrafficsim.core.gtu.GtuException, org.opentrafficsim.core.network.NetworkException, nl.tudelft.simulation.dsol.SimRuntimeException, org.opentrafficsim.core.geometry.OtsGeometryException Creates a GTU.- Parameters:
lane
- Lane; lanepos
- Length; positiongtuType
- GtuType; GTU typeinitialSpeed
- Speed; initial speednet
- RoadNetwork; network- Throws:
NamingException
- on exceptionorg.opentrafficsim.core.gtu.GtuException
- on exceptionorg.opentrafficsim.core.network.NetworkException
- on exceptionnl.tudelft.simulation.dsol.SimRuntimeException
- on exceptionorg.opentrafficsim.core.geometry.OtsGeometryException
- on exception
-