Class SinkSensor

    • Constructor Detail

      • SinkSensor

        public SinkSensor​(Lane lane,
                          Length position,
                          GTUDirectionality gtuDirectionality,
                          DEVSSimulatorInterface.TimeDoubleUnit simulator)
                   throws NetworkException
        Parameters:
        lane - Lane; the lane that triggers the deletion of the GTU.
        position - Length; the position of the sensor
        gtuDirectionality - GTUDirectionality; GTU directionality
        simulator - DEVSSimulatorInterface.TimeDoubleUnit; the simulator to enable animation.
        Throws:
        NetworkException - when the position on the lane is out of bounds w.r.t. the center line of the lane
      • SinkSensor

        public SinkSensor​(Lane lane,
                          Length position,
                          Compatible compatible,
                          DEVSSimulatorInterface.TimeDoubleUnit simulator)
                   throws NetworkException
        Parameters:
        lane - Lane; the lane that triggers the deletion of the GTU.
        position - Length; the position of the sensor
        compatible - Compatible; compatible GTU type and direction
        simulator - DEVSSimulatorInterface.TimeDoubleUnit; the simulator to enable animation.
        Throws:
        NetworkException - when the position on the lane is out of bounds w.r.t. the center line of the lane
    • Method Detail

      • triggerResponse

        public final void triggerResponse​(LaneBasedGTU gtu)
        Implementation of the response to a trigger of this sensor by a GTU.
        Specified by:
        triggerResponse in class AbstractSensor
        Parameters:
        gtu - LaneBasedGTU; the lane based GTU that triggered this sensor.