public static class FixedTimeController.SignalGroup extends Object implements Identifiable
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.
Constructor and Description |
---|
SignalGroup(String id,
Set<String> trafficLightIds,
Duration offset,
Duration green,
Duration yellow)
Constructor without pre-green duration.
|
SignalGroup(String id,
Set<String> trafficLightIds,
Duration offset,
Duration preGreen,
Duration green,
Duration yellow)
Constructor with pre-green duration.
|
Modifier and Type | Method and Description |
---|---|
FixedTimeController.SignalGroup |
clone()
Clones the object for a cloned simulation.
|
boolean |
equals(Object obj) |
Duration |
getGreen() |
String |
getId() |
Duration |
getOffset() |
Duration |
getPreGreen() |
Duration |
getRed() |
ImmutableSet<String> |
getTrafficLightIds() |
ImmutableList<TrafficLight> |
getTrafficLights() |
Duration |
getYellow() |
int |
hashCode() |
void |
startup(Duration controllerOffset,
Duration cycleTime,
OTSSimulatorInterface sim,
Network network) |
String |
toString() |
public SignalGroup(String id, Set<String> trafficLightIds, Duration offset, Duration green, Duration yellow)
id
- String; idtrafficLightIds
- List<String>; traffic light idsoffset
- Duration; offset from start of cyclegreen
- Duration; green durationyellow
- Duration; yellow durationpublic SignalGroup(String id, Set<String> trafficLightIds, Duration offset, Duration preGreen, Duration green, Duration yellow)
id
- String; idtrafficLightIds
- List<String>; traffic light idsoffset
- Duration; offset from start of cyclepreGreen
- Duration; pre-green durationgreen
- Duration; green durationyellow
- Duration; yellow durationpublic String getId()
getId
in interface Identifiable
public void startup(Duration controllerOffset, Duration cycleTime, OTSSimulatorInterface sim, Network network) throws SimRuntimeException
controllerOffset
- cycleTime
- sim
- network
- SimRuntimeException
- when traffic light does not exist in the networkpublic FixedTimeController.SignalGroup clone()
public final ImmutableList<TrafficLight> getTrafficLights()
public final Duration getRed()
public final ImmutableSet<String> getTrafficLightIds()
public final Duration getOffset()
public final Duration getPreGreen()
public final Duration getGreen()
public final Duration getYellow()
Copyright © 2014–2019 Delft University of Technology. All rights reserved.