Class LaneChangeModelTest

All Implemented Interfaces:
java.io.Serializable, DSOLModel<Time,​Duration,​SimTimeDoubleUnit,​OTSSimulatorInterface>, DSOLModel.TimeDoubleUnit<OTSSimulatorInterface>, EventProducerInterface, UNITS, OTSModelInterface

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

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

$LastChangedDate: 2015-09-16 19:20:07 +0200 (Wed, 16 Sep 2015) $, @version $Revision: 1405 $, by $Author: averbraeck $, initial version 14 nov. 2014

Author:
Peter Knoppers
See Also:
Serialized Form
  • Constructor Details

  • Method Details

    • makeMultiLane

      public static org.opentrafficsim.road.network.lane.Lane[] makeMultiLane​(org.opentrafficsim.road.network.RoadNetwork network, java.lang.String name, org.opentrafficsim.road.network.lane.OTSRoadNode from, org.opentrafficsim.road.network.lane.OTSRoadNode to, org.opentrafficsim.road.network.lane.LaneType laneType, int laneCount, OTSSimulatorInterface simulator) throws java.lang.Exception
      Create a simple straight road with the specified number of Lanes.
      Parameters:
      network - RoadNetwork; the network
      name - String; name of the Link
      from - OTSRoadNode; starting node of the new Lane
      to - OTSRoadNode; 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:
      java.lang.Exception - when something goes wrong (should not happen)
    • changeRight

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

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

      public final org.opentrafficsim.road.network.OTSRoadNetwork getNetwork()
      Specified by:
      getNetwork in interface OTSModelInterface