public class SimpleOperationalPlan extends Object implements Serializable
Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Constructor and Description |
---|
SimpleOperationalPlan(Acceleration acceleration,
Duration duration) |
SimpleOperationalPlan(Acceleration acceleration,
Duration duration,
LateralDirectionality laneChangeDirection) |
Modifier and Type | Method and Description |
---|---|
Acceleration |
getAcceleration() |
Duration |
getDuration() |
TurnIndicatorIntent |
getIndicatorIntent() |
LateralDirectionality |
getLaneChangeDirection() |
boolean |
isLaneChange() |
void |
minimizeAcceleration(Acceleration a)
Set minimum of current and given acceleration.
|
void |
setIndicatorIntentLeft()
Set left indicator intent.
|
void |
setIndicatorIntentLeft(Length distance)
Set left indicator intent.
|
void |
setIndicatorIntentRight()
Set right indicator intent.
|
void |
setIndicatorIntentRight(Length distance)
Set right indicator intent.
|
void |
setTurnIndicator(LaneBasedGTU gtu) |
String |
toString() |
public SimpleOperationalPlan(Acceleration acceleration, Duration duration)
acceleration
- accelerationduration
- durationpublic SimpleOperationalPlan(Acceleration acceleration, Duration duration, LateralDirectionality laneChangeDirection)
acceleration
- accelerationduration
- durationlaneChangeDirection
- lane change direction, may be null
.public final Acceleration getAcceleration()
public Duration getDuration()
public final boolean isLaneChange()
public final LateralDirectionality getLaneChangeDirection()
public final void minimizeAcceleration(Acceleration a)
a
- acceleration to set if lower than current accelerationpublic final TurnIndicatorIntent getIndicatorIntent()
public final void setIndicatorIntentLeft()
public final void setIndicatorIntentRight()
public final void setIndicatorIntentLeft(Length distance)
distance
- distance to object pertaining to the turn indicator intentpublic final void setIndicatorIntentRight(Length distance)
distance
- distance to object pertaining to the turn indicator intentpublic final void setTurnIndicator(LaneBasedGTU gtu) throws GTUException
gtu
- LaneBasedGTU to set the indicator onGTUException
- if GTU does not support the indicatorCopyright © 2014–2018 Delft University of Technology. All rights reserved.