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,EventListenerInterface,EventProducerInterface,Identifiable,Drawable,InvisibleObjectInterface,TrafficController
public class FixedTimeController extends AbstractTrafficController
Fixed time traffic light control.
Copyright (c) 2013-2019 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 classFixedTimeController.SignalGroupFixed time signal group. -
Field Summary
Fields inherited from interface nl.tudelft.simulation.event.EventProducerInterface
FIRST_POSITION, LAST_POSITIONFields 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 InvisibleObjectInterfaceclone(OTSSimulatorInterface newSimulator, Network newNetwork)DurationgetCycleTime()java.lang.StringgetFullId()DurationgetOffset()java.util.Set<FixedTimeController.SignalGroup>getSignalGroups()voidnotify(EventInterface event)java.lang.StringtoString()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, removeListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface nl.tudelft.simulation.event.EventProducerInterface
addListener, addListener, addListener, addListener, 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
- 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:
toStringin classjava.lang.Object
-