Adapted from stats::optim(). Check their documentation / examples for details.

TSP.dist(x, mydist)

Arguments

x

a valid closed route for the TSP instance

mydist

object of class dist defining the TSP instance