|[sumo-dev] Setting individual traffic light state via TraCI (follow up)|
Hello,a while ago I patched SUMO to allow me set state for individual traffic lights via a Traci command (see the patch I sent on 23th July 2017). This worked, but I still would like to implement it in a more robust way, preferably:
- allow (via netedit) setting a property on a connection in an intersection; not a unique ID, because sometimes multiple connections will belong to group of lights controlled as a single phase. So it would be a string property called "TrafficLightId" or similar. - add a Traci call that allows setting the trafficlight state for a 'single' traffic light, where a 'single' traffic light means all connections that have a given value set for the "TrafficLightId" string property.
This scenario would, at least in my case, make it much more easy to control an intersection using Traci: I could thus easily set the TrafficLightId values for all connections of an intersection, and from my Traci client implementation, call a SetSingleTrafficLightState function, using those (not unique) Id values. This as opposed to the current situation, where I have to closely look at the connections in Netedit, to determine their index in the traffic light state string (e.g. "yyyGGrr"), and subsequently map the traffic lights from my program to that indexed string. The latter means much manual work and manually coding the named mapping of lights to the string. It is also very sensitive for mistakes. The former could be implemented in the Traci client in a much more generic way.
What is your view on this? I would be happy to take time to implement this, however, I wonder if this would be a feature that could find its way back into the SUMO master branch? Otherwise it would make little sense, as I would have rewind my changes onto the master branch very often. If this is a welcome addition, I would need some advice where to start with adding the named property to a connection, and how to add a textbox to the UI of netedit for this.
Thanks, kind regards, Menno van der Woude CodingConnected e.U. (Wien - Österreich) E menno@xxxxxxxxxxxxxxxxxx W www.codingconnected.eu
Back to the top