Class Egoistic
- java.lang.Object
-
- org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.AbstractLaneChangeModel
-
- org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.Egoistic
-
- All Implemented Interfaces:
LaneChangeModel
public class Egoistic extends AbstractLaneChangeModel
The egoistic drive changes lane when this yields is personal advantage (totally ignoring any disadvantage to others).Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.- Version:
- $Revision: 1375 $, $LastChangedDate: 2015-09-03 03:32:20 +0200 (Thu, 03 Sep 2015) $, by $Author: averbraeck $,
initial version Sep 19, 2014
- Author:
- Peter Knoppers
-
-
Field Summary
-
Fields inherited from class org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.AbstractLaneChangeModel
B, LOOKAHEAD
-
-
Constructor Summary
Constructors Constructor Description Egoistic()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Acceleration
applyDriverPersonality(DualAccelerationStep accelerations)
Return the weighted acceleration as described by the personality.String
getLongName()
Return complete textual information about this instantiation of this GTU following model.String
getName()
Return the name of this GTU following model.String
toString()
-
Methods inherited from class org.opentrafficsim.road.gtu.lane.tactical.lanechangemobil.AbstractLaneChangeModel
computeLaneChangeAndAcceleration
-
-
-
-
Method Detail
-
applyDriverPersonality
public final Acceleration applyDriverPersonality(DualAccelerationStep accelerations)
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 classAbstractLaneChangeModel
- Parameters:
accelerations
- 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
public final String getName()
Return the name of this GTU following model.- Returns:
- String; just the name of the GTU following model
-
getLongName
public final String 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
-
-