View Javadoc
1   package org.opentrafficsim.road.gtu.lane.tactical.following;
2   
3   import java.util.SortedMap;
4   
5   import org.djunits.unit.AccelerationUnit;
6   import org.djunits.value.vdouble.scalar.Acceleration;
7   import org.djunits.value.vdouble.scalar.Speed;
8   import org.djunits.value.vdouble.scalar.Length.Rel;
9   import org.opentrafficsim.core.gtu.drivercharacteristics.ParameterException;
10  import org.opentrafficsim.core.gtu.drivercharacteristics.ParameterTypes;
11  import org.opentrafficsim.road.gtu.lane.LaneBasedGTU;
12  
13  /**
14   * Implementation of the IDM+. See Schakel, W.J., Knoop, V.L., and Van Arem, B. (2012), <a
15   * href="http://victorknoop.eu/research/papers/TRB2012_LMRS_reviewed.pdf">LMRS: Integrated Lane Change Model with Relaxation and
16   * Synchronization</a>, Transportation Research Records: Journal of the Transportation Research Board, No. 2316, pp. 47-57. Note
17   * in the official versions of TRB and TRR some errors appeared due to the typesetting of the papers (not in the preprint
18   * provided here). A list of errata for the official versions is found <a
19   * href="http://victorknoop.eu/research/papers/Erratum_LMRS.pdf">here</a>.
20   * @author Wouter Schakel
21   */
22  public class IDMPlus extends IDM
23  {
24  
25      /**
26       * {@inheritDoc}
27       */
28      protected Acceleration followingAcceleration(LaneBasedGTU gtu, Speed speed, Speed desiredSpeed, Rel desiredHeadway,
29          SortedMap<Rel, Speed> leaders) throws ParameterException
30      {
31          double sStar = dynamicDesiredHeadway(gtu, speed, desiredHeadway, leaders.get(leaders.firstKey())).si;
32          // minimum of both terms
33          Acceleration a = gtu.getBehavioralCharacteristics().getAccelerationParameter(ParameterTypes.A);
34          double delta = gtu.getBehavioralCharacteristics().getParameter(DELTA);
35          double aInt = a.si * (1 - (sStar / leaders.firstKey().si) * (sStar / leaders.firstKey().si));
36          double aFree = a.si * (1 - Math.pow(speed.si / desiredSpeed.si, delta));
37          return new Acceleration(aInt < aFree ? aInt : aFree, AccelerationUnit.SI);
38      }
39  
40      /** {@inheritDoc} */
41      public String getName()
42      {
43          return "IDM+";
44      }
45  
46      /** {@inheritDoc} */
47      public String getLongName()
48      {
49          return "Intelligent Driver Model+";
50      }
51  
52  }