> I’m seeking guidance on which route files should be used as input for RouteSampler.
- routes created by dfrouter and flowRouter are prone to contain implausible detours and should not be used as input
- duarouter is used in the background when running randomTrips (to find shortest routes between random origin/destination pairs and to validate such pairs for connectivity)
- randomTrips is the recommended tool for generating routeSampler input.
> Could you please review these commands and advise if any corrections or adjustments are needed?
- you didn't give the command that converts morningrush.csv into edgeData.xml but I would recommend:
tools/detector/edgeDataFromFlow.py -d modified_detector_types.xml -f morning_rush.csv -o edgedata.xml -b 540 -e 660 -i 60
- the randomTrips call doesn't require the --trip-attributes options since the generated random vehicles are never used inside a simulation. Only the bare routes are used as routeSampler input
- your network contains many short edges at the network fringe. by setting routeSampler option -l (--length) you are making it very unlikely that traffic will start there
- my recommended call would be:
tools/randomTrips.py -n up.net.xml --seed 42 -r random_routes.xml --vclass passenger --prefix veh --min-distance 300 -e 20000 --fringe-factor 10
- your counting data references 20 edges that don't permit passenger traffic (but are instead for bicyles or rail_urban) this could indicate detector mapping errors
- if you want to have a more uniform distribution of traffic over time, replace "-f poisson" with "-f number" in the calls below
If you remove data for these edges, then routeSampler will achieve a good data match:
tools/routeSampler.py -r random_routes.xml --edgedata-files edgedata2.xml -o routesampler2.rou.xml --optimize full --mismatch-output mismatch2.xml -I -f poisson --edgedata-attribute qPKW
32400: Wrote 12827 routes (1950 distinct) achieving total count 32232 (99.92%) at 108 locations. GEH<5 for 99.07%
36000: Wrote 5455 routes (1101 distinct) achieving total count 13453 (100.16%) at 108 locations. GEH<5 for 99.07%
39600: Wrote 5316 routes (1137 distinct) achieving total count 13200 (98.00%) at 108 locations. GEH<5 for 98.15%
If you want to avoid short (one-detector-routes) you can call instead:
tools/routeSampler.py -r random_routes.xml --edgedata-files edgedata2.xml -o routesampler2.rou.xml --optimize full --mismatch-output mismatch2.xml -I -f poisson --edgedata-attribute qPKW --min-count 2
32400: Wrote 9150 routes (1001 distinct) achieving total count 30056 (93.17%) at 108 locations. GEH<5 for 93.52%
36000: Wrote 3843 routes (453 distinct) achieving total count 12261 (91.28%) at 108 locations. GEH<5 for 91.67%
39600: Wrote 3795 routes (569 distinct) achieving total count 12324 (91.50%) at 108 locations. GEH<5 for 91.67%
regards,
Jakob