All Projects → mhahsler → TSP

mhahsler / TSP

Licence: other
Traveling Salesperson Problem - R package

Programming Languages

r
7636 projects
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to TSP

arulesViz
Visualizing Association Rules and Frequent Itemsets with R
Stars: ✭ 49 (-9.26%)
Mutual labels:  cran
rdocumentation-2.0
📚 RDocumentation provides an easy way to search the documentation for every version of every R package on CRAN and Bioconductor.
Stars: ✭ 197 (+264.81%)
Mutual labels:  cran
RDML
RDML data import for R
Stars: ✭ 20 (-62.96%)
Mutual labels:  cran
rcppsimdjson
Rcpp Bindings for the 'simdjson' Header Library
Stars: ✭ 103 (+90.74%)
Mutual labels:  cran
packagefinder
Comfortable search for R packages on CRAN, either directly from the R console or with an R Studio add-in
Stars: ✭ 43 (-20.37%)
Mutual labels:  cran
RcppEigen
Rcpp integration for the Eigen templated linear algebra library
Stars: ✭ 89 (+64.81%)
Mutual labels:  cran
mRMRe
mRMRe is a package for Parallelized Minimum Redundancy, Maximum Relevance (mRMR) Ensemble Feature Selection
Stars: ✭ 16 (-70.37%)
Mutual labels:  cran
vosonSML
R package for collecting social media data and creating networks for analysis.
Stars: ✭ 65 (+20.37%)
Mutual labels:  cran
ga-for-cvrp
Capacitated Vehicle Routing Problem
Stars: ✭ 56 (+3.7%)
Mutual labels:  tsp
contextual
Contextual Bandits in R - simulation and evaluation of Multi-Armed Bandit Policies
Stars: ✭ 72 (+33.33%)
Mutual labels:  cran
pinyin
an R package for converting Chineses characters into pinyin
Stars: ✭ 45 (-16.67%)
Mutual labels:  cran
epanet2toolkit
An R package for calling the Epanet software for simulation of piping networks.
Stars: ✭ 13 (-75.93%)
Mutual labels:  cran
healthyR
Hospital Data Analysis Workflow Tools
Stars: ✭ 21 (-61.11%)
Mutual labels:  cran
rdomains
Classifying the content of domains
Stars: ✭ 47 (-12.96%)
Mutual labels:  cran
rcppcnpy
Rcpp bindings for NumPy files
Stars: ✭ 24 (-55.56%)
Mutual labels:  cran
python-tsp-simulated-annealing
Visualisation of Simulated Annealing algorithm to solve TSP
Stars: ✭ 41 (-24.07%)
Mutual labels:  tsp
oem
Penalized least squares estimation using the Orthogonalizing EM (OEM) algorithm
Stars: ✭ 22 (-59.26%)
Mutual labels:  cran
rcpptoml
Rcpp Bindings to C++ parser for TOML files
Stars: ✭ 26 (-51.85%)
Mutual labels:  cran
eia
An R package wrapping the US Energy Information Administration open data API.
Stars: ✭ 38 (-29.63%)
Mutual labels:  cran
mcmcr
An R package to manipulate MCMC samples
Stars: ✭ 17 (-68.52%)
Mutual labels:  cran

R package TSP - Traveling Salesperson Problem (TSP)

CRAN version stream r-universe status CRAN RStudio mirror downloads

This package provides the basic infrastructure and some algorithms for the traveling salesman problems (symmetric, asymmetric and Euclidean TSPs). The package provides some simple algorithms and an interface to the Concorde TSP solver and its implementation of the Chained-Lin-Kernighan heuristic.

Installation

Stable CRAN version: Install from within R with

install.packages("TSP")

Current development version: Install from r-universe.

install.packages("TSP", repos = "https://mhahsler.r-universe.dev")

Usage

Load a data set with 312 cities (USA and Canada) and create a TSP object.

library("TSP")
data("USCA312")

tsp <- TSP(USCA312)
tsp
## object of class 'TSP' 
## 312 cities (distance 'euclidean')

Find a tour using the default heuristic.

tour <- solve_TSP(tsp)
tour
## object of class 'TOUR' 
## result of method 'arbitrary_insertion+two_opt' for 312 cities
## tour length: 40743

Show the first few cities in the tour.

head(tour, n = 10)
##  Sheboygan, WI  Milwaukee, WI     Racine, WI    Kenosha, WI South Bend, IN 
##            253            165            214            135            259 
##       Gary, IN    Chicago, IL   Rockford, IL    Madison, WI    Dubuque, IA 
##            104             58            224            158             78

An online example application of TSP can be found on shinyapps.

References

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].