Interface StrategicalPlanner
-
public interface StrategicalPlanner
A 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-2022 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_PLANNER
Parameter type for strategical planner.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Node
getDestination()
Returns the destination.GTU
getGtu()
Returns the GTU.Node
getOrigin()
Returns the origin.Route
getRoute()
Returns the route.TacticalPlanner<?,?>
getTacticalPlanner()
Get tactical planner for the GTU.TacticalPlanner<?,?>
getTacticalPlanner(Time time)
Get tactical planner for the GTU.LinkDirection
nextLinkDirection(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.LinkDirection
nextLinkDirection(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.Node
nextNode(Link link, GTUDirectionality direction, GTUType gtuType)
Determine the next node in a network based on a current Link we are on.Node
nextNode(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
-
getGtu
GTU getGtu()
Returns the GTU.- Returns:
- GTU
-
getRoute
Route getRoute()
Returns the route.- Returns:
- route, may be null
-
getOrigin
Node getOrigin()
Returns the origin.- Returns:
- origin, may be null
-
getDestination
Node getDestination()
Returns the destination.- Returns:
- destination, may be null
-
getTacticalPlanner
TacticalPlanner<?,?> getTacticalPlanner()
Get tactical planner for the GTU. The stratigical planner is free to dynamically change this.- Returns:
- tactical planner
-
getTacticalPlanner
TacticalPlanner<?,?> getTacticalPlanner(Time time)
Get tactical planner for the GTU. The stratigical planner is free to dynamically change this.- Parameters:
time
- Time; time at which to obtain the tactical planner- Returns:
- tactical planner
-
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
-
-