Commits

Tommaso Urli committed 715d799

Enforced non-zero distances between different stations (fixed).

  • Participants
  • Parent commits 5885709

Comments (0)

Files changed (1)

             if s == t:
                 instance.write("0 ")
             else:
-                d = max(1,distances[s][t][distance_measure]) # avoid 0 traveling times
+                d = distances[s][t][distance_measure] 
                 
                 # rescale, sec -> min, meters -> hundreds of meters (for readability)
                 if distance_measure == "time":
-                    d = int(d / 60)
+                    d = max(1, int(d / 60)) # avoid 0 traveling times
                 else:
                     d = int(d / 100)