Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Programmatic Access to NETEDIT

Hello,
The only supported way to create networks is via netconvert. For programmatic modifications you can either:
a)   - convert the network to plain-xml
      - modify those (sumolib.xml.parse can help with that. It creates objects that allow attribute access and which can write themselves back out as xml)
      - re-assemble into .net.xml with netconvert

b) generate patch files and patch the .net.xml using netconvert (patch files are like plain-xml files but you only need to set those attributes you wish to change)

- you can read the network graph using function sumolib.readNet (http://sumo.dlr.de/wiki/Tools/Sumolib)
- you can modify the network while the simulation is running by changing lane permission (If you add forbidden edges beforehand you can activate them at runtime and vice versa)

regards,
Jakob


Am Mi., 30. Jan. 2019 um 20:17 Uhr schrieb <cchadj01@xxxxxxxxxxxx>:
Hello,

  I was wondering if I can have any programmatic access to netedit so 
I can change my network from code or any other way I can change a road 
network from code for that matter.
  I wouldn't want to reinvent the wheel by creating an xml parser and editor.

Thank you,
Tom




_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user

Back to the top