How to use sumo/tools/randomTrips.py in order to make random trips that do start from starting lanes and end to final lanes

Question:

I’m having problems with SUMO’s randomTrips.py, although I set a really high fringe factor, I still get vehicle spawns "inside" my network. I want to make trips that start of a starting lane and end to a final lane.

Here’s how I generated my trips files. I want ~ 1000 vehs, 1 veh spawning every 2 secs at a duration of ~2000 secs.

python3 /home/sumo/tools/randomTrips.py -n osm.net.xml -b 0 -e 2000 -p 2 --trip-attributes="departLane="best" departSpeed="10.0" departPos="base"" --route-file trips.xml --fringe-factor 200000

What is happening here?

Asked By: White_Sirilo

||

Answers:

If your network is not too big you can consider listing the probabilities explicitly and use one or two weight files to give the edge probabilities. The details are described here: https://sumo.dlr.de/docs/Tools/Trip.html#customized_weights.

Answered By: Michael

Now in SUMO version 1.15.0, --fringe-factor accepts value max to make all vehicles depart and arrive at fringe edges.
https://github.com/eclipse/sumo/blob/main/tools/randomTrips.py#L116

Answered By: C. Tang