public abstract class AbstractLaneBasedTacticalPlanner extends Object implements LaneBasedTacticalPlanner, 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.
Modifier and Type | Field and Description |
---|---|
protected static ParameterTypeDuration |
DT
Time step parameter type.
|
protected static ParameterTypeLength |
LOOKAHEAD
Look ahead parameter type.
|
static ParameterTypeClass<LaneBasedTacticalPlanner> |
TACTICAL_PLANNER
Tactical planner parameter.
|
Constructor and Description |
---|
AbstractLaneBasedTacticalPlanner(CarFollowingModel carFollowingModel,
LaneBasedGTU gtu,
LanePerception lanePerception)
Instantiates a tactical planner.
|
Modifier and Type | Method and Description |
---|---|
static LanePathInfo |
buildLanePathInfo(LaneBasedGTU gtu,
Length maxHeadway)
Build a list of lanes forward, with a maximum headway relative to the reference point of the GTU.
|
static LanePathInfo |
buildLanePathInfo(LaneBasedGTU gtu,
Length maxHeadway,
Lane startLane,
Length position,
GTUDirectionality startDirectionality)
Build a list of lanes forward, with a maximum headway relative to the reference point of the GTU.
|
protected static List<LinkDirection> |
buildLinkListForward(LaneBasedGTU gtu,
Length maxHeadway)
Make a list of links on which to drive next, with a maximum headway relative to the reference point of the GTU.
|
static OTSLine3D |
concatenateNull(OTSLine3D path,
OTSLine3D centerLine)
Concatenate two paths, where the first may be
null . |
protected static boolean |
connectsToPath(LaneBasedGTU gtu,
Length maxHeadway,
Lane startLane,
Length startLanePosition,
GTUDirectionality startDirectionality,
Link linkAfterSplit)
Determine whether the lane is directly connected to our route, in other words: if we would (continue to) drive on the
given lane, can we take the right branch at the nextSplitNode without switching lanes?
|
static NextSplitInfo |
determineNextSplit(LaneBasedGTU gtu,
Length maxHeadway)
Calculate the next location where the network splits, with a maximum headway relative to the reference point of the GTU.
|
CarFollowingModel |
getCarFollowingModel()
Returns the car-following model.
|
LaneBasedGTU |
getGtu() |
LanePerception |
getPerception() |
protected static boolean |
noLaneDrop(LaneBasedGTU gtu,
Length maxHeadway,
Lane startLane,
Length startLanePosition,
GTUDirectionality startDirectionality)
Determine whether the lane does not drop, in other words: if we would (continue to) drive on the given lane, can we
continue to drive at the nextSplitNode without switching lanes?
|
void |
setCarFollowingModel(CarFollowingModel carFollowingModel)
Sets the car-following model.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
chooseLaneAtSplit, okDistance, rightMost
generateOperationalPlan
public static final ParameterTypeClass<LaneBasedTacticalPlanner> TACTICAL_PLANNER
protected static final ParameterTypeLength LOOKAHEAD
protected static final ParameterTypeDuration DT
public AbstractLaneBasedTacticalPlanner(CarFollowingModel carFollowingModel, LaneBasedGTU gtu, LanePerception lanePerception)
carFollowingModel
- car-following modelgtu
- GTUlanePerception
- perceptionpublic final LaneBasedGTU getGtu()
getGtu
in interface TacticalPlanner<LaneBasedGTU,LanePerception>
public static LanePathInfo buildLanePathInfo(LaneBasedGTU gtu, Length maxHeadway) throws GTUException, NetworkException
gtu
- LaneBasedGTU; the GTU for which to calculate the lane listmaxHeadway
- Length; the maximum length for which lanes should be returnedGTUException
- when the vehicle is not on one of the lanes on which it is registeredNetworkException
- when the strategic planner is not able to return a next node in the routepublic static LanePathInfo buildLanePathInfo(LaneBasedGTU gtu, Length maxHeadway, Lane startLane, Length position, GTUDirectionality startDirectionality) throws GTUException, NetworkException
gtu
- LaneBasedGTU; the GTU for which to calculate the lane listmaxHeadway
- Length; the maximum length for which lanes should be returnedstartLane
- Lane; the lane in which the path startsposition
- Length; the position on the start lanestartDirectionality
- GTUDirectionality; the driving direction on the start laneGTUException
- when the vehicle is not on one of the lanes on which it is registeredNetworkException
- when the strategic planner is not able to return a next node in the routeGTUException
- when the vehicle is not on one of the lanes on which it is registeredNetworkException
- when the strategic planner is not able to return a next node in the routepublic static OTSLine3D concatenateNull(OTSLine3D path, OTSLine3D centerLine) throws OTSGeometryException
null
.path
- path, may be null
centerLine
- center line of lane to addOTSGeometryException
- when lines are degenerate or too distantpublic static NextSplitInfo determineNextSplit(LaneBasedGTU gtu, Length maxHeadway) throws GTUException, NetworkException
gtu
- LaneBasedGTU; the GTU for which to calculate the lane listmaxHeadway
- Length; the maximum length for which lanes should be returnedGTUException
- when the vehicle is not on one of the lanes on which it is registeredNetworkException
- when the strategic planner is not able to return a next node in the routeprotected static boolean connectsToPath(LaneBasedGTU gtu, Length maxHeadway, Lane startLane, Length startLanePosition, GTUDirectionality startDirectionality, Link linkAfterSplit) throws GTUException, NetworkException
gtu
- LaneBasedGTU; the GTU for which we have to determine the lane suitabilitymaxHeadway
- Length; the maximum length for use in the calculationstartLane
- Lane; the first lane in the liststartLanePosition
- Length; the position on the start lanestartDirectionality
- GTUDirectionality; the driving direction on the start lanelinkAfterSplit
- Link; the link after the split to which we should connectGTUException
- when the vehicle is not on one of the lanes on which it is registeredNetworkException
- when the strategic planner is not able to return a next node in the routeprotected static boolean noLaneDrop(LaneBasedGTU gtu, Length maxHeadway, Lane startLane, Length startLanePosition, GTUDirectionality startDirectionality) throws GTUException, NetworkException
gtu
- LaneBasedGTU; the GTU for which we have to determine the lane suitabilitymaxHeadway
- Length; the maximum length for use in the calculationstartLane
- Lane; the first lane in the liststartLanePosition
- Length; the position on the start lanestartDirectionality
- GTUDirectionality; the driving direction on the start laneGTUException
- when the vehicle is not on one of the lanes on which it is registeredNetworkException
- when the strategic planner is not able to return a next node in the routeprotected static List<LinkDirection> buildLinkListForward(LaneBasedGTU gtu, Length maxHeadway) throws GTUException, NetworkException
gtu
- LaneBasedGTU; the GTU for which to calculate the link listmaxHeadway
- Length; the maximum length for which links should be returnedGTUException
- when the vehicle is not on one of the lanes on which it is registeredNetworkException
- when the strategic planner is not able to return a next node in the routepublic final CarFollowingModel getCarFollowingModel()
getCarFollowingModel
in interface LaneBasedTacticalPlanner
public final void setCarFollowingModel(CarFollowingModel carFollowingModel)
carFollowingModel
- Car-following model to set.public final LanePerception getPerception()
getPerception
in interface TacticalPlanner<LaneBasedGTU,LanePerception>
Copyright © 2014–2018 Delft University of Technology. All rights reserved.