Class TrafficLightDetector.StartEndDetector

All Implemented Interfaces:
Comparable<LaneDetector>, nl.tudelft.simulation.dsol.animation.Locatable, Identifiable, EventProducer, OtsShape, HierarchicallyTyped<DetectorType,Detector>, Detector, LocatedObject, LaneBasedObject
Enclosing class:
TrafficLightDetector

public class TrafficLightDetector.StartEndDetector extends LaneDetector
Embedded detectors used by a TrafficLightDetector.

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, Wouter Schakel
  • Constructor Details

    • StartEndDetector

      public StartEndDetector(String id, Lane lane, org.djunits.value.vdouble.scalar.Length longitudinalPosition, RelativePosition.Type positionType, DetectorType detectorType) throws NetworkException
      Construct a new StartEndDetector.
      Parameters:
      id - the name of the new StartEndDetector
      lane - the lane of the new StartEndDetector
      longitudinalPosition - the longitudinal position of the new StartEndDetector
      positionType - the position on the GTUs that triggers the new StartEndDetector
      detectorType - detector type.
      Throws:
      NetworkException - when the network is inconsistent
  • Method Details

    • triggerResponse

      protected final void triggerResponse(LaneBasedGtu gtu)
      Description copied from class: LaneDetector
      Implementation of the response to a trigger of this detector by a GTU.
      Specified by:
      triggerResponse in class LaneDetector
      Parameters:
      gtu - the lane based GTU that triggered this detector.
    • toString

      public final String toString()
      Overrides:
      toString in class LaneDetector
    • getParent

      public TrafficLightDetector getParent()
      Returns the parent TrafficLightDetector.
      Returns:
      parent.