public class ProbabilisticRouteGenerator extends Object implements RouteGenerator, Serializable
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2019-01-06 01:35:05 +0100 (Sun, 06 Jan 2019) $, @version $Revision: 4831 $, by $Author: averbraeck $,
initial version 20 Mar 2015
| Constructor and Description |
|---|
ProbabilisticRouteGenerator(List<Distribution.FrequencyAndObject<Route>> generators,
StreamInterface stream)
Create a new Probabilistic Route Generator.
|
public ProbabilisticRouteGenerator(List<Distribution.FrequencyAndObject<Route>> generators, StreamInterface stream) throws ProbabilityException
generators - List<Distribution.FrequencyAndObject<Route>>; list of routes and frequenciesstream - StreamInterface; the entropy sourceProbabilityException - when the probabilities are invalidpublic final Route draw() throws ProbabilityException
draw in interface Generator<Route>draw in interface RouteGeneratorProbabilityException - when the an error was detected in the probabilities of the routes to choose fromCopyright © 2014–2019 Delft University of Technology. All rights reserved.