Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] How to iteratively add flows through script

The typical way to increase traffic is by loading another route file that defines more traffic.
However, here are some ways in which you can increase traffic by setting sumo options:

- option "--scale FACTOR" scales all traffic by the given factor
- option "--max-num-vehicles NUMBER" limits the concurrent number of vehicles in the network. (Define the highest flow to begin with and then use this option to modify the actual number of cars)
- if you define multiple flows in your route input which start at different times, you can use options "--begin TIME" and "--end" TIME to pick a different time slice (with potential different amounts of traffic


Am Sa., 30. Apr. 2022 um 18:06 Uhr schrieb Fabio Lamanna <fblamanna@xxxxxxxxx>:
Is there a way to run different scenarios via command-line, adding more vehicles to flows in each iteration? I guess it can be done by a python script, but I don’t figure out how to include in a “for” cycle something like (pseudo-code):

flow = 10
for i in number_of_iterations:
sumo -c scenario01.sumocfg --statistic-output output.xml
flow = flow + 10 vehicle

Thanks for your help

“Our sweetest songs are those that tell of saddest thought“ (Shelley)
sumo-user mailing list
To unsubscribe from this list, visit

Back to the top