Tools/Detector

generated on 2017-05-02 00:27:06.104150 from the wiki page for Tools/Detector for SUMO 0.30.0

flowrouter.py

"flowrouter.py" serves as a drop in replacement for DFROUTER which calculates a set of routes -o and traffic flows -e from given detectors -d and their measurements -f on a given network (option -n). It does so by solving a maximum flow problem in the given network assuming the measured flows as capacity. The input data is by default time aggregated over the whole file but can be split into intervals by -i. Example call for hourly aggregation:

<SUMO_HOME>/tools/detector/flowrouter.py -n input_net.net.xml -d detectors.xml -f flows20140520.csv -o routes.xml -e flows.xml -i 60

Detectors which have no data (in the specified interval) or are permanently zero are ignored by default. To include them into the calculations use --respect-zero.

For additional parameters call

<SUMO_HOME>/tools/detector/flowrouter.py --help

Generating vehicles with additional parameters

With the option --params <STRING>, additional parameters can be given to the generated vehicles (note, usage of the quoting characters).

 <SUMO_HOME>/tools/detector/flowrouter.py -n input_net.net.xml --params="departLane=\"best\" departSpeed=\"max\" type=\"myType""

This would insert the vehicle with high speed on a reasonable lane. The vehicles would be defined with type myType (which could also be the name of a typeDistribution).

flowFromRoutes.py

This script does the reverse of flowrouter.py and DFROUTER in generating a traffic counts for detectors from a route or flow file. It can also be used to compare the input counts with the outputs of flowrouter.py and DFROUTER. Example:

<SUMO_HOME>/tools/detector/flowFromRoutes.py -d detectors.xml -r routes.xml -e flows.xml

This page was last modified on 18 April 2017, at 14:57.