TSP 1.3.0 (2026/11/13)
New Features
- Added the improvement methods “or_opt” (Or-opt segment insertion with the control parameter
max_segment) and “three_opt” (3-opt exchange of three edges) tosolve_TSP(). Like “two_opt”, they work on distance matrices for TSPs and ATSPs and improve a giventouror a random tour. For ATSPs, no segments are reversed. - Added the control parameter
opttosolve_TSP()to refine a constructed tour with"two"(2-opt),"or"(Or-opt),"three"(3-opt), or"two+or"(2-opt and Or-opt alternately). The default method still uses 2-opt.
Deprecated
- The control parameter
two_optofsolve_TSP()is deprecated with a message. Useopt = "two"instead.
Changes
- write_TSPLIB() and the Concorde interface now round distances to the nearest integer instead of truncating them and warns if precision is too small.
- Removed the
seedargument (and control option) ofsolve_TSP()that was added in 1.2.8. Randomized methods rely again on R’s global random number generator, so useset.seed()before callingsolve_TSP(). The solvers no longer replace the global random-number state. - Repetitions (
repand method “repetitive_nn”) now draw one seed per repetition from the random number generator of the main R process and seed each foreach iteration with it, so results are reproducible withset.seed()independent of the foreach backend and the number of workers. - Concorde and linkern:
seedis now an optional control parameter, e.g.,control = list(seed = 1234), that is passed on to the executables (option-s) and is checked to be a valid non-negative integer. Without a seed, one is drawn from the R random number generator, soset.seed()makes them reproducible.
TSP 1.2.8 (09/30/2026)
- Modernized the test suite to testthat edition 3.
- Expanded solver, TSPLIB, boundary-case, and reproducibility tests; fixed zero-city handling for ATSP, ETSP, and random tours and one-city handling for simulated annealing.
- Added a
seedcontrol option for reproducible randomized repetitions across sequential and parallel foreach backends. - The Concorde and linkern interfaces now check solver exit statuses and clean temporary and auxiliary files after both successful and failed runs.
- Fixed spelling and documentation.
- Fixed input-validation bugs in TSP(), ATSP(), tour_length.ETSP(), and validate tour indices before passing them to C.
- Fixed dll registration.
TSP 1.2.7 (03/22/2026)
CRAN release: 2026-03-23
- Improved verbose output for method “sa.”
- Improved man page for solve_TSP (suggested by Henrik Bengtsson).
- Added TSPLIB support for formats GEO and ATT (by Benjamin Schwedinger).
TSP 1.2.6 (11/26/2025)
CRAN release: 2025-11-27
- Added method sa for simulated annealing.
- Unknown parameters now create warnings.
- Added verbose output to insertion algorithms.
- Improved some man pages.
- Updated README.
- Bugfix: Fixed precision issue for concorde/linkern with small distance values.
TSP 1.2-5 (05/27/2025)
CRAN release: 2025-05-27
- Changed Package description title.
- Bugfix: ETSP write issue for method Concorde. parameter precision is now used correctly (reported by: malipivo)
TSP 1.2-1 (07/14/2022)
CRAN release: 2022-07-14
TSP 1.1-7 (05/22/2019)
CRAN release: 2019-05-22
Bug Fixes
- concorde_path now normalizes the path (translates . and ~).
- reformulate_ATSP_as_TSP now keeps the method attribute (i.e., used distance measure)
- TSP and ATSP gained parameter method to store the name of the used distance metric.
- Fixed read_TSPLIB for EDGE_WEIGHT_FORMAT of LOWER_ROW, LOWER_DIAG_ROW, UPPER_COL and UPPER_DIAG_COL (reported by klukac).
TSP 1.1-5 (02/21/2017)
CRAN release: 2017-02-22
- fixed TSP labels.
- fixed tour_length for ETSP and added tests.
TSP 1.1-4 (2/21/2016)
CRAN release: 2016-02-22
- fixed bug in arbitrary insertion for TSPs with two or less cities (bug report by Shrinidhee Shevade).
- concorde and linkern help: exe argument was removed. The exe control argument for both methods in solve_TSP is now deprecated. Use concorde_path(path) instead.
- concorde and linkern gained a control argument verbose to suppress the output.
TSP 1.1-3 (9/2/2015)
CRAN release: 2015-09-03
- two-opt now works correctly with asymmetric TSPs (bug report by Luis Martinez).
TSP 1.1-1 (5/15/2015)
CRAN release: 2015-05-15
- improved speed of C code.
- compatibility with new release of testthat
TSP 1.1-0 (3/14/2015)
CRAN release: 2015-03-15
- default method is now arbitrary_insertion with two_opt refinement.
- we use foreach (use doParallel) to compute repetitions in parallel
- ETSP (Euclidean TSP) added.
- generic and arguments for tour_length have # Changed (first argument is now a tour).
- method “2-opt” was renamed to “two_opt” so it can also be used as a proper variable name.
- solve_TSP gained methods “identity” and “random”.
- solve_TSP gained options “repetition” and “two_opt”.
TSP 1.0-10 (2/3/2015)
CRAN release: 2015-02-03
- added check for argument cut in cut_tour
- Finding concord and linkern is now case insensitive (Reported by Mark Otto)
TSP 1.0-9 (7/16/2014)
CRAN release: 2014-07-16
- Check for NAs in distances.
- +INF and -INF are now handled in solve_TSP.
- fixed single quotes in vignette.
TSP 1.0-5 (11/10/2011)
CRAN release: 2011-11-10
- Changed constructor for TOUR to allow for method and tour_length.
- Bug fixes
TSP 1.0-4 (8/31/2011)
CRAN release: 2011-08-31
- Fixed bug with missing row/column labels in as.ATSP() (reported by Ian Deters)