public class SplitFraction extends Object
Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Constructor and Description |
---|
SplitFraction(Node node,
Interpolation interpolation,
StreamInterface random,
DEVSSimulatorInterface.TimeDoubleUnit simulator)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addFraction(Link link,
double fraction)
Add fraction to link, this will apply to
GTUType.ALL and all time. |
void |
addFraction(Link link,
DurationVector time,
double[] fraction)
Add fraction to link over time, this will apply to
GTUType.ALL . |
void |
addFraction(Link link,
GTUType gtuType,
double fraction)
Add fraction to link for gtu type, this will apply to all time.
|
void |
addFraction(Link link,
GTUType gtuType,
DurationVector time,
double[] fraction)
Add fraction to link over time for gtu type.
|
Link |
draw(GTUType gtuType)
Draw next link based on split fractions.
|
boolean |
equals(Object obj) |
int |
hashCode() |
String |
toString() |
public SplitFraction(Node node, Interpolation interpolation, StreamInterface random, DEVSSimulatorInterface.TimeDoubleUnit simulator)
node
- nodeinterpolation
- interpolationrandom
- random streamsimulator
- simulatorpublic void addFraction(Link link, double fraction)
GTUType.ALL
and all time.link
- linkfraction
- fractionpublic void addFraction(Link link, GTUType gtuType, double fraction)
link
- linkgtuType
- gtu typefraction
- fractionpublic void addFraction(Link link, DurationVector time, double[] fraction)
GTUType.ALL
.link
- linktime
- timefraction
- fractionpublic void addFraction(Link link, GTUType gtuType, DurationVector time, double[] fraction)
link
- linkgtuType
- gtu typetime
- timefraction
- fractionpublic Link draw(GTUType gtuType)
gtuType
- gtuTypeCopyright © 2014–2018 Delft University of Technology. All rights reserved.