public class ProbabilisticRouteGenerator extends Object implements Generator<Route>, 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-03-26 15:54:58 +0100 (Tue, 26 Mar 2019) $, @version $Revision: 5190 $, by $Author: wjschakel $,
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>ProbabilityException - if the stored collection is emptyCopyright © 2014–2019 Delft University of Technology. All rights reserved.