Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Running duaIterate.py with flowrouter.py routes

Hello again Jakob, sorry to bother you again.

I'm still trying to launch the tool implausibleRoutes.py but it still raises the same error. I thought the problem could be in my network large extent (I need to simulate a middle-sized european city) so I clipped it to a lower extent, but the problem persists.
After running flowrouter.py, I launch implausibleRoutes.py and this is what I get:

Loading net ... done.
Error: No route input specified or all routes were invalid.
Quitting (on error).
parsing network from sumonetwork_zgzfixed.net.xml
parsing routes from routes.xml
0 routes read 0 short routes skipped
calculating air distance and checking loops
calling duarouter: /home/al324/sumo-V1.10.0/bin/duarouter -n sumonetwork_zgzfixed.net.xml -r routes.xml -o routes.xml.rerouted.rou.xml --no-step-log --routing-threads 1 --routing-algorithm astar --aggregate-warnings 1 -v
Traceback (most recent call last):
  File "/home/u7262/sumo-V1.10.0/tools/route/implausibleRoutes.py", line 300, in <module>
    main()
  File "/home/u7262/sumo-V1.10.0/tools/route/implausibleRoutes.py", line 224, in main
    for vehicle in parse(duarouterAltOutput, 'vehicle'):
  File "/home/u7262/sumo-V1.10.0/tools/sumolib/xml.py", line 253, in parse
    for _, parsenode in ET.iterparse(_open(xmlfile, None)):
  File "/opt/python/3.7.9/lib/python3.7/xml/etree/ElementTree.py", line 1243, in iterparse
    source = open(source, "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'routes.xml.rerouted.rou.alt.xml'

It seems that implausibleRoutes.py cannot read the routes from routes.xml, but not sure why. The routes.xml contains routes of this form: 

<route id="678695567_678859243.qPKW.1380" edges="678695567 80784908 136656809 92741288#1 124019581#0 124019581#2 678859243"/>

Kind regards,
Alejandro

El mar, 16 nov 2021 a las 10:36, Jakob Erdmann (<namdre.sumo@xxxxxxxxx>) escribió:
Hello,
the tool implausibleRoutes.py calls 'duarouter' in the background to find shortest paths (and thereby detect implausible detours).
This call to duarouter is supposed to generate the file 'routes.xml.rerouted.rou.alt.xml'.
Try running the tool with option -v to better understand what's happening.
It should print the 'duarouter' command on the console and you can also try to execute this command yourself to check for errors.

regards,
Jakob.

Am Mo., 15. Nov. 2021 um 19:42 Uhr schrieb Alejandro Rodríguez Sánchez <alrodr25@xxxxxx>:
Thanks for the guidance Jakob. Regarding the "implausible routes", I'm experiencing some difficulties with the "implausibleroutes.py" script since a while, that is why I started to look for alternatives.

When using python implausibleroutes.py network.net.xml routes.xml, I have the following error:
FileNotFoundError: [Errno 2] No such file or directory: 'routes.xml.rerouted.rou.alt.xml'

Which makes sense because my routes file hasn't that name. Searching in the code, it seems to me that the error may come from the "duarouterAltOutput" definition shown below that. But I don't really know what to do to get rid of this error. It doesn't not work with absolute paths neither.
    prefix = os.path.commonprefix(options.routeFiles)
    duarouterOutput = prefix + '.rerouted.rou.xml'
    duarouterAltOutput = prefix + '.rerouted.rou.alt.xml'

Regards,
Alejandro

El lun, 15 nov 2021 a las 14:22, Jakob Erdmann (<namdre.sumo@xxxxxxxxx>) escribió:
Hello,
the two outpufiles generated by flowrouter.py (routes and flows) must be used together. This can either be done by adding the routes with option --additional or by using duarouter in a preprocessing step (load routes, flows and network to create a combined file with lots of vehicles).

The whole idea of combining flowrouter (or any other tool that creates routes from counting data) with duaIterate to ease congestion is questionable though, because the new routes may ignore the original edge count values that were used with flowrouter.

Flowrouter is known to generated "implausible routes" which are more likely to cause congestion in some networks. There are two approaches to deal with this problem
- identify and blacklist "implausible" routes to guide the flowrouter process
- use another tool


regards,
Jakob


Am Sa., 13. Nov. 2021 um 09:22 Uhr schrieb Alejandro Rodríguez Sánchez <alrodr25@xxxxxx>:
Hello everyone,

I am trying to use the duaIterate.py script to ease congestion in my network using the flowrouter.py output. However, at the moment I have not succeed:

When running duaiterate with the options --additional vtypes.add.xml -r routes.xml -e 21600 --time-to-teleport.highways 120 duarouter--vtype-output dummy.xml duarouter--additional-files vtypes.add.xml
I have this error in the "dua.log" file:
Error: No route input specified or all routes were invalid.
Quitting (on error).

When I introduce the flows as input (option -F flows.xml), the errors change to the following:
Error: The route '-226701455_219967849.qPKW.0' for flow '-226701455_219967849.qPKW.0' is not known. (and the error repeats for every flow defined in the flows.xml file).

What I am missing here? Is it not possible to run duaIterate.py using the flowrouter.py output as routes/flows data?

Kind regards,
Alejandro.
--
Alejandro Rodríguez Sánchez
PhD student
CIEMAT // Universidad Complutense de Madrid
28040 Madrid
email: alrodr25@xxxxxx
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user


--
Alejandro Rodríguez Sánchez
PhD student
CIEMAT // Universidad Complutense de Madrid
28040 Madrid
email: alrodr25@xxxxxx
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user


--
Alejandro Rodríguez Sánchez
PhD student
CIEMAT // Universidad Complutense de Madrid
28040 Madrid
email: alrodr25@xxxxxx

Back to the top