Skip to content

Commit 853ca43

Browse files
authored
Merge pull request #214 from toruseo/develop
fix empty route initialization bug
2 parents d0105ab + c4f232e commit 853ca43

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

demos_and_examples/example_26en_dynamic_traffic_assignment_DUO_DUE_DSO.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,3 @@ def create_World():
9292
solver_DSO.plot_convergence()
9393
solver_DSO.plot_link_stats()
9494
solver_DSO.plot_vehicle_stats(orig="4", dest="7")
95-
96-
solver_DSO.plot_convergence()
97-
solver_DSO.plot_link_stats()
98-
solver_DSO.plot_vehicle_stats(orig="4", dest="7")

uxsim/uxsim.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2667,8 +2667,10 @@ def __init__(s, W, links, name="", trust_input=False):
26672667
#todo: interpolation based on shotest path
26682668
if len(links) >= 2:
26692669
s.links.append(l2)
2670-
else:
2670+
elif len(links) >= 1:
26712671
s.links.append(W.get_link(links[0]))
2672+
else:
2673+
s.links = []
26722674
else:
26732675
#検査せずそのまま使用(計算コスト削減)
26742676
s.links = links

0 commit comments

Comments
 (0)