This is a central function. It expects a solver (either a characterizing string or a TSPSolver object), a Network to operate on and optional parameter for the algorithm/solver. It then runs the solver on the instance and returns a solver result object.

runSolver(solver, instance, solver.pars = list(), solver.path = NULL,
  ...)

Arguments

solver

[character(1) || TSPSolver]
Either a string representation of the solver or a TSPSolver object.

instance

[Network | character(1)]
Instance to solve. Either a Network or a file path to the instance in TSPlib format.

solver.pars

[list]
Named list of parameters for the solver.

solver.path

[character(1) | NULL]
Path to external binary. Only relevant if global path is not set (see solverPaths function for details). Default is NULL.

...

[any] Alternative possibility to pass down parameters to the solver. Parameters passed this way take precedence over parameters passed via solver.pars.

Value

[TSPSolverResult]