Interface RouteGenerator

All Known Implementing Classes:
RouteGenerator.DefaultRouteGenerator

public interface RouteGenerator
Generates a route by determining one. This class is different from Generator<Route> in that it has the origin, destination and GTU type as input.

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

Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Shortest route route generator.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.djutils.multikeymap.MultiKeyMap<RouteGenerator>
    Cache of default route generators per stream and link-weight.
    static final RouteGenerator
    No route route generator.
  • Method Summary

    Modifier and Type
    Method
    Description
    getDefaultRouteSupplier(nl.tudelft.simulation.jstats.streams.StreamInterface stream, LinkWeight linkWeight)
    Returns a default route generator for shortest routes based on the given stream.
    getRoute(Node origin, Node destination, GtuType gtuType)
    Returns a route.
  • Field Details

    • NULL

      static final RouteGenerator NULL
      No route route generator.
    • DEFAULT_SUPPLIERS

      static final org.djutils.multikeymap.MultiKeyMap<RouteGenerator> DEFAULT_SUPPLIERS
      Cache of default route generators per stream and link-weight.
  • Method Details

    • getDefaultRouteSupplier

      static RouteGenerator getDefaultRouteSupplier(nl.tudelft.simulation.jstats.streams.StreamInterface stream, LinkWeight linkWeight)
      Returns a default route generator for shortest routes based on the given stream.
      Parameters:
      stream - StreamInterface; random number stream
      linkWeight - LinkWeight; link weight.
      Returns:
      RouteSupplier; default route generator for shortest routes based on the given stream
    • getRoute

      Route getRoute(Node origin, Node destination, GtuType gtuType)
      Returns a route.
      Parameters:
      origin - Node; origin
      destination - Node; destination
      gtuType - GtuType; gtu type
      Returns:
      Route; route