# import the library
import sumolib
# parse the net
net = sumolib.net.readNet('myNet.net.xml')
# retrieve the coordinate of a node based on its ID
myJunction = net.getNode('myJunctionID')
incomingEdges = myJunction.getIncoming()
outgoingEdges = myJunction.getOutgoing()
Best regards
Mirko
-----Original-Nachricht-----
Betreff: Re: [sumo-user] How to collect Junction data from Links
Datum: 2022-11-17T03:05:15+0100
Von: "Matheus Saueressig" <[email protected]>
An: "Sumo project User discussions" <[email protected]>
How do I use sumolib? I saw the documentation but it didn't help me at all
------------------------------------------------------------------------
De: sumo-user <[email protected]> em nome de Jakob Erdmann
<[email protected]>
Enviado: quarta-feira, 16 de novembro de 2022 18:10
Para: Sumo project User discussions <[email protected]>
Assunto: Re: [sumo-user] How to collect Junction data from Links
See
https://sumo.dlr.de/docs/Simulation/Output/index.html#values_for_junctions
<https://sumo.dlr.de/docs/Simulation/Output/index.html#values_for_junctions>
Also, you can use sumolib to retrieve all edges around a junction:
https://sumo.dlr.de/docs/Tools/Sumolib.html
<https://sumo.dlr.de/docs/Tools/Sumolib.html> (then use this to aggregate
travel statistics on edges).
Am Mi., 16. Nov. 2022 um 21:18 Uhr schrieb Matheus Saueressig <
[email protected] <mailto:[email protected]> >:
Hello, I have a python code to handle Multi-agent Reinforcement Learning
using SUMO <https://github.com/eclipse/sumo> as a microscopic traffic
simulation. It collects data from a .sumocfg file and generate .csv file
with Step, Link, Running Vehicles, Occupancy and Travel Time parameters
from the simulation.
I'm trying to modify it by including a Junction parameter and aggregate
and ordenate the link parameters by junction.
How can I access a Junction with .getEdge()?
_______________________________________________
sumo-user mailing list
[email protected] <mailto:[email protected]>
To unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user
<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