Explorar o código

adjusted numbering for x-axis labels (how many cities in the problem) to reflect 14-16 instead of 0-2

tarfeef101 %!s(int64=6) %!d(string=hai) anos
pai
achega
dd7a56e57c
Modificáronse 2 ficheiros con 1 adicións e 1 borrados
  1. BIN=BIN
      a2/hill_climbing.pdf
  2. 1 1
      a2/tsp_local.py

BIN=BIN
a2/hill_climbing.pdf


+ 1 - 1
a2/tsp_local.py

@@ -279,7 +279,7 @@ def main():
             
     for i in range(0, 3):
         axes[i].plot(range(1, 11), solution_steps[i], label = "Steps to Solution", color = 'b')
-        axes[i].set_xlabel("Problem Instance w/ " + str(i) + " cities")
+        axes[i].set_xlabel("Problem Instance w/ " + str(i + 14) + " cities")
         axes[i].set_ylabel("Steps Taken", color = 'b')
         axis_twin = axes[i].twinx()
         axis_twin.plot(range(1, 11), solution_scores[i], label = "Solution Cost/Distance", color = 'r')