Class SingleCrossSectionSwitch
java.lang.Object
org.opentrafficsim.road.network.control.rampmetering.SingleCrossSectionSwitch
- All Implemented Interfaces:
RampMeteringSwitch
- Direct Known Subclasses:
AlineaSwitch,RwsSwitch
Super class for feed-forward controller. This class contains some helper methods for sub-classes.
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 Summary
ConstructorsConstructorDescriptionSingleCrossSectionSwitch(org.djunits.value.vdouble.scalar.Duration interval, List<LoopDetector> detectors) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionorg.djunits.value.vdouble.scalar.DurationReturns the control interval.protected final org.djunits.value.vdouble.scalar.FrequencymeanFlow()Returns the mean flow over the detectors.protected final org.djunits.value.vdouble.scalar.SpeedReturns the mean speed over the detectors.protected final org.djunits.value.vdouble.scalar.FrequencyReturns the total flow over the detectors.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opentrafficsim.road.network.control.rampmetering.RampMeteringSwitch
getCycleTime, isEnabled
-
Constructor Details
-
SingleCrossSectionSwitch
public SingleCrossSectionSwitch(org.djunits.value.vdouble.scalar.Duration interval, List<LoopDetector> detectors) Constructor.- Parameters:
interval- Duration; intervaldetectors- List<Detector>; detectors
-
-
Method Details
-
getInterval
public org.djunits.value.vdouble.scalar.Duration getInterval()Returns the control interval.- Specified by:
getIntervalin interfaceRampMeteringSwitch- Returns:
- Duration; the control interval
-
meanSpeed
protected final org.djunits.value.vdouble.scalar.Speed meanSpeed()Returns the mean speed over the detectors.- Returns:
- Speed; mean speed over the detectors
-
meanFlow
protected final org.djunits.value.vdouble.scalar.Frequency meanFlow()Returns the mean flow over the detectors.- Returns:
- Frequency; mean flow over the detectors
-
totalFlow
protected final org.djunits.value.vdouble.scalar.Frequency totalFlow()Returns the total flow over the detectors.- Returns:
- Frequency; total flow over the detectors
-