Interface LaneBasedTacticalPlanner
-
- All Superinterfaces:
TacticalPlanner<InternalLaneBasedGtu,LanePerception>
- All Known Implementing Classes:
AbstractIncentivesTacticalPlanner,AbstractLaneBasedTacticalPlanner,LaneBasedCFLCTacticalPlanner,LaneBasedGTUFollowingDirectedChangeTacticalPlanner,LaneBasedGTUFollowingTacticalPlanner,LMRS,SteeringLmrs,Toledo
public interface LaneBasedTacticalPlanner extends TacticalPlanner<InternalLaneBasedGtu,LanePerception>
Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
$LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version May 27, 2016
BSD-style license. See OpenTrafficSim License.- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
-
Field Summary
-
Fields inherited from interface org.opentrafficsim.core.gtu.plan.tactical.TacticalPlanner
TACTICAL_PLANNER
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description LanePathInfobuildLanePathInfo(Length maxHeadway)Build a list of lanes forward, with a maximum headway relative to the reference point of the GTU.LanePathInfobuildLanePathInfo(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.default LaneDirectionchooseLaneAtSplit(LaneDirection from, Set<LaneDirection> lanes)Selects a lane from a possible set.NextSplitInfodetermineNextSplit(Length maxHeadway)Calculate the next location where the network splits, with a maximum headway relative to the reference point of the GTU.CarFollowingModelgetCarFollowingModel()Returns the car-following model.static LaneDirectionmostOnSide(LaneDirection lane1, LaneDirection lane2, LateralDirectionality lat)Returns the right-most of two lanes.default LengthokDistance(LaneDirection lane, Length distance, Route route, Length maxDistance)Helper method for default chooseLaneAtSplit implementation that returns the distance from this lane onwards where the route can be followed.-
Methods inherited from interface org.opentrafficsim.core.gtu.plan.tactical.TacticalPlanner
generateOperationalPlan, getEgoGtu, getPerception
-
-
-
-
Method Detail
-
getCarFollowingModel
CarFollowingModel getCarFollowingModel()
Returns the car-following model.- Returns:
- car following model
-
chooseLaneAtSplit
default LaneDirection chooseLaneAtSplit(LaneDirection from, Set<LaneDirection> lanes) throws ParameterException
Selects a lane from a possible set. This set contains all viable lanes in to which a lanes splits.- Parameters:
from- LaneDirection; lane we come fromlanes- Set<LaneDirection>; set of lane directions possible- Returns:
- LaneDirection; preferred lane direction
- Throws:
ParameterException- in case of a missing parameter
-
okDistance
default Length okDistance(LaneDirection lane, Length distance, Route route, Length maxDistance)
Helper method for default chooseLaneAtSplit implementation that returns the distance from this lane onwards where the route can be followed.- Parameters:
lane- LaneDirection; lane and directiondistance- Length; distance so farroute- Route; routemaxDistance- Length; max search distance- Returns:
- Length; distance from this lane onwards where the route can be followed
-
mostOnSide
static LaneDirection mostOnSide(LaneDirection lane1, LaneDirection lane2, LateralDirectionality lat)
Returns the right-most of two lanes.- Parameters:
lane1- LaneDirection; lane 1lane2- LaneDirection; lane 2lat- LateralDirectionality; lateral side- Returns:
- LaneDirection; right-most of two lanes
-
buildLanePathInfo
LanePathInfo buildLanePathInfo(Length maxHeadway) throws GtuException, NetworkException
Build a list of lanes forward, with a maximum headway relative to the reference point of the GTU.- Parameters:
maxHeadway- Length; the maximum length for which lanes should be returned- Returns:
- LanePathInfo; an instance that provides the following information for an operational plan: the lanes to follow, and the path to follow when staying on the same lane.
- Throws:
GtuException- 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 route
-
buildLanePathInfo
LanePathInfo buildLanePathInfo(Length maxHeadway, Lane startLane, Length position, GtuDirectionality startDirectionality) throws GtuException, NetworkException
Build a list of lanes forward, with a maximum headway relative to the reference point of the GTU.- Parameters:
maxHeadway- 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 lane- Returns:
- LanePathInfo; an instance that provides the following information for an operational plan: the lanes to follow, and the path to follow when staying on the same lane.
- Throws:
GtuException- 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 route
-
determineNextSplit
NextSplitInfo determineNextSplit(Length maxHeadway) throws GtuException, NetworkException
Calculate the next location where the network splits, with a maximum headway relative to the reference point of the GTU. Note: a lane drop is also considered a split (!).- Parameters:
maxHeadway- Length; the maximum length for which lanes should be returned- Returns:
- NextSplitInfo; an instance that provides the following information for an operational plan: whether the network splits, the node where it splits, and the current lanes that lead to the right node after the split node.
- Throws:
GtuException- 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 route
-
-