View Javadoc
1   package org.opentrafficsim.road.gtu.lane.tactical.cacc;
2   
3   import static org.opentrafficsim.base.parameters.constraint.ConstraintInterface.POSITIVE;
4   
5   import org.djunits.unit.LengthUnit;
6   import org.djunits.value.vdouble.scalar.Acceleration;
7   import org.djunits.value.vdouble.scalar.Length;
8   import org.opentrafficsim.base.parameters.ParameterException;
9   import org.opentrafficsim.base.parameters.ParameterTypeLength;
10  import org.opentrafficsim.core.gtu.plan.operational.OperationalPlanException;
11  import org.opentrafficsim.road.gtu.lane.LaneBasedGTU;
12  
13  /**
14   * <p>
15   * Copyright (c) 2013-2017 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
16   * BSD-style license. See <a href="http://opentrafficsim.org/node/13">OpenTrafficSim License</a>.
17   * <p>
18   * @version $Revision$, $LastChangedDate$, by $Author$, initial version 27 sep. 2018 <br>
19   * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a>
20   * @author <a href="http://www.tudelft.nl/pknoppers">Peter Knoppers</a>
21   * @author <a href="http://www.transport.citg.tudelft.nl">Wouter Schakel</a>
22   */
23  public interface LongitudinalController
24  {
25  
26      /** Parameter for sensor range. */
27      ParameterTypeLength SENSOR_RANGE =
28              new ParameterTypeLength("Sensor range", "Maximum sensor range", new Length(300.0, LengthUnit.SI), POSITIVE);
29  
30      /**
31       * Calculates the acceleration.
32       * @param gtu LaneBasedGTU; the GTU
33       * @return Acceleration from controller.
34       * @throws OperationalPlanException
35       * @throws ParameterException
36       */
37      Acceleration calculateAcceleration(LaneBasedGTU gtu) throws OperationalPlanException, ParameterException;
38  
39  }