Class SimpleReportingSensor

All Implemented Interfaces:
Serializable, Comparable<SingleSensor>, Locatable, nl.tudelft.simulation.event.EventProducerInterface, Identifiable, Drawable, Compatible, ObjectInterface, LaneBasedObject, Sensor, SingleSensor

public class SimpleReportingSensor
extends AbstractSensor
Sensor that prints which GTU triggers it.

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

$LastChangedDate: 2015-08-12 16:37:45 +0200 (Wed, 12 Aug 2015) $, @version $Revision: 1240 $, by $Author: averbraeck $, initial version an 30, 2015

Author:
Alexander Verbraeck, Peter Knoppers
See Also:
Serialized Form
  • Constructor Details

    • SimpleReportingSensor

      public SimpleReportingSensor​(String id, Lane lane, Length position, RelativePosition.TYPE triggerPosition, DEVSSimulatorInterface.TimeDoubleUnit simulator, Compatible compatible) throws NetworkException
      Construct a new SimpleReportingSensor.
      Parameters:
      lane - Lane; the lane on which the new SimpleReportingSensor will be located
      position - Length; the position of the sensor along the lane
      triggerPosition - RelativePosition.TYPE; the relative position type (e.g., FRONT, BACK) of the vehicle that triggers the sensor
      id - String; the id of the new SimpleReportingSensor
      simulator - DEVSSimulatorInterface.TimeDoubleUnit; the simulator to enable animation
      compatible - Compatible; object that can decide if a particular GTU type in a particular driving direction will trigger the new SimpleReportingSensor
      Throws:
      NetworkException - when the position on the lane is out of bounds w.r.t. the center line of the lane
  • Method Details