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-04-05 01:45:04 +0200 (Tue, 05 Apr 2016) $, @version $Revision: 1874 $, by $Author: pknoppers $,
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–2016 Delft University of Technology. All rights reserved.