[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [sumo-user] Call SUMO
|
Thanks for explanation.
I'm trying to use libsumo as you said and based on what is said in
https://sumo.dlr.de/docs/Libsumo.html#building_it. But when I run it I get the error in the attachment. All the environment variables and setup seems to be OK. Please check the screenshot in the attachment.
My other question is about the first sentence regarding loading a weight file corresponding to a jammed network. what do you mean by weight file? Do you mean getting the state of network at the point that some roads are congested ,while running the simulation and save it to a file(travel time of edges will show the weight?)?
Thanks for your help,
Then I would use libsumo:
- load a weight file corresponding to a jammed network
- run lots of simulation.findRoute queries (and measure time)
- initialize your own algorithm graph from the sumo data structures
- run the same queries against your own routing algorithm (and measure time)
The basic comparison I want to do is how fast they find shortest path when there are many s-t queries and do rerouting (finding a new route) when there are traffic jam in some edges.
Given the distance/travelTime data for each edge, the shortest/fastest path in a typical network is often unique and thus all algorithms reach the same result (manhatten grid networks are an obvious exception to this). Therefore it does not matter which algorithm you use as long as they use the same inputs.
Thus, I was trying to understand what difference you would expect from using non-sumo algorithms.
I am not sure if I understand the first paragraph of your email. The algorithms are shortest/fastest path finders(I call them non-sumo algorithms). Actually the thing I want to do is as follow:
-Import map of a city as road network
-Make some source and target points based on the map
-Run random number of source-target queries between these source and target points and for every query (or in a time interval for example every 20 second) get the current situation of the network (like the travel time of edges because it might have changed due to heavy traffic in some edges) and find the shortest path/fastest using non-sumo algorithms.
-calculate the path found
(time/distance)
by non-sumo algorithms for each source-target query and also average of time-distance for the whole s-t queries during simulation.
Thanks for your help,
Raheleh
It depends on what these other algorithms are. If they are also shortest/fastest path finders that it would be sufficient to alter the weights/travel times assigned to the network edges (via TraCI or xml inputs) and keep using the sumo algorithms.
You could also let these other algorithms compute their routes externally and then alter the routes in the simulation (via TraCI or xml inputs).
regards,
Jakob
Thanks for your explanation.
Yes, you are right. So, what you suggest to do if I want to compare other routing algorithms with SUMO routing algorithms from traffic efficiency point of view?
Do I need to develop SUMO source code and add other routing algorithms, or there is another way I can call these algorithms inside SUMO.
Thanks for your time and help.
Raheleh
Libsumo is useful if you need at lot of interaction between your code and sumo because it reduce communication overhead compared to TraCI.
If you are comparing the algorithms in terms of overall traffic efficiency then most of the time is spent on simulation rather than routing so you won't need Libsumo.
If you are repeatedly calling the sumo routers to compare the found routes with your own routes then it makes more sense.
regards,
Jakob
Hello,
I would like to test two routing algorithms using SUMO as a framework for comparing these algorithms. Inside the program of these algorithms (written in C++ in Linux), I need to call SUMO, start it, get the required variables and reports and then close it and see the results. What do you suggest for this? Do you think using Libsumo is a good idea? and if yes what's the procedure of using it.
Best,
Raheleh
--
RAZ
_______________________________________________
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
_______________________________________________
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
--
RAZ
_______________________________________________
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
_______________________________________________
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
--
RAZ
_______________________________________________
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
_______________________________________________
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
--
RAZ
_______________________________________________
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
_______________________________________________
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
--
RAZ
C:\Users\rahel\AppData\Local\Programs\Python\Python37-32\python.exe R:/Education/Concordia/Thesis/Simulation/RoutingSimulation/RoutingSim.py
Traceback (most recent call last):
File "C:\Program Files (x86)\Eclipse\Sumo\tools\libsumo\libsumo.py", line 14, in swig_import_helper
return importlib.import_module(mname)
File "C:\Users\rahel\AppData\Local\Programs\Python\Python37-32\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 670, in _load_unlocked
File "<frozen importlib._bootstrap>", line 583, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1043, in create_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: DLL load failed: %1 is not a valid Win32 application.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "R:/Education/Concordia/Thesis/Simulation/RoutingSimulation/RoutingSim.py", line 3, in <module>
import libsumo
File "C:\Program Files (x86)\Eclipse\Sumo\tools\libsumo\__init__.py", line 18, in <module>
from .libsumo import * # noqa
File "C:\Program Files (x86)\Eclipse\Sumo\tools\libsumo\libsumo.py", line 17, in <module>
_libsumo = swig_import_helper()
File "C:\Program Files (x86)\Eclipse\Sumo\tools\libsumo\libsumo.py", line 16, in swig_import_helper
return importlib.import_module('_libsumo')
File "C:\Users\rahel\AppData\Local\Programs\Python\Python37-32\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed: %1 is not a valid Win32 application.
Attachment:
SystemEnv.JPG
Description: JPEG image