Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Traffic Lights Question

Thank you Menno

On Mon, 2 Jul 2018 at 12:05, Menno van der Woude <menno@xxxxxxxxxxxxxxxxxx> wrote:
Hi José,

the string "state" contains the state for all links the are controlled
by this traffic light. Each char sets the state for a link (or multiple
links with the same index).

For the meaning of the chars, see:

http://www.sumo.dlr.de/daily/pydoc/traci._trafficlight.html#TrafficLightDomain-setRedYellowGreenState

"Sets the named tl's state as a tuple of light definitions from
rugGyYuoO, for red, red-yellow, green, yellow, off, where lower case
letters mean that the stream has to decelerate."

Duration is the duration of a phase in seconds, meaning the time the
traffic light will remain in the given phase before moving to the next one.
In the example program, you can thus see, for example, links 0 and 1
will remain green for 31 seconds, then yellow for 5 seconds, then red
for the rest of a cycle.

Hope this helps,

Greets,

Menno

On 2-7-2018 13:00, Jose Monreal Bailey wrote:
> Dear all,
>
> Regarding to traffic lights, I was reading the wiki, and I saw the
> following example of TLS program,
>
> <additional>
>     <tlLogic id="0" programID="my_program" offset="0" type="static">
>        <phase duration="31" state="GGggrrrrGGggrrrr"/>
>        <phase duration="5"  state="yyggrrrryyggrrrr"/>
>        <phase duration="6"  state="rrGGrrrrrrGGrrrr"/>
>        <phase duration="5"  state="rryyrrrrrryyrrrr"/>
>        <phase duration="31" state="rrrrGGggrrrrGGgg"/>
>        <phase duration="5"  state="rrrryyggrrrryygg"/>
>        <phase duration="6"  state="rrrrrrGGrrrrrrGG"/>
>        <phase duration="5"  state="rrrrrryyrrrrrryy"/>
>     </tlLogic>
> </additional>
>
>
>  From each of the phases, how can I read what it means the state and the
> duration?
> How can I tell from that example the time spent for red, yellow and green?
>
>
> Best regards,
> José
>
>
> _______________________________________________
> sumo-user mailing list
> sumo-user@xxxxxxxxxxx
> 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
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user

Back to the top