Class LaneBasedStrategicalRoutePlanner
- java.lang.Object
-
- org.opentrafficsim.road.gtu.strategical.AbstractLaneBasedStrategicalPlanner
-
- org.opentrafficsim.road.gtu.strategical.route.LaneBasedStrategicalRoutePlanner
-
- All Implemented Interfaces:
Serializable
,StrategicalPlanner
,LaneBasedStrategicalPlanner
public class LaneBasedStrategicalRoutePlanner extends AbstractLaneBasedStrategicalPlanner implements LaneBasedStrategicalPlanner, 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.
$LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Nov 26, 2015
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Node
getDestination()
Node
getOrigin()
Route
getRoute()
LaneBasedTacticalPlanner
getTacticalPlanner()
LaneBasedTacticalPlanner
getTacticalPlanner(Time time)
LinkDirection
nextLinkDirection(Link link, GTUDirectionality direction, GTUType gtuType)
LinkDirection
nextLinkDirection(Node node, Link previousLink, GTUType gtuType)
Node
nextNode(Link link, GTUDirectionality direction, GTUType gtuType)
Node
nextNode(Node node, Link previousLink, GTUType gtuType)
String
toString()
-
Methods inherited from class org.opentrafficsim.road.gtu.strategical.AbstractLaneBasedStrategicalPlanner
getGtu
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.opentrafficsim.road.gtu.strategical.LaneBasedStrategicalPlanner
getGtu
-
-
-
-
Constructor Detail
-
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) throws GTUException
Constructor 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 GTUException
Constructor 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 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 Detail
-
getTacticalPlanner
public final LaneBasedTacticalPlanner getTacticalPlanner()
- Specified by:
getTacticalPlanner
in interfaceLaneBasedStrategicalPlanner
- Specified by:
getTacticalPlanner
in interfaceStrategicalPlanner
-
getTacticalPlanner
public LaneBasedTacticalPlanner getTacticalPlanner(Time time)
- Specified by:
getTacticalPlanner
in interfaceLaneBasedStrategicalPlanner
- Specified by:
getTacticalPlanner
in interfaceStrategicalPlanner
-
nextNode
public final Node nextNode(Link link, GTUDirectionality direction, GTUType gtuType) throws NetworkException
- Specified by:
nextNode
in interfaceStrategicalPlanner
- Throws:
NetworkException
-
nextLinkDirection
public final LinkDirection nextLinkDirection(Link link, GTUDirectionality direction, GTUType gtuType) throws NetworkException
- Specified by:
nextLinkDirection
in interfaceStrategicalPlanner
- Throws:
NetworkException
-
nextNode
public final Node nextNode(Node node, Link previousLink, GTUType gtuType) throws NetworkException
- Specified by:
nextNode
in interfaceStrategicalPlanner
- Throws:
NetworkException
-
nextLinkDirection
public final LinkDirection nextLinkDirection(Node node, Link previousLink, GTUType gtuType) throws NetworkException
- Specified by:
nextLinkDirection
in interfaceStrategicalPlanner
- Throws:
NetworkException
-
getRoute
public final Route getRoute()
- Specified by:
getRoute
in interfaceStrategicalPlanner
-
getOrigin
public final Node getOrigin()
- Specified by:
getOrigin
in interfaceStrategicalPlanner
-
getDestination
public final Node getDestination()
- Specified by:
getDestination
in interfaceStrategicalPlanner
-
-