You can use traci.vehicle.getNextTLS() which returns tlsID, index, distance
and state for the upcoming traffic lights.
regards,
Jakob

Am Mo., 25. Mai 2020 um 00:01 Uhr schrieb Weronika <[email protected]
>:

> Dear all,
>
>
> I am a new sumo user, still on the way of discovering many things. I would
> be grateful if you could help me with one obstacle.
>
>
>
> I would like to change the traffic light for the green in the crossing for
> some vehicle.
>
>
> I know the id of the vehicle, the lane on which it is and I know also the
> id of the traffic light. I can get a state of the traffic light, for
> example, state="GGggrrrrGGggrrrr”. Firstly, I would like to know which
> traffic light is now for the vehicle, but I don’t know which part of the
> traffic light state is for this lane where the vehicle is. What is the rule
> for it or how could I check it? I am able to change the phase for the
> traffic light, but I would like to only do it in case that the light for
> the vehicle is red.
>
>
> (I am able to check it in sumo gui for one traffic light, how is it
> working, but I would like my program to work with different types of maps,
> where there are many intersections)
>
>
> I would appreciate any tips about how I could deal with this.
>
> best regards,
>
> Weronika
>
>
>
> _______________________________________________
> sumo-user mailing list
> [email protected]
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
_______________________________________________
sumo-user mailing list
[email protected]
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user

Reply via email to