Opt_HC_CG.hill.best_solution¶
-
best_solution
(coordinate, initial_point=0, tolerance=1e-07)[source]¶ - finds an optimal solution for the TSP problem using hill climbing algorithm
- input:
points: coordinates of the places to be visited initial_point[integer]: number of the place to be visited first tolerance[float]: value that indicates the solution is not improving
- outputs:
bst_distance[float]: distance of the best route best_sol[list]: order the places to be visted in the optimal solution time[float]: time that take the algorithm to obtain the solution