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

public class StrategiesDemo extends AbstractSimulationScript
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:
  • Constructor Details

    • StrategiesDemo

      protected StrategiesDemo()
      Constructor.
  • Method Details

    • main

      public static void main(String[] args)
      Main method.
      Parameters:
      args - String[]; arguments
    • setupDemo

      protected void setupDemo(OtsAnimationPanel animation, RoadNetwork network)
      Overrides:
      setupDemo in class AbstractSimulationScript
    • setupSimulation

      protected RoadNetwork setupSimulation(org.opentrafficsim.core.dsol.OtsSimulatorInterface sim) throws Exception
      Specified by:
      setupSimulation in class AbstractSimulationScript
      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; lane
      pos - Length; position
      gtuType - GtuType; GTU type
      initialSpeed - Speed; initial speed
      net - RoadNetwork; network
      Throws:
      NamingException - on exception
      org.opentrafficsim.core.gtu.GtuException - on exception
      org.opentrafficsim.core.network.NetworkException - on exception
      nl.tudelft.simulation.dsol.SimRuntimeException - on exception
      org.opentrafficsim.core.geometry.OtsGeometryException - on exception