I'm trying to implement some 'neighbors aware' broadcast techniques, in particular eSBR and NJL. I'd like to filter the junctionIDs list to be able to work with the best scenario possible (some junctions are car generator points and therefore I'd like to remove those from my list). In most cases the junction type to be discarded is 'unregulated' but it appears veins doesn't implement anything to get that field. I'm asking you if I'm missing something (maybe I've to implement a fresh one myself using some CMD_GET for sumo) or there's a better way to accomplish this task. Thank you in advance.
Asked
Active
Viewed 121 times
0
-
Is this question answered? – Julian Heinovski Jul 22 '18 at 12:32
2 Answers
1
Veins indeed does not implement a TraCI getter for the junction type. Furthermore, according to the documentation (which you have to download, since the wiki is down for a couple of days already), there is not even a TraCI command supporting retrieval of the junction type.
Therefore, you'd need to implement the retrieval command in TraCI and in Veins as well.

Julian Heinovski
- 1,822
- 3
- 16
- 27
-
Thank you for the answer. Do you personally think is it worth a shot pursuing this path or is there a better way (considering what I'm actually working on) ? – Barnercart Jun 02 '18 at 10:49
1
The junction type is a static property of the network, so you can simply parse the network xml file and store all junction types. There is already python code available to do so but maybe this does not help in the veins context. But to get the idea, here it is:
import sumolib
net = sumolib.net.readNet("my.net.xml")
types = {}
for junction in net.getNodes():
types[junction.getID()] = junction.getType()

Michael
- 3,510
- 1
- 11
- 23
-
That's definitely something I didn't think about yet. I'll give it a try for sure in these days. Thanks for suggestion! – Barnercart Jun 07 '18 at 23:30