Tools/tls
tlsCoordinator.py
This script modifies the traffic-light offsets to coordinate them for a given traffic demand. Example call:
<SUMO_HOME>/tools/tlsCoordinator.py -n net.net.xml -r routes.rou.xml -o tlsOffsets.add.xml
This would generate the file tlsOffsets.add.xml which can be loaded into SUMO:
sumo -n net.net.xml -r routes.rou.xml -a tlsOffsets.add.xml
It is advisable to run this with a .net.xml file where all traffic lights have the same cycle time. This is the default since version 0.25.0 but older networks should be rebuilt
tlsCycleAdaptation.py
This script modifies the duration of green phases according to Websters formula to best accomodate a given traffic demand. Example call:
<SUMO_HOME>/tools/tlsCycleAdaptation.py -n net.net.xml -r routes.rou.xml -o newTLS.add.xml
This would generate the file newTLS.add.xml which can be loaded into SUMO:
sumo -n net.net.xml -r routes.rou.xml -a newTLS.add.xml
tls_csv2SUMO.py
Converts a csv-tls-description into one SUMO can read as additional file. Format of the csv-file:
key;105
subkey;utopia
offset;0
(link;<LINK_NUMBER>;<FROMEDGE>|<FROMLANE>;[<TOEDGE>|<TOLANE>];0)+
(param;<NAME>;<VALUE>)+
(<LINK_NUMBER>;<PHASE_LIGHT>[;<PHASE_LIGHT>]+)+
(min;<PHASE_LENGTH>[;<PHASE_LENGTH>]+)*
time;<PHASE_LENGTH>[;<PHASE_LENGTH>]+
(max;<PHASE_LENGTH>[;<PHASE_LENGTH>]+)*