public class SplitFraction extends Object
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.
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
- Node; nodeinterpolation
- Interpolation; interpolationrandom
- StreamInterface; random streamsimulator
- DEVSSimulatorInterface.TimeDoubleUnit; simulatorpublic void addFraction(Link link, double fraction)
GTUType.ALL
and all time.link
- Link; linkfraction
- double; fractionpublic void addFraction(Link link, GTUType gtuType, double fraction)
link
- Link; linkgtuType
- GTUType; gtu typefraction
- double; fractionpublic void addFraction(Link link, DurationVector time, double[] fraction)
GTUType.ALL
.link
- Link; linktime
- DurationVector; timefraction
- double[]; fractionpublic void addFraction(Link link, GTUType gtuType, DurationVector time, double[] fraction)
link
- Link; linkgtuType
- GTUType; gtu typetime
- DurationVector; timefraction
- double[]; fractionpublic Link draw(GTUType gtuType)
gtuType
- GTUType; gtuTypeCopyright © 2014–2019 Delft University of Technology. All rights reserved.