Hello,
this might either be a problem with the value of 'tllogic' in your code or
a bug in the C# client (which is not directly supported by the core
development team).
The following python client code works fine on your networks and returns
'3' for each of your defined tlLogics.

for tlID in traci.trafficlight.getIDList():
    print(tlID, len(traci.trafficlight.getControlledLinks(tlID)))

Note, that your networks are highly unusual and will not correctly model
common vehicle interactions. In your network, cars will pass through each
other if they happen to be on the intersection at the same time.
Instead of modelling the connections across a junction as "normal" edges,
they should be modeled as "connections" that are all part of the same
junction.
Also, parallel lanes of the same road should be modeled as lanes of the
same edge since otherwise, lane-changing will not be possible.

regards,
Jakob


Am Mo., 4. Juli 2022 um 14:38 Uhr schrieb Akrima Huzaifa <
[email protected]>:

> Greetings team,
> I am trying to fetch no of states(length)/Links from a sumo(TraCI) with
> the help of function "GetControlledLinks()
> <https://sumo.dlr.de/docs/TraCI/Traffic_Lights_Value_Retrieval.html>"
> (snippet attached below). The thing is when I do so for my "Round1"
> TL(network attached) it works fine(returns 3) but with the same network but
> different TL Logic(with the same phases and states) returns null while it
> should return 3 too. IDK why sumo is not returning me the values for
> "Round2" or any other round other than "Round1".
> PS: All linkIndexes are used in connections(i.e. 0.1,2).
>
> *Code Snippet (Unity)C#:*
>         client = new TraCIClient();
>         client.Connect("*.*.*.1", ***1);
> ...
> Debug.Log("Akrima=========NoOfSignals: " + client.TrafficLight.
> *GetControlledLinks(tllogic)*.Content.NumberOfSignals);
> ...
>
> Network files attached
>
> Thank you!
> --
> Best Regards,
> Akrima Huzaifa Akhtar
> [email protected]
>
> _______________________________________________
> 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