solver
This commit is contained in:
parent
dd5fd385ab
commit
6a9f4f187c
3 changed files with 3 additions and 3 deletions
2
run.py
2
run.py
|
@ -4,7 +4,7 @@ import pandas as pd
|
||||||
|
|
||||||
def run(show_plots=False, verbose=False):
|
def run(show_plots=False, verbose=False):
|
||||||
# names = [name_ for name_ in os.listdir("./problems") if "tsp" in name_]
|
# names = [name_ for name_ in os.listdir("./problems") if "tsp" in name_]
|
||||||
names = ["eil76.tsp", "kroA100.tsp"]
|
names = ["eil76.tsp"]
|
||||||
initializers = Solver_TSP.available_initializers.keys()
|
initializers = Solver_TSP.available_initializers.keys()
|
||||||
improvements = Solver_TSP.available_improvements.keys()
|
improvements = Solver_TSP.available_improvements.keys()
|
||||||
results = []
|
results = []
|
||||||
|
|
|
@ -21,7 +21,7 @@ class Solver_TSP:
|
||||||
|
|
||||||
available_improvements = {"2-opt": TwoOpt.loop2opt,
|
available_improvements = {"2-opt": TwoOpt.loop2opt,
|
||||||
"2.5-opt": TwoDotFiveOpt.loop2dot5opt,
|
"2.5-opt": TwoDotFiveOpt.loop2dot5opt,
|
||||||
"simulated_annealing": Simulated_Annealing.sm}
|
"simulated_annealing": Simulated_Annealing.sa}
|
||||||
|
|
||||||
# ,
|
# ,
|
||||||
# "simulated_annealing": Simulated_Annealing,
|
# "simulated_annealing": Simulated_Annealing,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
import os
|
||||||
if 'AI' in os.getcwd():
|
if 'AI' in os.getcwd():
|
||||||
from src.utils import *
|
from src.utils import *
|
||||||
else:
|
else:
|
||||||
|
|
Reference in a new issue