Class SimpleOperationalPlan

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

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

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

Version:
$Revision$, $LastChangedDate$, by $Author$, initial version Jul 26, 2016
Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
See Also:
Serialized Form
  • Constructor Details

  • Method Details

    • getAcceleration

      public final Acceleration getAcceleration()
      Returns:
      acceleration.
    • setAcceleration

      public final void setAcceleration​(Acceleration acceleration)
      Sets acceleration.
      Parameters:
      acceleration - Acceleration; acceleration
    • getDuration

      public 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​(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​(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​(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 java.lang.String toString()
      Overrides:
      toString in class java.lang.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