How to get n number of vehicles for x sec of simulation using SUMO randomTrips script?

Viewed 1043

I am using Veins simulator, for creating cars with path I am using the following commands:

python c:/DLR/Sumo/tools/randomTrips.py -n test.net.xml -e 1200 -l
python c:/DLR/Sumo/tools/randomTrips.py -n test.net.xml -r test.rou.xml -e 1200 -l

This command generated 1200 vehicles for 1200 sec of simulation but I want to generated 1200 vehicles for 100 sec of simulation. How can I do that?

2 Answers

Number of vehicles randomly distributed over specified period of time can be generated using --begin, --end and --period options.

For example to generate 1200 vehicles for 100 sec of simulation, following command can be used:

python randomTrips.py -n net.net.xml -r net.rou.xml -o net.trip.xml --begin=0 --end=100 --period=0.083333

In short,

number of generated vehicles = (end - begin) / period
Related