Class SimpleOperationalPlan
java.lang.Object
org.opentrafficsim.road.gtu.lane.plan.operational.SimpleOperationalPlan
- All Implemented Interfaces:
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 Summary
ConstructorDescriptionSimpleOperationalPlan
(org.djunits.value.vdouble.scalar.Acceleration acceleration, org.djunits.value.vdouble.scalar.Duration duration) SimpleOperationalPlan
(org.djunits.value.vdouble.scalar.Acceleration acceleration, org.djunits.value.vdouble.scalar.Duration duration, LateralDirectionality laneChangeDirection) -
Method Summary
Modifier and TypeMethodDescriptionfinal org.djunits.value.vdouble.scalar.Acceleration
org.djunits.value.vdouble.scalar.Duration
final TurnIndicatorIntent
final LateralDirectionality
final boolean
final void
minimizeAcceleration
(org.djunits.value.vdouble.scalar.Acceleration a) Set minimum of current and given acceleration.final void
setAcceleration
(org.djunits.value.vdouble.scalar.Acceleration acceleration) Sets acceleration.final void
Set left indicator intent.final void
setIndicatorIntentLeft
(org.djunits.value.vdouble.scalar.Length distance) Set left indicator intent.final void
Set right indicator intent.final void
setIndicatorIntentRight
(org.djunits.value.vdouble.scalar.Length distance) Set right indicator intent.final void
toString()
-
Constructor Details
-
SimpleOperationalPlan
public SimpleOperationalPlan(org.djunits.value.vdouble.scalar.Acceleration acceleration, org.djunits.value.vdouble.scalar.Duration duration) - Parameters:
acceleration
- Acceleration; accelerationduration
- Duration; duration
-
SimpleOperationalPlan
public SimpleOperationalPlan(org.djunits.value.vdouble.scalar.Acceleration acceleration, org.djunits.value.vdouble.scalar.Duration duration, LateralDirectionality laneChangeDirection) - Parameters:
acceleration
- Acceleration; accelerationduration
- Duration; durationlaneChangeDirection
- LateralDirectionality; lane change direction, may benull
.
-
-
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
- 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
- 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
-
setTurnIndicator
- Parameters:
gtu
- LaneBasedGtu; LaneBasedGtu to set the indicator on- Throws:
GtuException
- if GTU does not support the indicator
-