Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Question on Running duaIterate.py with Multi-threading

duaIterate.py alternates between running duarouter and sumo. 
The command line output (or dua.log) will let you know which amount of time is spent in which part of the iteration.

The duarouter portion of the loop can be sped up by setting option duaIterate.py option "duarouter--routing-threads=NUMBER"
(note, that there is no double dash preceding this option).

However, the total amount of time for your iterations suggests that the time is spent in sumo (because routing 26 vehicles) should be very fast in all but the largest networks.
Also, the number of vehicles suggests that you are doing simulations which do not actually profit from duaIterate.
This is because, the contribution of duaIterate is to change vehicle routes in response to congestion effects. Typically such effects only show up when simulating thousands of vehicles.
Also, if you are doing a taxi simulation with the taxi device (https://sumo.dlr.de/docs/Simulation/Taxi.html), the routes are unaffected by duarouter altogether since their are chosen at simulation time based on customer requests.

regards,
Jakob



Am Fr., 26. Sept. 2025 um 17:46 Uhr schrieb Aslan Yurekli Richard via sumo-user <sumo-user@xxxxxxxxxxx>:
Hi,
I am currently working on a machine learning project that requires repeated SUMO simulations. I am using the tools/assign/duaIterate.py script, but I have encountered performance limitations. For example, running 26 vehicles over 20 iterations takes approximately 45 minutes.
When I check the activity monitor, I see that RAM usage stays around 20%, while a single CPU thread is consistently at 100%. I assume this bottleneck arises because SUMO runs on a single thread.
Could you advise me on how to run the following code using multiple threads, or suggest a more efficient setup for parallel execution?

To reproduce a similar simulation, please use the code below:

```
python3 $SUMO_HOME/tools/assign/duaIterate.py \
  -n osm.net.xml.gz \
  -r taxi_trips.xml \
  -+ taxi_vtypes.xml \
  -l 20 \
  --max-convergence-deviation 0.01 \
  --continue-on-unbuild
```

Best regards
Gkisa
_______________________________________________
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