Class DirectedAltruistic
java.lang.Object
org.opentrafficsim.road.gtu.lane.tactical.directedlanechange.AbstractDirectedLaneChangeModel
org.opentrafficsim.road.gtu.lane.tactical.directedlanechange.DirectedAltruistic
- All Implemented Interfaces:
DirectedLaneChangeModel
The altruistic driver changes lane when that is beneficial for all drivers.
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
-
Field Summary
Fields inherited from class org.opentrafficsim.road.gtu.lane.tactical.directedlanechange.AbstractDirectedLaneChangeModel
B
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal org.djunits.value.vdouble.scalar.Acceleration
applyDriverPersonality
(DualAccelerationStep accelerationSteps) Return the weighted acceleration as described by the personality.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 String
toString()
Methods inherited from class org.opentrafficsim.road.gtu.lane.tactical.directedlanechange.AbstractDirectedLaneChangeModel
computeLaneChangeAndAcceleration, getPerception
-
Constructor Details
-
DirectedAltruistic
- Parameters:
perception
- LanePerception; the perception to use
-
-
Method Details
-
applyDriverPersonality
public final org.djunits.value.vdouble.scalar.Acceleration applyDriverPersonality(DualAccelerationStep accelerationSteps) Return the weighted acceleration as described by the personality. This incorporates the personality of the driver to the lane change decisions.- Specified by:
applyDriverPersonality
in classAbstractDirectedLaneChangeModel
- Parameters:
accelerationSteps
- DualAccelerationStep; the DualAccelerationStep that contains the AccelerationStep that the reference GTU will make and the AccelerationStep that the (new) follower GTU will make- Returns:
- Acceleration; the acceleration that the personality of the driver uses (in a comparison to a similarly computed acceleration in the non-, or different-lane-changed state) to decide if a lane change should be performed
-
getName
Return the name of this GTU following model.- Returns:
- String; just the name of the GTU following model
-
getLongName
Return complete textual information about this instantiation of this GTU following model.- Returns:
- String; the name and parameter values of the GTU following model
-
toString
-