public class ProbabilisticFixedRouteGenerator extends Object implements RouteGenerator
Copyright (c) 2013-2014 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights
reserved.
BSD-style license. See OpenTrafficSim License.
| Constructor and Description |
|---|
ProbabilisticFixedRouteGenerator(SortedMap<RouteGenerator,Double> routeProbabilities)
Construct a new ProbabilisticFixedRouteGenerator using
System.currentTimeMillis() to seed the random
number generator. |
ProbabilisticFixedRouteGenerator(SortedMap<RouteGenerator,Double> routeProbabilities,
long seed)
Construct a new ProbabilisticFixedRouteGenerator.
|
public ProbabilisticFixedRouteGenerator(SortedMap<RouteGenerator,Double> routeProbabilities) throws NetworkException
System.currentTimeMillis() to seed the random
number generator.routeProbabilities - SortedMap<RouteGenerator, Double>; the RouteGenerators with the probabilities for
each one. In stead of probabilities, (observed) counts may be used; i.e. the provided values are
internally scaled to add up to 1.0.NetworkException - when the probabilities or frequencies are invalid (negative, or all zero)public ProbabilisticFixedRouteGenerator(SortedMap<RouteGenerator,Double> routeProbabilities, long seed) throws NetworkException
routeProbabilities - SortedMap<RouteGenerator, Double>; the RouteGenerators with the probabilities for
each one. In stead of probabilities, (observed) counts may be used; i.e. the provided values are
internally scaled to add up to 1.0.seed - long; the seed for the random number generator that will be usedNetworkException - when the probabilities or frequencies are invalid (negative, or all zero)public final Route generateRoute()
generateRoute in interface RouteGeneratorCopyright © 2014–2015 Delft University of Technology. All rights reserved.