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.
    BSD-style license. See OpenTrafficSim License.

    $LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Nov 14, 2015
    Author:
    Alexander Verbraeck, Peter Knoppers
    • 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 on
        direction - GTUDirectionality; the direction the GTU is driving on the link
        gtuType - 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 on
        direction - GTUDirectionality; the direction the GTU is driving on the link
        gtuType - 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 successor
        previousLink - 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 GTU
        previousLink - Link; the link before the node to avoid U-turn
        gtuType - 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