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
Modifier and TypeInterfaceDescriptionstatic class
Shortest route route generator. -
Field Summary
Modifier and TypeFieldDescriptionstatic 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 TypeMethodDescriptionstatic RouteGenerator
getDefaultRouteSupplier
(nl.tudelft.simulation.jstats.streams.StreamInterface stream, LinkWeight linkWeight) Returns a default route generator for shortest routes based on the given stream.Returns a route.
-
Field Details
-
NULL
No route route generator. -
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 streamlinkWeight
- LinkWeight; link weight.- Returns:
- RouteSupplier; default route generator for shortest routes based on the given stream
-
getRoute
Returns a route.- Parameters:
origin
- Node; origindestination
- Node; destinationgtuType
- GtuType; gtu type- Returns:
- Route; route
-