Class CycleTimeLightController

java.lang.Object
org.opentrafficsim.road.network.control.rampmetering.CycleTimeLightController
All Implemented Interfaces:
RampMeteringLightController

public class CycleTimeLightController extends Object implements RampMeteringLightController
Controller using a cycle time.

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
  • Constructor Details

    • CycleTimeLightController

      public CycleTimeLightController(OtsSimulatorInterface simulator, List<TrafficLight> trafficLights, DetectorType detectorType)
      Parameters:
      simulator - OtsSimulatorInterface; simulator
      trafficLights - List<TrafficLight>; traffic lights
      detectorType - DetectorType; detector type.
  • Method Details

    • disable

      public void disable()
      Disables the traffic lights.
      Specified by:
      disable in interface RampMeteringLightController
    • enable

      public void enable(org.djunits.value.vdouble.scalar.Duration cycleTime)
      Starts the cycle.
      Specified by:
      enable in interface RampMeteringLightController
      Parameters:
      cycleTime - Duration; cycle time
    • setRed

      protected void setRed(TrafficLight trafficLight)
      Sets the traffic light to red. Can be scheduled.
      Parameters:
      trafficLight - TrafficLight; traffic light
    • setGreen

      protected void setGreen(TrafficLight trafficLight)
      Sets the traffic light to green. Can be scheduled and remembers the green time.
      Parameters:
      trafficLight - TrafficLight; traffic light