Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] ZeroDivisionError in tlsCycleAdaptation

Hello,

 

I tried to use the “tlsCycleAdaptation.py” to adjust the tls in my network. Unfortunately, the attached ZeroDivisionError occurs.

 

The network is originally an “OSMWebWizard”-export and the tls have been guessed by the “netconvert” tool.

The files are too big for an email, you can find them here: https://syncandshare.lrz.de/getlink/fi9hqTJz9W9QayNcnqE7gN/tlsCycleAdaptation.zip

 

May I kindly ask if there is a solution to this problem?

 

 

Thank you.

C:\Users\gu92fol\Documents\Dissertation\PCIM\PyCharm-Workspace\Code\PCIM\Kassel\Network-creation>python "C:\Program Files (x86)\Eclipse\Sumo\tools\tlsCycleAdaptation.py" -c 2023-03-03_Kassel_tlsCycleAdaptation.config
the total number of tls: 1353
Begin time:0
parsing route file: ../Demand-creation/Routes/2023-03-03_Kassel_car-routes_281218.rou.xml
Parsed 386020 vehicles from ../Demand-creation/Routes/2023-03-03_Kassel_car-routes_281218.rou.xml.
parsing route file: ../Demand-creation/Routes/2023-03-03_Kassel_truck-routes_281218.rou.xml
Parsed 4779 vehicles from ../Demand-creation/Routes/2023-03-03_Kassel_truck-routes_281218.rou.xml.
Skipping TLS 'cluster_1013513430_1013513450_1946804881_1946804882_1951688770_1965702348_248929621_354425705_4046269853_7476783471_7476783472_7476783473_7476783474_7476783475_7476783476_830459013' due to unused states (23 states, 21 connections)
Skipping TLS 'cluster_1393034967_1400277463_1738471704_1946804951_1946804963_1946804964_1946804972_1946804980_1946897436_1946897477_1946897481_1947582456_1947582461_1951688820_1951688853_1951688863_2365712676_2608202155_2622552960_2622552961_26512720_26512956_2715501506_2800736814_2800736821_2800736826_2800736830_2800736833_4266973438_4266973439_5835862598_5835862601_5915931417_738671320_738671321_738671326_738671328_738671329_738671331_8977433468_8977433472' due to unused states (254 states, 247 connections)
Skipping TLS 'cluster_1422541145_1485155184_215597949_2499406218_3575923496_3575923500_441385463_4676373593' due to unused states (53 states, 46 connections)
Skipping TLS 'cluster_1990182252_9349983353' due to unused states (27 states, 24 connections)
Skipping TLS 'cluster_2510955580_2510955581_2510955585_298393299_32864624_3817455460_4093197876_4093197877_4163829732_4163829736' due to unused states (37 states, 36 connections)
Skipping TLS 'joinedS_1381559119_cluster_1389274181_cluster_1381558917_1381559120_cluster_241604259_3834915389_3834915390_4484034878_7473465894' due to unused states (50 states, 49 connections)
Skipping TLS 'joinedS_20' due to unused states (37 states, 35 connections)
Skipping TLS 'joinedS_28' due to unused states (452 states, 447 connections)
Skipping TLS 'joinedS_3' due to unused states (65 states, 17 connections)
Skipping TLS 'joinedS_4' due to unused states (27 states, 25 connections)
tl-logic ID: 10205342654
phase: 0
group flows: [42, 4.0]
The used lanes: [[1]]
phase: 2
group flows: [42, 0]
The used lanes: [[1]]
the current cycle length:90 sec
Green time for phase 0: 81
Green time for phase 2: 10
The optimal cycle length:101

tl-logic ID: 10205342655
phase: 0
group flows: [42, 0]
The used lanes: [[1]]
phase: 2
group flows: [42]
The used lanes: []
the current cycle length:90 sec
Traceback (most recent call last):
  File "C:\Program Files (x86)\Eclipse\Sumo\tools\tlsCycleAdaptation.py", line 482, in <module>
    main(options)
  File "C:\Program Files (x86)\Eclipse\Sumo\tools\tlsCycleAdaptation.py", line 457, in main
    groupFlowsMap = optimizeGreenTime(tl, groupFlowsMap, phaseLaneIndexMap, currentLength, options)
  File "C:\Program Files (x86)\Eclipse\Sumo\tools\tlsCycleAdaptation.py", line 365, in optimizeGreenTime
    (criticalFlowRateMap[i] / sum(criticalFlowRateMap.values())) - options.yellowtime + options.losttime
ZeroDivisionError: float division by zero

Back to the top