Class DirectedFixedLaneChangeModel
java.lang.Object
org.opentrafficsim.road.gtu.lane.tactical.directedlanechange.DirectedFixedLaneChangeModel
- All Implemented Interfaces:
DirectedLaneChangeModel
Dummy lane change model with totally predictable results (used for testing).
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:
- Peter Knoppers
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal DirectedLaneMovementStep
computeLaneChangeAndAcceleration
(LaneBasedGtu gtu, LateralDirectionality direction, Collection<Headway> sameLaneTraffic, Collection<Headway> otherLaneTraffic, org.djunits.value.vdouble.scalar.Length maxDistance, org.djunits.value.vdouble.scalar.Speed speedLimit, org.djunits.value.vdouble.scalar.Acceleration otherLaneRouteIncentive, org.djunits.value.vdouble.scalar.Acceleration laneChangeThreshold, org.djunits.value.vdouble.scalar.Duration laneChangeTime) Compute the acceleration and lane change.final String
Return complete textual information about this instantiation of this GTU following model.final String
getName()
Return the name of this GTU following model.final LanePerception
final String
toString()
-
Constructor Details
-
DirectedFixedLaneChangeModel
public DirectedFixedLaneChangeModel()
-
-
Method Details
-
computeLaneChangeAndAcceleration
public final DirectedLaneMovementStep computeLaneChangeAndAcceleration(LaneBasedGtu gtu, LateralDirectionality direction, Collection<Headway> sameLaneTraffic, Collection<Headway> otherLaneTraffic, org.djunits.value.vdouble.scalar.Length maxDistance, org.djunits.value.vdouble.scalar.Speed speedLimit, org.djunits.value.vdouble.scalar.Acceleration otherLaneRouteIncentive, org.djunits.value.vdouble.scalar.Acceleration laneChangeThreshold, org.djunits.value.vdouble.scalar.Duration laneChangeTime) throws GtuException Compute the acceleration and lane change.- Specified by:
computeLaneChangeAndAcceleration
in interfaceDirectedLaneChangeModel
- Parameters:
gtu
- LaneBasedGtu; the GTU for which the acceleration and lane change is computeddirection
- LateralDirectionality; the direction of the lane we want to change tosameLaneTraffic
- Collection<Headway>; the set of information about observable GTUs in the current lane (can not be null and may include thegtu
)otherLaneTraffic
- Collection<Headway>; the set of information about observable GTUs in the adjacent lane where GTUs should drive in the absence of other traffic (must be null if there is no such lane)maxDistance
- Length; the maximum distance that the current GTU can drive, e.g. due to a lane dropspeedLimit
- Speed; the local speed limitotherLaneRouteIncentive
- Acceleration; route incentive to merge to the adjacent lane where GTUs should drive in the absence of other trafficlaneChangeThreshold
- Acceleration; threshold that prevents lane changes that have very little benefit merge to overtake other trafficlaneChangeTime
- Duration; time spent to overtake- Returns:
- LaneMovementStep; the result of the lane change and GTU following model
- Throws:
GtuException
- when the position of the GTU on the lane(s) cannot be determined
-
getName
Return the name of this GTU following model.- Specified by:
getName
in interfaceDirectedLaneChangeModel
- Returns:
- String; just the name of the GTU following model
-
getLongName
Return complete textual information about this instantiation of this GTU following model.- Specified by:
getLongName
in interfaceDirectedLaneChangeModel
- Returns:
- String; the name and parameter values of the GTU following model
-
toString
-
getPerception
- Specified by:
getPerception
in interfaceDirectedLaneChangeModel
- Returns:
- the perception.
-