Hi,
(1) I know how to set signal's "offset time" as below:
<tlLogic id="…" type="static" programID="..." offset="0">

(2) I also know how to write simple codes with Traci as below:

def set_sig(x):
    phases = []
    phases.append(traci.trafficlights.Phase(x[0], 0, 0, "GGrr"))
    phases.append(traci.trafficlights.Phase(3, 0, 0, "yyrr"))
    phases.append(traci.trafficlights.Phase(x[1], 0, 0, "rrGG"))
    phases.append(traci.trafficlights.Phase(3, 0, 0, "rryy"))
    logic = traci.trafficlights.Logic("new-program", 0, 0, 0, phases)
    traci.trafficlights.setCompleteRedYellowGreenDefinition("gneJ1", logic)

(3)However, if I want to set the offset time dynamically by Traci, how can
I do?
_______________________________________________
sumo-user mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user

Reply via email to