Class LaneChangeModelTest

    • Constructor Detail

      • LaneChangeModelTest

        public LaneChangeModelTest()
    • Method Detail

      • makeMultiLane

        public static Lane[] makeMultiLane​(OTSRoadNetwork network,
                                           java.lang.String name,
                                           OTSRoadNode from,
                                           OTSRoadNode to,
                                           LaneType laneType,
                                           int laneCount,
                                           OTSSimulatorInterface simulator)
                                    throws java.lang.Exception
        Create a simple straight road with the specified number of Lanes.
        Parameters:
        network - OTSRoadNetwork; 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)