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
ConstructorsConstructorDescriptionSimpleOperationalPlan(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.Accelerationorg.djunits.value.vdouble.scalar.Durationfinal TurnIndicatorIntentfinal LateralDirectionalityfinal booleanfinal voidminimizeAcceleration(org.djunits.value.vdouble.scalar.Acceleration a) Set minimum of current and given acceleration.final voidsetAcceleration(org.djunits.value.vdouble.scalar.Acceleration acceleration) Sets acceleration.final voidSet left indicator intent.final voidsetIndicatorIntentLeft(org.djunits.value.vdouble.scalar.Length distance) Set left indicator intent.final voidSet right indicator intent.final voidsetIndicatorIntentRight(org.djunits.value.vdouble.scalar.Length distance) Set right indicator intent.final voidtoString()
-
Constructor Details
-
SimpleOperationalPlan
public SimpleOperationalPlan(org.djunits.value.vdouble.scalar.Acceleration acceleration, org.djunits.value.vdouble.scalar.Duration duration) - Parameters:
acceleration- accelerationduration- duration
-
SimpleOperationalPlan
public SimpleOperationalPlan(org.djunits.value.vdouble.scalar.Acceleration acceleration, org.djunits.value.vdouble.scalar.Duration duration, LateralDirectionality laneChangeDirection) - Parameters:
acceleration- accelerationduration- durationlaneChangeDirection- 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
-
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 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- 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- distance to object pertaining to the turn indicator intent
-
toString
-
setTurnIndicator
- Parameters:
gtu- LaneBasedGtu to set the indicator on- Throws:
GtuException- if GTU does not support the indicator
-