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-2024 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
ConstructorDescriptionLaneBasedStrategicalRoutePlanner
(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 Node
final LaneBasedGtu
getGtu()
final Node
final Route
getRoute()
final LaneBasedTacticalPlanner
getTacticalPlanner
(org.djunits.value.vdouble.scalar.Time time) final Link
final String
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
getGtu
in interfaceLaneBasedStrategicalPlanner
- Specified by:
getGtu
in interfaceStrategicalPlanner
-
getTacticalPlanner
- Specified by:
getTacticalPlanner
in interfaceLaneBasedStrategicalPlanner
- Specified by:
getTacticalPlanner
in interfaceStrategicalPlanner
-
getTacticalPlanner
- Specified by:
getTacticalPlanner
in interfaceLaneBasedStrategicalPlanner
- Specified by:
getTacticalPlanner
in interfaceStrategicalPlanner
-
nextLink
- Specified by:
nextLink
in interfaceStrategicalPlanner
- Throws:
NetworkException
-
getRoute
- Specified by:
getRoute
in interfaceStrategicalPlanner
-
getOrigin
- Specified by:
getOrigin
in interfaceStrategicalPlanner
-
getDestination
- Specified by:
getDestination
in interfaceStrategicalPlanner
-
toString
-