Class LaneChangeModelTest

java.lang.Object
org.djutils.event.LocalEventProducer
All Implemented Interfaces:
Serializable, Remote, DSOLModel<Duration,OtsSimulatorInterface>, UNITS, org.djutils.event.EventProducer, OtsModelInterface

public class LaneChangeModelTest extends AbstractOtsModel implements UNITS
Test some very basic properties of lane change models.

Copyright (c) 2013-2023 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Peter Knoppers
See Also:
  • Constructor Details

    • LaneChangeModelTest

      public LaneChangeModelTest()
  • Method Details

    • makeMultiLane

      public static Lane[] makeMultiLane(RoadNetwork network, String name, Node from, Node to, LaneType laneType, int laneCount, OtsSimulatorInterface simulator) throws Exception
      Create a simple straight road with the specified number of Lanes.
      Parameters:
      network - RoadNetwork; the network
      name - String; name of the Link
      from - Node; starting node of the new Lane
      to - Node; ending node of the new Lane
      laneType - LaneType<String>; the type of GTU that can use the lanes
      laneCount - int; number of lanes in the road
      simulator - OtsSimulatorInterface; the simulator
      Returns:
      Lane<String, String>[]; array containing the new Lanes
      Throws:
      Exception - when something goes wrong (should not happen)
    • changeRight

      public final void changeRight() throws Exception
      Test that a vehicle in the left lane changes to the right lane if that is empty, or there is enough room.
      Throws:
      Exception - when something goes wrong (should not happen)
    • constructModel

      public void constructModel() throws SimRuntimeException
      Specified by:
      constructModel in interface DSOLModel<Duration,OtsSimulatorInterface>
      Throws:
      SimRuntimeException
    • getNetwork

      public final RoadNetwork getNetwork()
      Specified by:
      getNetwork in interface OtsModelInterface