update
This commit is contained in:
parent
b267fb2ace
commit
5e324e9552
1 changed files with 6 additions and 1 deletions
7
run.py
7
run.py
|
@ -10,7 +10,12 @@ def run():
|
||||||
print(" --- ")
|
print(" --- ")
|
||||||
instance.plot_data()
|
instance.plot_data()
|
||||||
|
|
||||||
|
solver = Solver_TSP('random')
|
||||||
|
naive_solution = solver(instance)
|
||||||
|
solver.plot_solution()
|
||||||
|
print(f"the total length for the solution found is {solver.evaluate_solution()}",
|
||||||
|
f"while the optimal length is {instance.best_sol}",
|
||||||
|
f"the gap is {solver.gap} %", sep="\n")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Reference in a new issue