cut_tour                 package:TSP                 R Documentation

_C_u_t _a _t_o_u_r _t_o _f_o_r_m _a _p_a_t_h

_D_e_s_c_r_i_p_t_i_o_n:

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

_U_s_a_g_e:

     cut_tour(x, cut, exclude_cut = TRUE)

_A_r_g_u_m_e_n_t_s:

       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.

_S_e_e _A_l_s_o:

     'TOUR'.

_E_x_a_m_p_l_e_s:

     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)

