Class RoadSampler

java.lang.Object
org.opentrafficsim.kpi.sampling.Sampler<GtuDataRoad,LaneDataRoad>
org.opentrafficsim.road.network.sampling.RoadSampler
All Implemented Interfaces:
Serializable, Remote, EventListener, org.djutils.event.EventListener

public class RoadSampler extends Sampler<GtuDataRoad,LaneDataRoad> implements org.djutils.event.EventListener
Implementation of kpi sampler for OTS.

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
See Also:
  • Constructor Details

    • RoadSampler

      public RoadSampler(RoadNetwork network)
      Constructor which uses the operational plan updates of GTU's as sampling interval.
      Parameters:
      network - RoadNetwork; the network
      Throws:
      NullPointerException - if the simulator is null
    • RoadSampler

      public RoadSampler(Set<ExtendedDataType<?,?,?,? super GtuDataRoad>> extendedDataTypes, Set<FilterDataType<?,? super GtuDataRoad>> filterDataTypes, RoadNetwork network)
      Constructor which uses the operational plan updates of GTU's as sampling interval.
      Parameters:
      extendedDataTypes - Set<ExtendedDataType<?, ?, ?, ? super GtuDataRoad>>; extended data types
      filterDataTypes - Set<FilterDataType<?, ? super GtuDataRoad>>; filter data types
      network - RoadNetwork; the network
      Throws:
      NullPointerException - if the simulator is null
    • RoadSampler

      public RoadSampler(RoadNetwork network, org.djunits.value.vdouble.scalar.Frequency frequency)
      Constructor which uses the given frequency to determine the sampling interval.
      Parameters:
      network - RoadNetwork; the network
      frequency - Frequency; sampling frequency
      Throws:
      NullPointerException - if an input is null
      IllegalArgumentException - if frequency is negative or zero
    • RoadSampler

      public RoadSampler(Set<ExtendedDataType<?,?,?,? super GtuDataRoad>> extendedDataTypes, Set<FilterDataType<?,? super GtuDataRoad>> filterDataTypes, RoadNetwork network, org.djunits.value.vdouble.scalar.Frequency frequency)
      Constructor which uses the given frequency to determine the sampling interval.
      Parameters:
      extendedDataTypes - Set<ExtendedDataType<?, ?, ?, ? super GtuDataRoad>>; extended data types
      filterDataTypes - Set<FilterDataType<?, ? super GtuDataRoad>>; filter data types
      network - RoadNetwork; the network
      frequency - Frequency; sampling frequency
      Throws:
      NullPointerException - if an input is null
      IllegalArgumentException - if frequency is negative or zero
  • Method Details