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 ClassesModifier and TypeInterfaceDescriptionstatic class
Shortest route route generator. -
Field Summary
FieldsModifier 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
- random number streamlinkWeight
- link weight.- Returns:
- default route generator for shortest routes based on the given stream
-
getRoute
Returns a route.- Parameters:
origin
- origindestination
- destinationgtuType
- gtu type- Returns:
- route
-