Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] How to collect Junction data from Links

# 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" <matsaueressig@xxxxxxxxxxx>

An: "Sumo project User discussions" <sumo-user@xxxxxxxxxxx>

 

 

 

How do I use sumolib? I saw the documentation but it didn't help me at all
 

De: sumo-user <sumo-user-bounces@xxxxxxxxxxx> em nome de Jakob Erdmann <namdre.sumo@xxxxxxxxx>
Enviado: quarta-feira, 16 de novembro de 2022 18:10
Para: Sumo project User discussions <sumo-user@xxxxxxxxxxx>
Assunto: Re: [sumo-user] How to collect Junction data from Links
 
Also, you can use sumolib to retrieve all edges around a junction: 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 <matsaueressig@xxxxxxxxxxx>:
Hello, I have a python code to handle Multi-agent Reinforcement Learning using 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
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user


Back to the top