public class DemandPattern extends Object implements Arrivals
 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 | 
|---|
DemandPattern(org.djunits.value.vdouble.vector.FrequencyVector demandVector,
             org.djunits.value.vdouble.vector.TimeVector timeVector,
             Interpolation interpolation)
Constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
equals(Object obj) | 
org.djunits.value.vdouble.vector.FrequencyVector | 
getDemandVector()
Returns the demand vector. 
 | 
org.djunits.value.vdouble.scalar.Frequency | 
getFrequency(org.djunits.value.vdouble.scalar.Time time,
            boolean sliceStart)
Returns the demand at given time, which may be the sum of child objects. 
 | 
Interpolation | 
getInterpolation()
Returns the interpolation. 
 | 
org.djunits.value.vdouble.vector.TimeVector | 
getTimeVector()
Returns the time vector. 
 | 
int | 
hashCode() | 
org.djunits.value.vdouble.scalar.Time | 
nextTimeSlice(org.djunits.value.vdouble.scalar.Time time)
Returns the start time of the next time slice after the given time or  
null if no such slice exists. | 
String | 
toString() | 
public DemandPattern(org.djunits.value.vdouble.vector.FrequencyVector demandVector,
                     org.djunits.value.vdouble.vector.TimeVector timeVector,
                     Interpolation interpolation)
demandVector - FrequencyVector; demand vectortimeVector - TimeVector; time vectorinterpolation - Interpolation; interpolationpublic final org.djunits.value.vdouble.vector.FrequencyVector getDemandVector()
public final org.djunits.value.vdouble.vector.TimeVector getTimeVector()
public final Interpolation getInterpolation()
public org.djunits.value.vdouble.scalar.Frequency getFrequency(org.djunits.value.vdouble.scalar.Time time,
                                                               boolean sliceStart)
sliceStart is used to resolve
 the value at a time slice boundary in case of a stepwise (discontinuous) demand pattern. If sliceStart = true and
 time is a slice boundary, the demand value for after the slice boundary should be returned. In that case,
 the caller is processing a time slice after time, hence it's the slice start. If sliceStart = false the
 demand value of before the slice boundary should be returned. For continuous demand patterns, sliceStart can be
 ignored.getFrequency in interface Arrivalstime - Time; simulation timesliceStart - boolean; whether the time is at the start of an arbitrary time slicepublic org.djunits.value.vdouble.scalar.Time nextTimeSlice(org.djunits.value.vdouble.scalar.Time time)
null if no such slice exists. The next time
 slice starts as soon as the current slice ends, where each slice has it's own linear (or constant) demand. Thus, any
 change of slope in the demand pattern initiates a new slice. If time is equal to a time slice boundary, the next
 value should be returned.nextTimeSlice in interface Arrivalstime - Time; time after which the first slice start time is requestednull if no such slice existsCopyright © 2014–2018 Delft University of Technology. All rights reserved.