Interface RouteGeneratorOD
- All Known Implementing Classes:
RouteGeneratorOD.DefaultRouteGenerator
public interface RouteGeneratorOD
Generates a route by determining one. This class is different from
RouteGenerator
in that it has the origin,
destination and GTU type as input.
Copyright (c) 2013-2020 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 24 mrt. 2018
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
RouteGeneratorOD.DefaultRouteGenerator
Shortest route route generator. -
Field Summary
Fields Modifier and Type Field Description static java.util.Map<StreamInterface,RouteGeneratorOD>
DEFAULT_MAP
Cache of default route generators per stream.static RouteGeneratorOD
NULL
No route route generator. -
Method Summary
Modifier and Type Method Description static RouteGeneratorOD
getDefaultRouteSupplier(StreamInterface stream)
Returns a default route generator for shortest routes based on the given stream.Route
getRoute(Node origin, Node destination, GTUType gtuType)
Returns a route.
-
Field Details
-
NULL
No route route generator. -
DEFAULT_MAP
Cache of default route generators per stream.
-
-
Method Details
-
getDefaultRouteSupplier
Returns a default route generator for shortest routes based on the given stream.- Parameters:
stream
- StreamInterface; random number stream- 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
-