data("USCA50")
## original order
tour_length(solve_TSP(USCA50, method="identity"))
## length of a manually created (random) tour
tour <- TOUR(sample(seq(n_of_cities(USCA50))))
tour
tour_length(tour)
tour_length(tour, USCA50)
Run the code above in your browser using DataLab