public abstract class AbstractLaneBasedTacticalPlanner extends Object implements LaneBasedTacticalPlanner, Serializable
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Constructor and Description |
---|
AbstractLaneBasedTacticalPlanner(CarFollowingModel carFollowingModel,
LaneBasedGTU gtu)
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 LaneBasedOperationalPlan |
buildPlanFromSimplePlan(LaneBasedGTU gtu,
org.djunits.value.vdouble.scalar.Time startTime,
org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristics bc,
SimpleOperationalPlan simplePlan,
LaneOperationalPlanBuilder.LaneChange laneChange)
Build an operational plan based on a simple operational plan and status info.
|
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()
Returns the perception.
|
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.
|
public AbstractLaneBasedTacticalPlanner(CarFollowingModel carFollowingModel, LaneBasedGTU gtu)
carFollowingModel
- car-following modelgtu
- GTUpublic final LaneBasedGTU getGtu()
getGtu
in interface org.opentrafficsim.core.gtu.plan.tactical.TacticalPlanner
getGtu
in interface LaneBasedTacticalPlanner
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 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 LaneBasedTacticalPlanner
public 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
getPerception
in interface LaneBasedTacticalPlanner
public static LaneBasedOperationalPlan buildPlanFromSimplePlan(LaneBasedGTU gtu, org.djunits.value.vdouble.scalar.Time startTime, org.opentrafficsim.core.gtu.behavioralcharacteristics.BehavioralCharacteristics bc, SimpleOperationalPlan simplePlan, LaneOperationalPlanBuilder.LaneChange laneChange) throws org.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException, org.opentrafficsim.core.gtu.GTUException, org.opentrafficsim.core.network.NetworkException, org.opentrafficsim.core.gtu.plan.operational.OperationalPlanException
gtu
- gtustartTime
- start time for planbc
- behavioral characteristicssimplePlan
- simple operational planlaneChange
- lane change statusorg.opentrafficsim.core.gtu.behavioralcharacteristics.ParameterException
- if parameter is not definedorg.opentrafficsim.core.gtu.GTUException
- gtu exceptionorg.opentrafficsim.core.network.NetworkException
- network exceptionorg.opentrafficsim.core.gtu.plan.operational.OperationalPlanException
- operational plan exeptionCopyright © 2014–2016 Delft University of Technology. All rights reserved.