Your method of controlling the traffic lights from traci using setPhase() is appropriate.
regards, Jakob 2018-06-25 10:23 GMT+02:00 胡志强 <[email protected]>: > I have build a cross with straight way and turn-left way,and the cross is > like this : > [image: image.png] > > > and the traffic light information below: > <connection from="1i" to="2o" fromLane="0" toLane="0" via=":0_6_0" > tl="0" linkIndex="6" dir="s" state="o"/> > <connection from="1i" to="4o" fromLane="1" toLane="1" via=":0_7_0" > tl="0" linkIndex="7" dir="l" state="o"/> > <connection from="1o" to="1i" fromLane="1" toLane="1" via=":1_0_0" > dir="t" state="M"/> > <connection from="2i" to="1o" fromLane="0" toLane="0" via=":0_2_0" > tl="0" linkIndex="2" dir="s" state="o"/> > <connection from="2i" to="3o" fromLane="1" toLane="1" via=":0_3_0" > tl="0" linkIndex="3" dir="l" state="o"/> > <connection from="2o" to="2i" fromLane="1" toLane="1" via=":2_0_0" > dir="t" state="M"/> > <connection from="3i" to="4o" fromLane="0" toLane="0" via=":0_4_0" > tl="0" linkIndex="4" dir="s" state="o"/> > <connection from="3i" to="1o" fromLane="1" toLane="1" via=":0_5_0" > tl="0" linkIndex="5" dir="l" state="o"/> > <connection from="3o" to="3i" fromLane="1" toLane="1" via=":3_0_0" > dir="t" state="M"/> > <connection from="4i" to="3o" fromLane="0" toLane="0" via=":0_0_0" > tl="0" linkIndex="0" dir="s" state="o"/> > <connection from="4i" to="2o" fromLane="1" toLane="1" via=":0_1_0" > tl="0" linkIndex="1" dir="l" state="o"/> > in a time-step ,I set the phase of the traffic light in this way: > traci.trafficlight.setPhase("0",0) > traci.trafficlight.setPhase("0",1) > to let the south-north vehicles can pass the cross simultaneously,is it > correct?if I was wrong ,what is the right way to control the traffic lights? > > > _______________________________________________ > sumo-user mailing list > [email protected] > To change your delivery options, retrieve your password, or unsubscribe > from this list, visit > https://dev.eclipse.org/mailman/listinfo/sumo-user > >
_______________________________________________ sumo-user mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/sumo-user
