Commits

Tommaso Urli  committed 5885709

Enforcing non-zero distances between different stations.

  • Participants
  • Parent commits d5a3b65

Comments (0)

Files changed (2)

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

File insts_all.sh

+#!/bin/sh
+
+./insts.py -sd snapshots -id instances -r 0 -s 10
+./insts.py -sd snapshots -id instances -r 1 -s 20
+./insts.py -sd snapshots -id instances -r 2 -s 30
+./insts.py -sd snapshots -id instances -r 3 -s 60
+./insts.py -sd snapshots -id instances -r 4 -s 90
+./insts.py -sd snapshots -id instances -r 5 -s 120
+./insts.py -sd snapshots -id instances -r 6 -s 150
+./insts.py -sd snapshots -id instances -r 7 -s 180
+./insts.py -sd snapshots -id instances -r 8 -s 210
+./insts.py -sd snapshots -id instances -r 9 -s 240