Tools/Turn-defs

The tools described in this document live in tools/turn-defs of the SUMO sources directory.

generateTurnDefs.py

This script allows generation of the turn definitions based on the number of lanes allowing particular turns. The basic functionality distributes the traffic uniformly, that is:

  1. distribute the incoming traffic uniformly across the lanes forming the road
  2. distribute the amount of traffic assigned to each lane uniformly among the destinations that the lane allows turns to.
  3. sum up the values for each of the destinations that the road being processed allows turning to.

The script allows to be extended with new traffic distribution policies (for example, based on Gaussian distribution) easily. See the DestinationWeightCalculator class for details.

The script processes the connections given in the provided *.con.xml file. For usage details, execute the generateTurnDefs.py script with --help option.

Note:
You can generate a connections file with all the connections in the network using NETCONVERT - see the --plain-output-prefix option.

This page was last modified on 26 October 2011, at 11:06.