Interface StrategicalPlanner
-
public interface StrategicalPlannerA strategicalPlanner is the planner responsible for the overall 'mission' of the GTU, usually indicating where it needs to go. It operates by instantiating tactical planners to do the actual work, which is generating operational plans (paths over time) to follow to reach the destination that the strategical plan is aware of.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 14, 2015
BSD-style license. See OpenTrafficSim License.- Author:
- Alexander Verbraeck, Peter Knoppers
-
-
Field Summary
Fields Modifier and Type Field Description static ParameterTypeClass<StrategicalPlanner>STRATEGICAL_PLANNERParameter type for strategical planner.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NodegetDestination()Retrieve the destination.GtugetEgoGtu()Retrieve the GTU that 'owns' this strategical planner.NodegetOrigin()Retrieve the origin.RoutegetRoute()Retrieve the route.TacticalPlanner<?,?>getTacticalPlanner()Get tactical planner for the GTU.TacticalPlanner<?,?>getTacticalPlanner(Time time)Get tactical planner for the GTU at a specific time.LinkDirectionnextLinkDirection(Link link, GtuDirectionality direction, GtuType gtuType)Determine the next link and driving direction (with or against the design line) in a network based on a current Link we are on.LinkDirectionnextLinkDirection(Node node, Link previousLink, GtuType gtuType)Determine the next link and driving direction (with or against the design line) in a network based on a node and a driving direction of the GTU.NodenextNode(Link link, GtuDirectionality direction, GtuType gtuType)Determine the next node in a network based on a current Link we are on.NodenextNode(Node node, Link previousLink, GtuType gtuType)Determine the next node in a network based on a given node.
-
-
-
Field Detail
-
STRATEGICAL_PLANNER
static final ParameterTypeClass<StrategicalPlanner> STRATEGICAL_PLANNER
Parameter type for strategical planner.
-
-
Method Detail
-
getEgoGtu
Gtu getEgoGtu()
Retrieve the GTU that 'owns' this strategical planner.- Returns:
- GTU
-
getRoute
Route getRoute()
Retrieve the route.- Returns:
- route, may be null
-
getOrigin
Node getOrigin()
Retrieve the origin.- Returns:
- origin, may be null
-
getDestination
Node getDestination()
Retrieve the destination.- Returns:
- destination, may be null
-
getTacticalPlanner
TacticalPlanner<?,?> getTacticalPlanner()
Get tactical planner for the GTU. The strategical planner is free to dynamically change this.- Returns:
- TacticalPlanner<?, ?>; the tactical planner
-
getTacticalPlanner
TacticalPlanner<?,?> getTacticalPlanner(Time time)
Get tactical planner for the GTU at a specific time. The strategical planner is free to dynamically change this.- Parameters:
time- Time; time at which to obtain the tactical planner- Returns:
- TacticalPlanner<?, ?>; the tactical planner at the specified time
-
nextNode
Node nextNode(Link link, GtuDirectionality direction, GtuType gtuType) throws NetworkException
Determine the next node in a network based on a current Link we are on.- Parameters:
link- Link; the link we are ondirection- GtuDirectionality; the direction the GTU is driving on the linkgtuType- GtuType; the GTUType to determine the next node for- Returns:
- Node; the next node in the route AFTER the current link
- Throws:
NetworkException- when no route planner is present or the final node in the current link cannot be found in the route
-
nextLinkDirection
LinkDirection nextLinkDirection(Link link, GtuDirectionality direction, GtuType gtuType) throws NetworkException
Determine the next link and driving direction (with or against the design line) in a network based on a current Link we are on.- Parameters:
link- Link; the link we are ondirection- GtuDirectionality; the direction the GTU is driving on the linkgtuType- GtuType; the GTUType to determine the next node for- Returns:
- LinkDirection; the next link and GTU direction in the route AFTER the current link
- Throws:
NetworkException- when no route planner is present or the final node in the current link cannot be found in the route
-
nextNode
Node nextNode(Node node, Link previousLink, GtuType gtuType) throws NetworkException
Determine the next node in a network based on a given node.- Parameters:
node- Node; the node for which we want to find the successorpreviousLink- Link; the link before the node (needed to avoid making a U-turn)gtuType- GtuType; the GTUType to determine the next node for- Returns:
- Node; the next node in the route AFTER the current node
- Throws:
NetworkException- when no route planner is present or the node cannot be found in the route of the GTU
-
nextLinkDirection
LinkDirection nextLinkDirection(Node node, Link previousLink, GtuType gtuType) throws NetworkException
Determine the next link and driving direction (with or against the design line) in a network based on a node and a driving direction of the GTU.- Parameters:
node- Node; the node for which we want to find the successor in the driving direction of the GTUpreviousLink- Link; the link before the node to avoid U-turngtuType- GtuType; the GTUType to determine the next node for- Returns:
- LinkDirection; the next link and GTU direction in the route AFTER the current link
- Throws:
NetworkException- when no route planner is present or the final node in the current link cannot be found in the route
-
-