cut_tour {TSP} | R Documentation |
Cuts a tour at a specified city to form a path.
cut_tour(x, cut, exclude_cut = TRUE)
x |
an object of class |
cut |
the index or label of the city to cut the tour. |
exclude_cut |
exclude the city where we cut? If |
TOUR
.
data("USCA50") tsp <- insert_dummy(USCA50, label = "cut") tour <- solve_TSP(tsp) ## cut tour into path at the dummy city path <- cut_tour(tour, "cut") labels(path)