|
@@ -210,7 +210,7 @@ def beck_weathers(cities, opt):
|
|
|
|
|
|
|
|
|
|
|
|
-def solver(problem, algo, x):
|
|
|
+def solver(problem, algo, *x):
|
|
|
|
|
|
prob = problem
|
|
|
with open(prob) as file:
|
|
@@ -251,7 +251,6 @@ def solver(problem, algo, x):
|
|
|
def main():
|
|
|
plt.ioff()
|
|
|
plt.switch_backend('agg')
|
|
|
- solver("instance_10.txt", 1, 0)
|
|
|
solution_steps = []
|
|
|
solution_scores = []
|
|
|
|
|
@@ -285,7 +284,7 @@ def main():
|
|
|
axis_twin.plot(range(1, 11), solution_scores[i], label = "Solution Cost/Distance")
|
|
|
axis_twin.set_ylabel("Distance in units")
|
|
|
|
|
|
- axes.legend()
|
|
|
+
|
|
|
plt.savefig("hill_climbing.pdf")
|
|
|
|
|
|
main()
|