Class DefaultRouteSystem

  • All Implemented Interfaces:
    RouteSystem

    public class DefaultRouteSystem
    extends Object
    implements RouteSystem
    Default route system. This system stores a set for each combination of a Lane, GTUDirectionality, Route and GTUType. The set provides route information over a given distance beyond the end of the lane. If more distance is required, the set is recalculated. If less is required, a subset is returned. Distances in the returned route information are adjusted for the specific position of the GTU.

    Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
    BSD-style license. See OpenTrafficSim License.

    Version:
    $Revision$, $LastChangedDate$, by $Author$, initial version 7 nov. 2019
    Author:
    Alexander Verbraeck, Peter Knoppers, Wouter Schakel
    • Constructor Detail

      • DefaultRouteSystem

        public DefaultRouteSystem()
    • Method Detail

      • getLaneChangeInfo

        public SortedSet<LaneChangeInfo> getLaneChangeInfo​(DirectedLanePosition position,
                                                           Length front,
                                                           Route route,
                                                           GTUType gtuType,
                                                           Length distance)
        Returns lane change information from a position over a given length, according to a route and GTU type. The distance concerns the distance within which the lane change has to be performed. Due to lane markings, the actual split may be beyond the distance.
        Specified by:
        getLaneChangeInfo in interface RouteSystem
        Parameters:
        position - DirectedLanePosition; position
        front - Length; distance required for the front (relative to reference position)
        route - Route; route, may be null
        gtuType - GTUType; GTU type
        distance - Length; distance over which required lane changes are desired to be known
        Returns:
        SortedSet<LaneChangeInfo>; lane change information