Class FixedTimeController
java.lang.Object
nl.tudelft.simulation.event.EventProducer
org.opentrafficsim.trafficcontrol.AbstractTrafficController
org.opentrafficsim.trafficcontrol.FixedTimeController
- All Implemented Interfaces:
java.io.Serializable
,java.util.EventListener
,nl.tudelft.simulation.event.EventListenerInterface
,nl.tudelft.simulation.event.EventProducerInterface
,Identifiable
,Drawable
,InvisibleObjectInterface
,TrafficController
public class FixedTimeController extends AbstractTrafficController
Fixed time traffic light control.
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.
- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version 21 feb. 2019
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
- See Also:
- Serialized Form
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FixedTimeController.SignalGroup
Fixed time signal group. -
Field Summary
Fields inherited from interface nl.tudelft.simulation.event.EventProducerInterface
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
Constructors Constructor Description FixedTimeController(java.lang.String id, OTSSimulatorInterface simulator, Network network, Duration cycleTime, Duration offset, java.util.Set<FixedTimeController.SignalGroup> signalGroups)
Constructor for fixed time traffic controller. -
Method Summary
Modifier and Type Method Description InvisibleObjectInterface
clone(OTSSimulatorInterface newSimulator, Network newNetwork)
Duration
getCycleTime()
java.lang.String
getFullId()
Duration
getOffset()
java.util.Set<FixedTimeController.SignalGroup>
getSignalGroups()
void
notify(nl.tudelft.simulation.event.EventInterface event)
java.lang.String
toString()
Methods inherited from class nl.tudelft.simulation.event.EventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, removeAllListeners, removeAllListeners, removeListener
-
Constructor Details
-
FixedTimeController
public FixedTimeController(java.lang.String id, OTSSimulatorInterface simulator, Network network, Duration cycleTime, Duration offset, java.util.Set<FixedTimeController.SignalGroup> signalGroups) throws SimRuntimeExceptionConstructor 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:
SimRuntimeException
- simulator is past zero time
-
-
Method Details
-
notify
public void notify(nl.tudelft.simulation.event.EventInterface event) throws java.rmi.RemoteException- Throws:
java.rmi.RemoteException
-
clone
public InvisibleObjectInterface clone(OTSSimulatorInterface newSimulator, Network newNetwork) throws NetworkException- Throws:
NetworkException
-
getFullId
public java.lang.String getFullId() -
getCycleTime
- Returns:
- cycleTime.
-
getOffset
- Returns:
- offset.
-
getSignalGroups
- Returns:
- signalGroups.
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-