1 package org.opentrafficsim.road.gtu.lane.tactical.directedlanechange; 2 3 import org.djunits.value.vdouble.scalar.Acceleration; 4 import org.opentrafficsim.road.gtu.lane.tactical.following.DualAccelerationStep; 5 6 /** 7 * The egoistic drive changes lane when this yields is personal advantage (totally ignoring any disadvantage to others). 8 * <p> 9 * Copyright (c) 2013-2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br> 10 * BSD-style license. See <a href="http://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>. 11 * <p> 12 * @version $Revision: 1375 $, $LastChangedDate: 2015-09-03 03:32:20 +0200 (Thu, 03 Sep 2015) $, by $Author: averbraeck $, 13 * initial version Sep 19, 2014 <br> 14 * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a> 15 */ 16 public final class DirectedEgoistic extends AbstractDirectedLaneChangeModel 17 { 18 /** {@inheritDoc} */ 19 @Override 20 public Acceleration applyDriverPersonality(final DualAccelerationStep accelerations) 21 { 22 // The egoistic driver only looks at the effects on him-/herself. 23 return accelerations.getLeaderAcceleration(); 24 } 25 26 /** {@inheritDoc} */ 27 @Override 28 public String getName() 29 { 30 return "Egoistic"; 31 } 32 33 /** {@inheritDoc} */ 34 @Override 35 public String getLongName() 36 { 37 return "Egoistic lane change model (as described by Treiber)."; 38 } 39 40 }