Package: TSP 1.2.7

TSP: Infrastructure for the Traveling Salesperson Problem

Basic infrastructure and some algorithms for the traveling salesperson problem (also traveling salesman problem; TSP). The package provides some simple algorithms and an interface to the Concorde TSP solver and its implementation of the Chained-Lin-Kernighan heuristic. The code for Concorde itself is not included in the package and has to be obtained separately. Hahsler and Hornik (2007) <doi:10.18637/jss.v023.i02>.

Authors:Michael Hahsler [aut, cre, cph], Kurt Hornik [aut, cph]

TSP_1.2.7.tar.gz
TSP_1.2.7.zip(r-4.7)TSP_1.2.7.zip(r-4.6)TSP_1.2.7.zip(r-4.5)
TSP_1.2.7.tgz(r-4.6-x86_64)TSP_1.2.7.tgz(r-4.6-arm64)TSP_1.2.7.tgz(r-4.5-x86_64)TSP_1.2.7.tgz(r-4.5-arm64)
TSP_1.2.7.tar.gz(r-4.7-arm64)TSP_1.2.7.tar.gz(r-4.7-x86_64)TSP_1.2.7.tar.gz(r-4.6-arm64)TSP_1.2.7.tar.gz(r-4.6-x86_64)
TSP_1.2.7.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
TSP/json (API)
NEWS

# Install 'TSP' in R:
install.packages('TSP', repos = c('https://mhahsler.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/mhahsler/tsp/issues

Datasets:
  • USCA312 - USCA312/USCA50 - 312/50 cities in the US and Canada
  • USCA312_GPS - USCA312/USCA50 - 312/50 cities in the US and Canada
  • USCA50 - USCA312/USCA50 - 312/50 cities in the US and Canada

On CRAN:

Conda:

concorde-tsp-solvertsp

13.15 score 70 stars 95 packages 382 scripts 42k downloads 41 mentions 20 exports 3 dependencies

Last updated from:7a70be56da. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK109
linux-devel-x86_64OK116
source / vignettesOK170
linux-release-arm64OK116
linux-release-x86_64OK107
macos-release-arm64OK82
macos-release-x86_64OK135
macos-oldrel-arm64OK103
macos-oldrel-x86_64OK254
windows-develOK82
windows-releaseOK101
windows-oldrelOK72
wasm-releaseOK89

Exports:as.ATSPas.ETSPas.TOURas.TSPATSPconcorde_helpconcorde_pathcut_tourETSPfilter_ATSP_as_TSP_dummiesinsert_dummylinkern_helpn_of_citiesread_TSPLIBreformulate_ATSP_as_TSPsolve_TSPTOURtour_lengthTSPwrite_TSPLIB

Dependencies:codetoolsforeachiterators

Introduction to TSP

Rendered fromTSP.Rnwusingutils::Sweaveon May 22 2026.

Last update: 2026-03-23
Started: 2015-10-10

Readme and manuals

Help Manual

Help pageTopics
Class ATSP - Asymmetric traveling salesperson problemas.ATSP as.ATSP.dist as.ATSP.matrix as.matrix.ATSP ATSP image.ATSP labels.ATSP n_of_cities.ATSP print.ATSP
Using the Concorde TSP SolverConcorde concorde concorde_help concorde_path linkern_help
Cut a tour to form a pathcut_tour cut_tour.TOUR
Class ETSP - Euclidean traveling salesperson problemas.ETSP as.ETSP.data.frame as.ETSP.matrix as.matrix.ETSP as.TSP.ETSP ETSP image.ETSP labels.ETSP n_of_cities.ETSP plot.ETSP print.ETSP
Insert dummy cities into a distance matrixinsert_dummy insert_dummy.ATSP insert_dummy.ETSP insert_dummy.TSP
Reformulate a ATSP as a symmetric TSPfilter_ATSP_as_TSP_dummies reformulate_ATSP_as_TSP
TSP solver interfacesolve_TSP solve_TSP.ATSP solve_TSP.ETSP solve_TSP.TSP
Class TOUR - Solution to a traveling salesperson problemas.TOUR as.TOUR.integer as.TOUR.numeric print.TOUR TOUR
Calculate the length of a tourtour_length tour_length.ATSP tour_length.ETSP tour_length.integer tour_length.TOUR tour_length.TSP
Class TSP - Symmetric traveling salesperson problemas.dist.TSP as.TSP as.TSP.dist as.TSP.matrix image.TSP labels.TSP n_of_cities n_of_cities.TSP print.TSP TSP
Read and write TSPLIB filesread_TSPLIB TSPLIB write_TSPLIB write_TSPLIB.ATSP write_TSPLIB.ETSP write_TSPLIB.TSP
USCA312/USCA50 - 312/50 cities in the US and CanadaUSCA USCA312 USCA312_GPS USCA50