Interface Arrivals

All Known Implementing Classes:
DemandPattern

public interface Arrivals
Interface for arrivals in an ArrivalsHeadwayGenerator. Arrivals are defined as a piece-wise linear frequency over time.

Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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.
  • Method Details

    • getFrequency

      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. The input 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.
      Parameters:
      time - Time; simulation time
      sliceStart - boolean; whether the time is at the start of an arbitrary time slice
      Returns:
      Frequency; returns the total demand for branching nodes, or the demand at a leaf node, at the given time
    • nextTimeSlice

      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. 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.
      Parameters:
      time - Time; time after which the first slice start time is requested
      Returns:
      start time of the next time slice after the given time or null if no such slice exists