Class SimpleOperationalPlan

java.lang.Object
org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan
All Implemented Interfaces:
Serializable

public class SimpleOperationalPlan extends Object implements Serializable
Simplified plan containing an acceleration value and possible lane change direction.

Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
See Also:
  • Constructor Details

    • SimpleOperationalPlan

      public SimpleOperationalPlan(org.djunits.value.vdouble.scalar.Acceleration acceleration, org.djunits.value.vdouble.scalar.Duration duration)
      Parameters:
      acceleration - Acceleration; acceleration
      duration - Duration; duration
    • SimpleOperationalPlan

      public SimpleOperationalPlan(org.djunits.value.vdouble.scalar.Acceleration acceleration, org.djunits.value.vdouble.scalar.Duration duration, LateralDirectionality laneChangeDirection)
      Parameters:
      acceleration - Acceleration; acceleration
      duration - Duration; duration
      laneChangeDirection - LateralDirectionality; lane change direction, may be null.
  • Method Details

    • getAcceleration

      public final org.djunits.value.vdouble.scalar.Acceleration getAcceleration()
      Returns:
      acceleration.
    • setAcceleration

      public final void setAcceleration(org.djunits.value.vdouble.scalar.Acceleration acceleration)
      Sets acceleration.
      Parameters:
      acceleration - Acceleration; acceleration
    • getDuration

      public org.djunits.value.vdouble.scalar.Duration getDuration()
      Returns:
      duration.
    • isLaneChange

      public final boolean isLaneChange()
      Returns:
      if lane change.
    • getLaneChangeDirection

      public final LateralDirectionality getLaneChangeDirection()
      Returns:
      laneChangeDirection, may be NONE if no lane change.
    • minimizeAcceleration

      public final void minimizeAcceleration(org.djunits.value.vdouble.scalar.Acceleration a)
      Set minimum of current and given acceleration.
      Parameters:
      a - Acceleration; acceleration to set if lower than current acceleration
    • getIndicatorIntent

      public final TurnIndicatorIntent getIndicatorIntent()
      Returns:
      indicatorIntent.
    • setIndicatorIntentLeft

      public final void setIndicatorIntentLeft()
      Set left indicator intent. Any intent given with distance overrules this intent.
    • setIndicatorIntentRight

      public final void setIndicatorIntentRight()
      Set right indicator intent. Any intent given with distance overrules this intent.
    • setIndicatorIntentLeft

      public final void setIndicatorIntentLeft(org.djunits.value.vdouble.scalar.Length distance)
      Set left indicator intent. Intent with smallest provided distance has priority.
      Parameters:
      distance - Length; distance to object pertaining to the turn indicator intent
    • setIndicatorIntentRight

      public final void setIndicatorIntentRight(org.djunits.value.vdouble.scalar.Length distance)
      Set right indicator intent. Intent with smallest provided distance has priority.
      Parameters:
      distance - Length; distance to object pertaining to the turn indicator intent
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setTurnIndicator

      public final void setTurnIndicator(LaneBasedGtu gtu) throws GtuException
      Parameters:
      gtu - LaneBasedGtu; LaneBasedGtu to set the indicator on
      Throws:
      GtuException - if GTU does not support the indicator