cut_tour

0th

Percentile

Cut a tour to form a path

Cuts a tour at a specified city to form a path.

Keywords
optimize
Usage
cut_tour(x, cut, exclude_cut = TRUE)
Arguments
x
an object of class TOUR.
cut
the index or label of the city to cut the tour.
exclude_cut
exclude the city where we cut? If FALSE, the city at the cut is included in the path as the first city.
See Also

TOUR.

Aliases
  • cut_tour
  • cut_tour.TOUR
Examples
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)
Documentation reproduced from package TSP, version 1.1-4, License: GPL-3

Community examples

Looks like there are no examples yet.