solve_TSP
.
farthest_insertion : See solve_TSP
.
cheapest_insertion : See solve_TSP
.
arbitrary_insertion: See solve_TSP
.
nn: See solve_TSP
.
repetitive_nn: See solve_TSP
.
concorde: See solve_TSP
.
run_solver(x, method, ...)
tsp_instance
]
TSP instance.character(1)
]
Solver to use on TSP instance. To use concorde and/or linkern it is necessary to specify the path
to the concorde/linkern executable with concorde_path
.TOUR
]
TOUR object from package TSP, containing order of cities, tour length and
method name that generated this solution.
x = random_instance(10)
tours = sapply(c("nn", "cheapest_insertion", "arbitrary_insertion"), function(solver) {
list(solver = run_solver(x, method = solver))
})
## Not run:
# concorde_path(path = "/absolute/path/to/concorde/executable")
# concorde_tour = run_solver(x, method = "concorde")
# concorde_tour = run_solver(x, method = "linkern")
# ## End(Not run)
Run the code above in your browser using DataLab