View Javadoc
1   package org.opentrafficsim.road.gtu.lane.control;
2   
3   import java.util.Optional;
4   
5   import org.djunits.value.vdouble.scalar.Acceleration;
6   import org.opentrafficsim.base.parameters.Parameters;
7   import org.opentrafficsim.road.gtu.lane.LaneBasedGtu;
8   
9   /**
10   * Longitudinal controller, such as ACC or CACC. The controller is part of a tactical planner and does not function
11   * automatically.
12   * <p>
13   * Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
14   * BSD-style license. See <a href="https://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>.
15   * </p>
16   * @author <a href="https://github.com/averbraeck">Alexander Verbraeck</a>
17   * @author <a href="https://github.com/peter-knoppers">Peter Knoppers</a>
18   * @author <a href="https://github.com/wjschakel">Wouter Schakel</a>
19   */
20  public interface LongitudinalControl
21  {
22  
23      /**
24       * Calculate acceleration.
25       * @param gtu controlled GTU
26       * @param settings system settings
27       * @return level of acceleration, may be empty if the controller is unable to deal with a situation
28       */
29      Optional<Acceleration> getAcceleration(LaneBasedGtu gtu, Parameters settings);
30  
31  }