As a follow up:

After some further debugging, I now can run the simulation. To get it running, I had to remove assert() calls in two places in MSCFModel.cpp: line 415 and line 487. Then the simulation does no longer halt. I do not know what the significance of this might be.

Any thoughts on controlling single traffic lights are still very welcome!

Thanks, Menno

Op 20-7-2017 om 16:49 schreef Menno van der Woude via sumo-devel:
Hello,

in order to ease external control of a TLS in Sumo, tried implementing a new function in TraCI, allowing me to set state on single traffic lights directly.

Ideally, I'd like to be able to set traffic light ids in NETEDIT, and reference those ids in my TraCI API calls.

Now, I did the following:

- Added a function to TraCI, allowing to set single traffic light state. The function checks if the argument corresponds to an edge id or a lane id to which a link belongs, and if so, set state for the link. - I have some edges with multiple lanes; for those, I manually edited the id's, in order to be able to set state for individual lanes (but for all links connected to that lane).

This works, however, the simulation stops after about 30 seconds (simulation time), and a popup appears stating there was a Debug Error, and abort() was called. I cannot make much of this; the debugger brings me to a file called "crt0msg.c". Is this expected behaviour in some cases?
I am happy to share my changes and additions to the code.
However, this also happens if I do not use my new TraCI API function.

Apart from this problem, I wonder, is there a better way to achieve this? Manually editing lane IDs is not the best, I'd much prefer to use NETEDIT for this, however, NETEDIT does not allow editing lane IDs. And links seem to have no id. I am aware it is possible to create signal groups for traffic lights, but that also needs to be done manually.

Any thoughts?

On a sidenote, I think there is a bug in the svn version of NETEDIT. If I save additions with version 0.30, then load them in svn version r25222, upon trying to save, a dialog appears stating there are errors with detector locations.

Kind regards,

Menno van der Woude
CodingConnected e.U. (Wien - Österreich)
E me...@codingconnected.eu
W www.codingconnected.eu

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
sumo-devel mailing list
sumo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sumo-devel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
sumo-devel mailing list
sumo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sumo-devel

Reply via email to