run_solver {tspmeta} | R Documentation |
Runs a solver on a TSP instance.
Description
Currently the following solvers are supported:
nearest_insertion: See 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
.
Usage
run_solver(x, method, ...)
Arguments
x |
[ |
method |
[ |
... |
[any] |
Value
[TOUR
]
TOUR object from package TSP, containing order of cities, tour length and
method name that generated this solution.
Examples
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)
[Package tspmeta version 1.2 Index]