1 package org.opentrafficsim.core.gtu.lane.changing; 2 3 import org.opentrafficsim.core.gtu.following.DualAccelerationStep; 4 import org.opentrafficsim.core.unit.AccelerationUnit; 5 import org.opentrafficsim.core.value.vdouble.scalar.DoubleScalar; 6 7 /** 8 * The egoistic drive changes lane when this yields is personal advantage (totally ignoring any disadvantage to others). 9 * <p> 10 * Copyright (c) 2013-2014 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights 11 * reserved. <br> 12 * BSD-style license. See <a href="http://opentrafficsim.org/node/13">OpenTrafficSim License</a>. 13 * <p> 14 * @version Sep 19, 2014 <br> 15 * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a> 16 */ 17 public final class Egoistic extends AbstractLaneChangeModel 18 { 19 /** {@inheritDoc} */ 20 @Override 21 public DoubleScalar.Abs<AccelerationUnit> applyDriverPersonality(final DualAccelerationStep accelerations) 22 { 23 // The egoistic driver only looks at the effects on him-/herself. 24 return accelerations.getLeaderAcceleration(); 25 } 26 27 }