Class LaneBasedStrategicalRoutePlanner
java.lang.Object
org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalRoutePlanner
- All Implemented Interfaces:
Serializable,StrategicalPlanner,LaneBasedStrategicalPlanner
public class LaneBasedStrategicalRoutePlanner
extends Object
implements LaneBasedStrategicalPlanner, Serializable
This is the standard strategical route planner with a fixed tactical planner. If no route is supplied, but there is a
destination, a route will be drawn from a
RouteGenerator, or using length-based shortest path if that is also not
specified. If the route is ever null, a route will be constructed from the origin to the current link, and from the
current link to the destination.
Copyright (c) 2013-2023 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:
-
Field Summary
Fields inherited from interface org.opentrafficsim.core.gtu.plan.strategical.StrategicalPlanner
STRATEGICAL_PLANNER -
Constructor Summary
ConstructorsConstructorDescriptionLaneBasedStrategicalRoutePlanner(LaneBasedTacticalPlanner fixedTacticalPlanner, Route route, LaneBasedGtu gtu, Node origin, Node destination, RouteGenerator routeGenerator) Constructor for a strategical planner with route.LaneBasedStrategicalRoutePlanner(LaneBasedTacticalPlanner fixedTacticalPlanner, LaneBasedGtu gtu) Constructor for a strategical planner without route. -
Method Summary
Modifier and TypeMethodDescriptionfinal Nodefinal LaneBasedGtugetGtu()final Nodefinal RoutegetRoute()final LaneBasedTacticalPlannergetTacticalPlanner(Time time) final Linkfinal StringtoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opentrafficsim.core.gtu.plan.strategical.StrategicalPlanner
nextNode
-
Constructor Details
-
LaneBasedStrategicalRoutePlanner
public LaneBasedStrategicalRoutePlanner(LaneBasedTacticalPlanner fixedTacticalPlanner, LaneBasedGtu gtu) throws GtuException Constructor 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, RouteGenerator routeGenerator) throws GtuException Constructor 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
-
getGtu
- Specified by:
getGtuin interfaceLaneBasedStrategicalPlanner- Specified by:
getGtuin interfaceStrategicalPlanner
-
getTacticalPlanner
- Specified by:
getTacticalPlannerin interfaceLaneBasedStrategicalPlanner- Specified by:
getTacticalPlannerin interfaceStrategicalPlanner
-
getTacticalPlanner
- Specified by:
getTacticalPlannerin interfaceLaneBasedStrategicalPlanner- Specified by:
getTacticalPlannerin interfaceStrategicalPlanner
-
nextLink
- Specified by:
nextLinkin interfaceStrategicalPlanner- Throws:
NetworkException
-
getRoute
- Specified by:
getRoutein interfaceStrategicalPlanner
-
getOrigin
- Specified by:
getOriginin interfaceStrategicalPlanner
-
getDestination
- Specified by:
getDestinationin interfaceStrategicalPlanner
-
toString
-