Interface LaneChange.LaneChangePath
-
- All Known Implementing Classes:
LaneChange.LaneChangePath.InterpolatedLaneChangePath
,LaneChange.LaneChangePath.SequentialLaneChangePath
- Enclosing class:
- LaneChange
public static interface LaneChange.LaneChangePath
Provides a (partial) path during lane changes.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 30 apr. 2018
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
LaneChange.LaneChangePath.InterpolatedLaneChangePath
Helper class for interpolation between the from and to center lines.static class
LaneChange.LaneChangePath.SequentialLaneChangePath
A helper class to allow a lane change to follow a sequential determination of the target position (including rotation) for each time step.
-
Field Summary
Fields Modifier and Type Field Description static LaneChange.LaneChangePath
BEZIER
A simple Bezier curve directly to the lane change target position.static LaneChange.LaneChangePath
LINEAR
Linear interpolation between center lines.static LaneChange.LaneChangePath
POLY3
The target point (including rotation) for the coming time step is based on a 3rd-degree polynomial.static LaneChange.LaneChangePath
SINE
The target point (including rotation) for the coming time step is based on a sine wave.static LaneChange.LaneChangePath
SINE_INTERP
Sine-shaped interpolation between center lines.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description OTSLine3D
getPath(Duration timeStep, Length planDistance, Speed meanSpeed, DirectedLanePosition from, DirectedPoint startPosition, LateralDirectionality laneChangeDirection, OTSLine3D fromLine, OTSLine3D toLine, Duration laneChangeDuration, double lcFraction)
Returns a (partial) path for a lane change.
-
-
-
Field Detail
-
SINE_INTERP
static final LaneChange.LaneChangePath SINE_INTERP
Sine-shaped interpolation between center lines.
-
LINEAR
static final LaneChange.LaneChangePath LINEAR
Linear interpolation between center lines.
-
BEZIER
static final LaneChange.LaneChangePath BEZIER
A simple Bezier curve directly to the lane change target position.
-
SINE
static final LaneChange.LaneChangePath SINE
The target point (including rotation) for the coming time step is based on a sine wave.
-
POLY3
static final LaneChange.LaneChangePath POLY3
The target point (including rotation) for the coming time step is based on a 3rd-degree polynomial.
-
-
Method Detail
-
getPath
OTSLine3D getPath(Duration timeStep, Length planDistance, Speed meanSpeed, DirectedLanePosition from, DirectedPoint startPosition, LateralDirectionality laneChangeDirection, OTSLine3D fromLine, OTSLine3D toLine, Duration laneChangeDuration, double lcFraction) throws OTSGeometryException
Returns a (partial) path for a lane change. The method is called both at the start and during a lane change, and should return a valid path. This path should at least have a length ofplanDistance
, unless the lane change will be finished during the coming time step. In that case, the caller of this method is to lengthen the path along the center line of the target lane.- Parameters:
timeStep
- Duration; time stepplanDistance
- Length; distance covered during the operational planmeanSpeed
- Speed; mean speed during time stepfrom
- DirectedLanePosition; current position on the from-lanesstartPosition
- DirectedPoint; current 2D positionlaneChangeDirection
- LateralDirectionality; lane change directionfromLine
- OTSLine3D; from linetoLine
- OTSLine3D; to linelaneChangeDuration
- Duration; current considered duration of the entire lane changelcFraction
- double; fraction of lane change done so far- Returns:
- OTSLine3D a (partial) path for a lane change
- Throws:
OTSGeometryException
- on wrong fractional position
-
-