Interface DirectionalOccupancyDetector

All Superinterfaces:
Identifiable

public interface DirectionalOccupancyDetector extends Identifiable
An occupancy detector is a lane-based object that can be triggered by a relative position of the GTU (e.g., front, back) when that relative position passes over the detector location on the lane.

Copyright (c) 2013-2026 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
  • Field Details

    • DIRECTIONAL_OCCUPANCY_DETECTOR_TRIGGER_ENTRY_EVENT

      static final EventType DIRECTIONAL_OCCUPANCY_DETECTOR_TRIGGER_ENTRY_EVENT
      The timed event type for pub/sub indicating the triggering of the entry of an OccupancyDetector.
      Payload: Object[] {String detectorId, Detector detector, LaneBasedGtu gtu, RelativePosition.TYPE relativePosition}
    • DIRECTIONAL_OCCUPANCY_DETECTOR_TRIGGER_EXIT_EVENT

      static final EventType DIRECTIONAL_OCCUPANCY_DETECTOR_TRIGGER_EXIT_EVENT
      The timed event type for pub/sub indicating the triggering of the exit of an OccupancyDetector.
      Payload: Object[] {String detectorId, Detector detector, LaneBasedGtu gtu, RelativePosition.TYPE relativePosition}
  • Method Details

    • getPositionTypeEntry

      RelativePosition.Type getPositionTypeEntry()
      Returns the entry position.
      Returns:
      the relative position type of the vehicle (e.g., FRONT, BACK) that triggers the detector.
    • getPositionTypeExit

      RelativePosition.Type getPositionTypeExit()
      Returns the exit position.
      Returns:
      the relative position type of the vehicle (e.g., FRONT, BACK) that triggers the detector.
    • getLanePositionEntry

      LaneBasedObject getLanePositionEntry()
      Return the entry position of this DirectionalOccupancyDetector.
      Returns:
      the lane and position on the lane where GTU entry is detected
    • getLanePositionExit

      LaneBasedObject getLanePositionExit()
      Return the exit position of this DirectionalOccupancyDetector.
      Returns:
      the lane and position on the lane where GTU exit is detected
    • getId

      String getId()
      Returns the id.
      Specified by:
      getId in interface Identifiable
      Returns:
      The id of the detector.
    • getSimulator

      OtsSimulatorInterface getSimulator()
      Returns the simulator.
      Returns:
      The simulator.