public class ProbabilisticRouteGenerator extends Object implements RouteGenerator
Copyright (c) 2013-2015 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2016-01-03 08:35:30 +0100 (Sun, 03 Jan 2016) $, @version $Revision: 1680 $, by $Author: averbraeck $,
initial version 20 Mar 2015
| Modifier and Type | Class and Description |
|---|---|
static class |
ProbabilisticRouteGenerator.RouteProbability
Combination of route and probability or frequency, non-cumulative.
|
| Constructor and Description |
|---|
ProbabilisticRouteGenerator(List<ProbabilisticRouteGenerator.RouteProbability> routeProbabilities,
StreamInterface stream)
Construct a new ProbabilistiRouteGenerator using the given random stream.
|
public ProbabilisticRouteGenerator(List<ProbabilisticRouteGenerator.RouteProbability> routeProbabilities, StreamInterface stream) throws NetworkException
routeProbabilities - the Routes with the (non-cumulative) probabilities for each one. Instead of probabilities,
(observed) frequencies may be used; The provided values are internally normalized to add up to 1.0.stream - the random stream to useNetworkException - when the probabilities or frequencies are invalid (negative, or all zero)public final Route generateRoute()
generateRoute in interface RouteGeneratorCopyright © 2014–2016 Delft University of Technology. All rights reserved.