public abstract class AbstractLaneBasedTacticalPlanner extends Object implements LaneBasedTacticalPlanner, Serializable
Copyright (c) 2013-2017 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 org.opentrafficsim.base.parameters.ParameterTypeDuration |
DT
Time step parameter type.
|
protected static org.opentrafficsim.base.parameters.ParameterTypeLength |
LOOKAHEAD
Look ahead parameter type.
|
static org.opentrafficsim.base.parameters.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,
org.djunits.value.vdouble.scalar.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,
org.djunits.value.vdouble.scalar.Length maxHeadway,
Lane startLane,
org.djunits.value.vdouble.scalar.Length position,
org.opentrafficsim.core.gtu.GTUDirectionality startDirectionality)
Build a list of lanes forward, with a maximum headway relative to the reference point of the GTU.
|
protected static List<org.opentrafficsim.core.network.LinkDirection> |
buildLinkListForward(LaneBasedGTU gtu,
org.djunits.value.vdouble.scalar.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 org.opentrafficsim.core.geometry.OTSLine3D |
concatenateNull(org.opentrafficsim.core.geometry.OTSLine3D path,
org.opentrafficsim.core.geometry.OTSLine3D centerLine)
Concatenate two paths, where the first may be
null. |
protected static boolean |
connectsToPath(LaneBasedGTU gtu,
org.djunits.value.vdouble.scalar.Length maxHeadway,
Lane startLane,
org.djunits.value.vdouble.scalar.Length startLanePosition,
org.opentrafficsim.core.gtu.GTUDirectionality startDirectionality,
org.opentrafficsim.core.network.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,
org.djunits.value.vdouble.scalar.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,
org.djunits.value.vdouble.scalar.Length maxHeadway,
Lane startLane,
org.djunits.value.vdouble.scalar.Length startLanePosition,
org.opentrafficsim.core.gtu.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, waitchooseLaneAtSplit, okDistance, rightMostpublic static final org.opentrafficsim.base.parameters.ParameterTypeClass<LaneBasedTacticalPlanner> TACTICAL_PLANNER
protected static final org.opentrafficsim.base.parameters.ParameterTypeLength LOOKAHEAD
protected static final org.opentrafficsim.base.parameters.ParameterTypeDuration DT
public AbstractLaneBasedTacticalPlanner(CarFollowingModel carFollowingModel, LaneBasedGTU gtu, LanePerception lanePerception)
carFollowingModel - car-following modelgtu - GTUlanePerception - perceptionpublic final LaneBasedGTU getGtu()
getGtu in interface org.opentrafficsim.core.gtu.plan.tactical.TacticalPlanner<LaneBasedGTU,LanePerception>public static LanePathInfo buildLanePathInfo(LaneBasedGTU gtu, org.djunits.value.vdouble.scalar.Length maxHeadway) throws org.opentrafficsim.core.gtu.GTUException, org.opentrafficsim.core.network.NetworkException
gtu - LaneBasedGTU; the GTU for which to calculate the lane listmaxHeadway - Length; the maximum length for which lanes should be returnedorg.opentrafficsim.core.gtu.GTUException - when the vehicle is not on one of the lanes on which it is registeredorg.opentrafficsim.core.network.NetworkException - when the strategic planner is not able to return a next node in the routepublic static LanePathInfo buildLanePathInfo(LaneBasedGTU gtu, org.djunits.value.vdouble.scalar.Length maxHeadway, Lane startLane, org.djunits.value.vdouble.scalar.Length position, org.opentrafficsim.core.gtu.GTUDirectionality startDirectionality) throws org.opentrafficsim.core.gtu.GTUException, org.opentrafficsim.core.network.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 laneorg.opentrafficsim.core.gtu.GTUException - when the vehicle is not on one of the lanes on which it is registeredorg.opentrafficsim.core.network.NetworkException - when the strategic planner is not able to return a next node in the routeorg.opentrafficsim.core.gtu.GTUException - when the vehicle is not on one of the lanes on which it is registeredorg.opentrafficsim.core.network.NetworkException - when the strategic planner is not able to return a next node in the routepublic static org.opentrafficsim.core.geometry.OTSLine3D concatenateNull(org.opentrafficsim.core.geometry.OTSLine3D path,
org.opentrafficsim.core.geometry.OTSLine3D centerLine)
throws org.opentrafficsim.core.geometry.OTSGeometryException
null.path - path, may be nullcenterLine - center line of lane to addorg.opentrafficsim.core.geometry.OTSGeometryException - when lines are degenerate or too distantpublic static NextSplitInfo determineNextSplit(LaneBasedGTU gtu, org.djunits.value.vdouble.scalar.Length maxHeadway) throws org.opentrafficsim.core.gtu.GTUException, org.opentrafficsim.core.network.NetworkException
gtu - LaneBasedGTU; the GTU for which to calculate the lane listmaxHeadway - Length; the maximum length for which lanes should be returnedorg.opentrafficsim.core.gtu.GTUException - when the vehicle is not on one of the lanes on which it is registeredorg.opentrafficsim.core.network.NetworkException - when the strategic planner is not able to return a next node in the routeprotected static boolean connectsToPath(LaneBasedGTU gtu, org.djunits.value.vdouble.scalar.Length maxHeadway, Lane startLane, org.djunits.value.vdouble.scalar.Length startLanePosition, org.opentrafficsim.core.gtu.GTUDirectionality startDirectionality, org.opentrafficsim.core.network.Link linkAfterSplit) throws org.opentrafficsim.core.gtu.GTUException, org.opentrafficsim.core.network.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 connectorg.opentrafficsim.core.gtu.GTUException - when the vehicle is not on one of the lanes on which it is registeredorg.opentrafficsim.core.network.NetworkException - when the strategic planner is not able to return a next node in the routeprotected static boolean noLaneDrop(LaneBasedGTU gtu, org.djunits.value.vdouble.scalar.Length maxHeadway, Lane startLane, org.djunits.value.vdouble.scalar.Length startLanePosition, org.opentrafficsim.core.gtu.GTUDirectionality startDirectionality) throws org.opentrafficsim.core.gtu.GTUException, org.opentrafficsim.core.network.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 laneorg.opentrafficsim.core.gtu.GTUException - when the vehicle is not on one of the lanes on which it is registeredorg.opentrafficsim.core.network.NetworkException - when the strategic planner is not able to return a next node in the routeprotected static List<org.opentrafficsim.core.network.LinkDirection> buildLinkListForward(LaneBasedGTU gtu, org.djunits.value.vdouble.scalar.Length maxHeadway) throws org.opentrafficsim.core.gtu.GTUException, org.opentrafficsim.core.network.NetworkException
gtu - LaneBasedGTU; the GTU for which to calculate the link listmaxHeadway - Length; the maximum length for which links should be returnedorg.opentrafficsim.core.gtu.GTUException - when the vehicle is not on one of the lanes on which it is registeredorg.opentrafficsim.core.network.NetworkException - when the strategic planner is not able to return a next node in the routepublic final CarFollowingModel getCarFollowingModel()
getCarFollowingModel in interface LaneBasedTacticalPlannerpublic final void setCarFollowingModel(CarFollowingModel carFollowingModel)
carFollowingModel - Car-following model to set.public final LanePerception getPerception()
getPerception in interface org.opentrafficsim.core.gtu.plan.tactical.TacticalPlanner<LaneBasedGTU,LanePerception>Copyright © 2014–2018 Delft University of Technology. All rights reserved.