Class FixedTimeController
java.lang.Object
org.djutils.event.LocalEventProducer
org.opentrafficsim.trafficcontrol.AbstractTrafficController
org.opentrafficsim.trafficcontrol.FixedTimeController
- All Implemented Interfaces:
Serializable
,Remote
,EventListener
,org.djutils.base.Identifiable
,org.djutils.event.EventListener
,org.djutils.event.EventProducer
,org.opentrafficsim.core.animation.Drawable
,org.opentrafficsim.core.object.NonLocatedObject
,TrafficController
Fixed time traffic light control.
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
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescription(package private) class
Storage of an offset within a cycle and the new traffic light color.static class
Fixed time signal group. -
Field Summary
Fields inherited from interface org.djutils.event.EventProducer
FIRST_POSITION, LAST_POSITION
Fields inherited from interface org.opentrafficsim.trafficcontrol.TrafficController
BEING_CLONED, NO_STREAM, OFF, RUNNING, SHUTTING_DOWN, STARTING_UP, TRAFFIC_LIGHT_CHANGED, TRAFFICCONTROL_CONFLICT_GROUP_CHANGED, TRAFFICCONTROL_CONTROLLER_CREATED, TRAFFICCONTROL_CONTROLLER_EVALUATING, TRAFFICCONTROL_CONTROLLER_WARNING, TRAFFICCONTROL_SET_TRACING, TRAFFICCONTROL_STATE_CHANGED, TRAFFICCONTROL_TRACED_VARIABLE_UPDATED, TRAFFICCONTROL_VARIABLE_CREATED
-
Constructor Summary
ConstructorDescriptionFixedTimeController
(String id, org.opentrafficsim.core.dsol.OtsSimulatorInterface simulator, org.opentrafficsim.core.network.Network network, org.djunits.value.vdouble.scalar.Duration cycleTime, org.djunits.value.vdouble.scalar.Duration offset, Set<FixedTimeController.SignalGroup> signalGroups) Constructor for fixed time traffic controller. -
Method Summary
Methods inherited from class org.opentrafficsim.trafficcontrol.AbstractTrafficController
getId
Methods inherited from class org.djutils.event.LocalEventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, getEventListenerMap, getEventTypesWithListeners, getListenerReferences, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.djutils.event.EventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireUnverifiedEvent, fireUnverifiedEvent, fireUnverifiedTimedEvent, fireUnverifiedTimedEvent, getEventListenerMap, getEventTypesWithListeners, getListenerReferences, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListener
-
Constructor Details
-
FixedTimeController
public FixedTimeController(String id, org.opentrafficsim.core.dsol.OtsSimulatorInterface simulator, org.opentrafficsim.core.network.Network network, org.djunits.value.vdouble.scalar.Duration cycleTime, org.djunits.value.vdouble.scalar.Duration offset, Set<FixedTimeController.SignalGroup> signalGroups) throws nl.tudelft.simulation.dsol.SimRuntimeException Constructor for fixed time traffic controller.- Parameters:
id
- String; idsimulator
- OtsSimulatorInterface; simulatornetwork
- Network; networkoffset
- Duration; off set from simulation start timecycleTime
- Duration; cycle timesignalGroups
- Set<SignalGroup>; signal groups- Throws:
nl.tudelft.simulation.dsol.SimRuntimeException
- simulator is past zero time
-
-
Method Details
-
notify
- Throws:
RemoteException
-
getFullId
-
getCycleTime
public final org.djunits.value.vdouble.scalar.Duration getCycleTime()- Returns:
- cycleTime.
-
getOffset
public final org.djunits.value.vdouble.scalar.Duration getOffset()- Returns:
- offset.
-
getSignalGroups
- Returns:
- signalGroups.
-
toString
-