Difference between revisions of "Tools/Trip"

From Sumo
Jump to navigation Jump to search
(explained new options for randomTrips)
Line 4: Line 4:
 
  randomTrips.py -n input_net.net.xml -e 50 -l
 
  randomTrips.py -n input_net.net.xml -e 50 -l
 
The script does not check whether the chosen destination may be reached from the source. This task is performed by the router.
 
The script does not check whether the chosen destination may be reached from the source. This task is performed by the router.
 +
 +
The option {{Option| --min-distance {{DT_FLOAT}}}} ensures a minimum distance between start and end edges of a trip.
 +
 +
The option {{Option| --fringe-factor {{DT_FLOAT}}}} increases the probability that trips will start/end at the fringe of the network.
 +
{{Note| The fringe is detected by checking for edges which have no sucessor or predecessor. The network may have to be generated with option {{Option| --no-turnarounds}} or patched manually to ensure that the fringe is properly detected.}}
 +
  
 
The script is located in: {{SUMO}}/tools/trip
 
The script is located in: {{SUMO}}/tools/trip

Revision as of 15:20, 3 May 2012

randomTrips.py

"randomTrips.py" generates a set of random trips for a given network (option "-n"). It does so by choosing source and destination edge either uniformly at random or weighted by length (option "-l"), by number of lanes (option "-L") or both. The resulting trips are stored in an xml file (option "-o", default trips.trips.xml) suitable for the DUAROUTER which is called automatically if the "-r" option (with a filename for the resulting route file) is given. The trips are distributed evenly in an interval defined by begin (option "-b", default 0) and end time (option "-e", default 3600) in seconds. The number of trips is defined by the repetition rate (option "-p", default 1) in seconds. Every trip has an id consisting of a prefix (option "-t", default "t") and a running number. Example call:

randomTrips.py -n input_net.net.xml -e 50 -l

The script does not check whether the chosen destination may be reached from the source. This task is performed by the router.

The option --min-distance <FLOAT> ensures a minimum distance between start and end edges of a trip.

The option --fringe-factor <FLOAT> increases the probability that trips will start/end at the fringe of the network.

Note:
The fringe is detected by checking for edges which have no sucessor or predecessor. The network may have to be generated with option --no-turnarounds or patched manually to ensure that the fringe is properly detected.


The script is located in: <SUMO_HOME>/tools/trip

route2trips.py

This script generates a trip file from a route file by stripping all route information except for start and end edge. It has a single parameter which is the route file and prints the trip file to stdout. Example:

route2trips.py input_routes.rou.xml

The script is located in: <SUMO_HOME>/tools/trip