Class LaneBasedStrategicalRoutePlanner
java.lang.Object
org.opentrafficsim.road.gtu.strategical.AbstractLaneBasedStrategicalPlanner
org.opentrafficsim.road.gtu.strategical.route.LaneBasedStrategicalRoutePlanner
- All Implemented Interfaces:
java.io.Serializable,StrategicalPlanner,LaneBasedStrategicalPlanner
public class LaneBasedStrategicalRoutePlanner extends AbstractLaneBasedStrategicalPlanner implements LaneBasedStrategicalPlanner, java.io.Serializable
Strategical planner, route-based, with personal driving characteristics, which contain settings for the tactical planner. The
tactical planner will only consult the route when the GTU has multiple possibilities on a node, so the route does not have to
be complete. As long as all 'splitting' nodes are part of the route and have a valid successor node (connected by a Link),
the strategical planner is able to make a plan.
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.
- Author:
- Alexander Verbraeck, Peter Knoppers
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from interface org.opentrafficsim.core.gtu.plan.strategical.StrategicalPlanner
STRATEGICAL_PLANNER -
Constructor Summary
Constructors Constructor Description LaneBasedStrategicalRoutePlanner(LaneBasedTacticalPlanner fixedTacticalPlanner, Route route, LaneBasedGTU gtu, Node origin, Node destination)Constructor for a strategical planner with route.LaneBasedStrategicalRoutePlanner(LaneBasedTacticalPlanner fixedTacticalPlanner, Route route, LaneBasedGTU gtu, Node origin, Node destination, RouteGeneratorOD routeGenerator)Constructor for a strategical planner with route.LaneBasedStrategicalRoutePlanner(LaneBasedTacticalPlanner fixedTacticalPlanner, LaneBasedGTU gtu)Constructor for a strategical planner without route.LaneBasedStrategicalRoutePlanner(LaneBasedTacticalPlanner fixedTacticalPlanner, LaneBasedGTU gtu, Node origin, Node destination, RouteGeneratorOD routeGenerator)Constructor for a strategical planner with route generator. -
Method Summary
Modifier and Type Method Description NodegetDestination()NodegetOrigin()RoutegetRoute()LaneBasedTacticalPlannergetTacticalPlanner()LaneBasedTacticalPlannergetTacticalPlanner(Time time)LinkDirectionnextLinkDirection(Link link, GTUDirectionality direction, GTUType gtuType)LinkDirectionnextLinkDirection(Node node, Link previousLink, GTUType gtuType)NodenextNode(Link link, GTUDirectionality direction, GTUType gtuType)NodenextNode(Node node, Link previousLink, GTUType gtuType)java.lang.StringtoString()Methods inherited from class org.opentrafficsim.road.gtu.strategical.AbstractLaneBasedStrategicalPlanner
getGtuMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalPlanner
getGtu
-
Constructor Details
-
LaneBasedStrategicalRoutePlanner
public LaneBasedStrategicalRoutePlanner(LaneBasedTacticalPlanner fixedTacticalPlanner, LaneBasedGTU gtu) throws GTUExceptionConstructor for a strategical planner without route. This can only be used if the network does not have splits, or split fractions are used.- Parameters:
fixedTacticalPlanner- LaneBasedTacticalPlanner; the tactical planner to use for the GTUgtu- LaneBasedGTU; GTU- Throws:
GTUException- if fixed tactical planner == null
-
LaneBasedStrategicalRoutePlanner
public LaneBasedStrategicalRoutePlanner(LaneBasedTacticalPlanner fixedTacticalPlanner, Route route, LaneBasedGTU gtu, Node origin, Node destination) throws GTUExceptionConstructor for a strategical planner with route.- Parameters:
fixedTacticalPlanner- LaneBasedTacticalPlanner; the tactical planner to use for the GTUroute- Route; the route to drivegtu- LaneBasedGTU; GTUorigin- Node; origin nodedestination- Node; destination node- Throws:
GTUException- if fixed tactical planner == null
-
LaneBasedStrategicalRoutePlanner
public LaneBasedStrategicalRoutePlanner(LaneBasedTacticalPlanner fixedTacticalPlanner, LaneBasedGTU gtu, Node origin, Node destination, RouteGeneratorOD routeGenerator) throws GTUExceptionConstructor for a strategical planner with route generator.- Parameters:
fixedTacticalPlanner- LaneBasedTacticalPlanner; the tactical planner to use for the GTUgtu- LaneBasedGTU; GTUorigin- Node; origin nodedestination- Node; destination noderouteGenerator- RouteGeneratorOD; route generator- Throws:
GTUException- if fixed tactical planner == null
-
LaneBasedStrategicalRoutePlanner
public LaneBasedStrategicalRoutePlanner(LaneBasedTacticalPlanner fixedTacticalPlanner, Route route, LaneBasedGTU gtu, Node origin, Node destination, RouteGeneratorOD routeGenerator) throws GTUExceptionConstructor for a strategical planner with route. If the route isnull, a shortest path to the destination is derived.- Parameters:
fixedTacticalPlanner- LaneBasedTacticalPlanner; the tactical planner to use for the GTUroute- Route; the route to drivegtu- LaneBasedGTU; GTUorigin- Node; origin nodedestination- Node; destination noderouteGenerator- RouteGeneratorOD; route generator- Throws:
GTUException- if fixed tactical planner == null
-
-
Method Details
-
getTacticalPlanner
- Specified by:
getTacticalPlannerin interfaceLaneBasedStrategicalPlanner- Specified by:
getTacticalPlannerin interfaceStrategicalPlanner
-
getTacticalPlanner
- Specified by:
getTacticalPlannerin interfaceLaneBasedStrategicalPlanner- Specified by:
getTacticalPlannerin interfaceStrategicalPlanner
-
nextNode
public final Node nextNode(Link link, GTUDirectionality direction, GTUType gtuType) throws NetworkException- Specified by:
nextNodein interfaceStrategicalPlanner- Throws:
NetworkException
-
nextLinkDirection
public final LinkDirection nextLinkDirection(Link link, GTUDirectionality direction, GTUType gtuType) throws NetworkException- Specified by:
nextLinkDirectionin interfaceStrategicalPlanner- Throws:
NetworkException
-
nextNode
- Specified by:
nextNodein interfaceStrategicalPlanner- Throws:
NetworkException
-
nextLinkDirection
public final LinkDirection nextLinkDirection(Node node, Link previousLink, GTUType gtuType) throws NetworkException- Specified by:
nextLinkDirectionin interfaceStrategicalPlanner- Throws:
NetworkException
-
getRoute
- Specified by:
getRoutein interfaceStrategicalPlanner
-
getOrigin
- Specified by:
getOriginin interfaceStrategicalPlanner
-
getDestination
- Specified by:
getDestinationin interfaceStrategicalPlanner
-
toString
public final java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-