MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / main

Function main

searches/tabu_search.py:253–268  ·  view source on GitHub ↗
(args=None)

Source from the content-addressed store, hash-verified

251
252
253def main(args=None):
254 dict_of_neighbours = generate_neighbours(args.File)
255
256 first_solution, distance_of_first_solution = generate_first_solution(
257 args.File, dict_of_neighbours
258 )
259
260 best_sol, best_cost = tabu_search(
261 first_solution,
262 distance_of_first_solution,
263 dict_of_neighbours,
264 args.Iterations,
265 args.Size,
266 )
267
268 print(f"Best solution: {best_sol}, with total distance: {best_cost}.")
269
270
271if __name__ == "__main__":

Callers 1

tabu_search.pyFile · 0.70

Calls 3

generate_neighboursFunction · 0.85
generate_first_solutionFunction · 0.85
tabu_searchFunction · 0.85

Tested by

no test coverage detected