{
  "_id": "6a1016cfacfb0bcc41c84b31",
  "Package": "TSP",
  "Type": "Package",
  "Title": "Infrastructure for the Traveling Salesperson Problem",
  "Version": "1.2.7",
  "Date": "2026-03-22",
  "Authors@R": "c(person(\"Michael\", \"Hahsler\",\nrole = c(\"aut\", \"cre\", \"cph\"),\nemail = \"mhahsler@lyle.smu.edu\",\ncomment = c(ORCID = \"0000-0003-2716-1405\")),\nperson(\"Kurt\", \"Hornik\",\nrole = c(\"aut\", \"cph\"),\ncomment = c(ORCID = \"0000-0003-4198-9911\"))\n)",
  "Description": "Basic infrastructure and some algorithms for the traveling\nsalesperson problem (also traveling salesman problem; TSP). The\npackage provides some simple algorithms and an interface to the\nConcorde TSP solver and its implementation of the\nChained-Lin-Kernighan heuristic. The code for Concorde itself\nis not included in the package and has to be obtained\nseparately. Hahsler and Hornik (2007)\n<doi:10.18637/jss.v023.i02>.",
  "Classification/ACM": "G.1.6, G.2.1, G.4",
  "URL": "https://github.com/mhahsler/TSP",
  "BugReports": "https://github.com/mhahsler/TSP/issues",
  "Encoding": "UTF-8",
  "RoxygenNote": "7.3.3",
  "Roxygen": "list(markdown = TRUE)",
  "License": "GPL-3",
  "Copyright": "All code is Copyright (C) Michael Hahsler and Kurt Hornik.",
  "Repository": "https://mhahsler.r-universe.dev",
  "Date/Publication": "2026-03-23 13:41:29 UTC",
  "RemoteUrl": "https://github.com/mhahsler/TSP",
  "RemoteRef": "HEAD",
  "RemoteSha": "7a70be56da481d0d2f052ed78894bda145e1c7cb",
  "NeedsCompilation": "yes",
  "Packaged": {
    "Date": "2026-05-22 08:36:59 UTC",
    "User": "root"
  },
  "Author": "Michael Hahsler [aut, cre, cph] (ORCID:\n<https://orcid.org/0000-0003-2716-1405>),\nKurt Hornik [aut, cph] (ORCID: <https://orcid.org/0000-0003-4198-9911>)",
  "Maintainer": "Michael Hahsler <mhahsler@lyle.smu.edu>",
  "MD5sum": "c30a379930e114c63a528b185546c2bc",
  "_user": "mhahsler",
  "_type": "src",
  "_file": "TSP_1.2.7.tar.gz",
  "_fileid": "31082ae6f2372a834c448aac016e0e560d0ee3863f542cbe813867212b6c9178",
  "_filesize": 1422463,
  "_sha256": "31082ae6f2372a834c448aac016e0e560d0ee3863f542cbe813867212b6c9178",
  "_created": "2026-05-22T08:36:59.000Z",
  "_published": "2026-05-22T08:41:51.120Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 77345338722,
      "time": 109,
      "config": "linux-devel-arm64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7156344800"
    },
    {
      "job": 77345338691,
      "time": 116,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7156347500"
    },
    {
      "job": 77345338728,
      "time": 116,
      "config": "linux-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7156347245"
    },
    {
      "job": 77345338651,
      "time": 107,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7156344406"
    },
    {
      "job": 77345338829,
      "time": 103,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7156343315"
    },
    {
      "job": 77345338719,
      "time": 254,
      "config": "macos-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7156390572"
    },
    {
      "job": 77345338702,
      "time": 82,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7156336500"
    },
    {
      "job": 77345338677,
      "time": 135,
      "config": "macos-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7156352935"
    },
    {
      "job": 77344913150,
      "time": 170,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7156311846"
    },
    {
      "job": 77345338659,
      "time": 89,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7156338976"
    },
    {
      "job": 77345338644,
      "time": 82,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7156336822"
    },
    {
      "job": 77345338632,
      "time": 72,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7156334284"
    },
    {
      "job": 77345338676,
      "time": 101,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7156342650"
    }
  ],
  "_buildurl": "https://github.com/r-universe/mhahsler/actions/runs/26277382342",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/mhahsler/TSP",
  "_commit": {
    "id": "7a70be56da481d0d2f052ed78894bda145e1c7cb",
    "author": "mhahsler <michael@hahsler.net>",
    "committer": "mhahsler <michael@hahsler.net>",
    "message": "Updated readme. Release.\n",
    "time": 1774273289
  },
  "_maintainer": {
    "name": "Michael Hahsler",
    "email": "mhahsler@lyle.smu.edu",
    "login": "mhahsler",
    "description": "I develop packages for AI, ML, and Data Science.",
    "uuid": 14900595,
    "orcid": "0000-0003-2716-1405"
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.5.0",
      "role": "Depends"
    },
    {
      "package": "graphics",
      "role": "Imports"
    },
    {
      "package": "foreach",
      "role": "Imports"
    },
    {
      "package": "utils",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "grDevices",
      "role": "Imports"
    },
    {
      "package": "maps",
      "role": "Suggests"
    },
    {
      "package": "doParallel",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "role": "Suggests"
    }
  ],
  "_owner": "mhahsler",
  "_selfowned": true,
  "_usedby": 95,
  "_updates": [
    {
      "week": "2025-22",
      "n": 1
    },
    {
      "week": "2025-32",
      "n": 1
    },
    {
      "week": "2025-44",
      "n": 3
    },
    {
      "week": "2025-45",
      "n": 3
    },
    {
      "week": "2025-48",
      "n": 4
    },
    {
      "week": "2026-08",
      "n": 3
    },
    {
      "week": "2026-09",
      "n": 1
    },
    {
      "week": "2026-12",
      "n": 3
    },
    {
      "week": "2026-13",
      "n": 1
    }
  ],
  "_tags": [
    {
      "name": "TSP_1.2.5",
      "date": "2025-05-27"
    },
    {
      "name": "TSP_1.2.6",
      "date": "2025-11-26"
    },
    {
      "name": "TSP_1.2.7",
      "date": "2026-03-23"
    }
  ],
  "_topics": [
    "concorde-tsp-solver",
    "tsp"
  ],
  "_stars": 70,
  "_contributors": [
    {
      "user": "mhahsler",
      "count": 114,
      "uuid": 14900595
    },
    {
      "user": "ben-schwen",
      "count": 7,
      "uuid": 52290390
    }
  ],
  "_userbio": {
    "uuid": 14900595,
    "type": "user",
    "name": "Michael Hahsler",
    "description": "I develop packages for AI, ML, and Data Science."
  },
  "_downloads": {
    "count": 41511,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/TSP"
  },
  "_mentions": 41,
  "_devurl": "https://github.com/mhahsler/tsp",
  "_searchresults": 382,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "extra/TSP.html",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/mhahsler/tsp",
  "_realowner": "mhahsler",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.1-2",
      "date": "2006-09-18"
    },
    {
      "version": "0.2-0",
      "date": "2006-12-21"
    },
    {
      "version": "0.2-1",
      "date": "2007-04-25"
    },
    {
      "version": "0.2-2",
      "date": "2007-12-31"
    },
    {
      "version": "0.2-3",
      "date": "2008-02-03"
    },
    {
      "version": "0.2-4",
      "date": "2008-08-10"
    },
    {
      "version": "0.2-6",
      "date": "2009-02-07"
    },
    {
      "version": "1.0-0",
      "date": "2009-03-24"
    },
    {
      "version": "1.0-1",
      "date": "2010-07-31"
    },
    {
      "version": "1.0-2",
      "date": "2011-01-14"
    },
    {
      "version": "1.0-3",
      "date": "2011-05-26"
    },
    {
      "version": "1.0-4",
      "date": "2011-08-31"
    },
    {
      "version": "1.0-5",
      "date": "2011-11-10"
    },
    {
      "version": "1.0-6",
      "date": "2011-11-29"
    },
    {
      "version": "1.0-7",
      "date": "2012-08-22"
    },
    {
      "version": "1.0-8",
      "date": "2013-09-06"
    },
    {
      "version": "1.0-9",
      "date": "2014-07-16"
    },
    {
      "version": "1.0-10",
      "date": "2015-02-03"
    },
    {
      "version": "1.1-0",
      "date": "2015-03-15"
    },
    {
      "version": "1.1-1",
      "date": "2015-05-15"
    },
    {
      "version": "1.1-2",
      "date": "2015-06-30"
    },
    {
      "version": "1.1-3",
      "date": "2015-09-03"
    },
    {
      "version": "1.1-4",
      "date": "2016-02-22"
    },
    {
      "version": "1.1-5",
      "date": "2017-02-22"
    },
    {
      "version": "1.1-6",
      "date": "2018-04-30"
    },
    {
      "version": "0.1-1",
      "date": "2019-07-10"
    },
    {
      "version": "1.1-7",
      "date": "2019-07-10"
    },
    {
      "version": "1.1-8",
      "date": "2020-01-23"
    },
    {
      "version": "1.1-9",
      "date": "2020-02-21"
    },
    {
      "version": "1.1-10",
      "date": "2020-04-17"
    },
    {
      "version": "1.1-11",
      "date": "2021-10-06"
    },
    {
      "version": "1.2-0",
      "date": "2022-02-21"
    },
    {
      "version": "1.2-1",
      "date": "2022-07-14"
    },
    {
      "version": "1.2-2",
      "date": "2023-01-25"
    },
    {
      "version": "1.2-3",
      "date": "2023-03-08"
    },
    {
      "version": "1.2-4",
      "date": "2023-04-04"
    },
    {
      "version": "1.2-5",
      "date": "2025-05-27"
    },
    {
      "version": "1.2.6",
      "date": "2025-11-27"
    },
    {
      "version": "1.2.7",
      "date": "2026-03-23"
    }
  ],
  "_exports": [
    "as.ATSP",
    "as.ETSP",
    "as.TOUR",
    "as.TSP",
    "ATSP",
    "concorde_help",
    "concorde_path",
    "cut_tour",
    "ETSP",
    "filter_ATSP_as_TSP_dummies",
    "insert_dummy",
    "linkern_help",
    "n_of_cities",
    "read_TSPLIB",
    "reformulate_ATSP_as_TSP",
    "solve_TSP",
    "TOUR",
    "tour_length",
    "TSP",
    "write_TSPLIB"
  ],
  "_datasets": [
    {
      "name": "USCA312",
      "title": "USCA312/USCA50 - 312/50 cities in the US and Canada",
      "object": "USCA312",
      "file": "USCA312.rda",
      "class": [
        "TSP",
        "dist"
      ],
      "fields": [],
      "table": false,
      "tojson": false
    },
    {
      "name": "USCA312_GPS",
      "title": "USCA312/USCA50 - 312/50 cities in the US and Canada",
      "object": "USCA312_GPS",
      "file": "USCA312_GPS.rda",
      "class": [
        "data.frame"
      ],
      "fields": [
        "long",
        "lat",
        "name"
      ],
      "rows": 312,
      "table": true,
      "tojson": true
    },
    {
      "name": "USCA50",
      "title": "USCA312/USCA50 - 312/50 cities in the US and Canada",
      "object": "USCA50",
      "file": "USCA50.rda",
      "class": [
        "TSP",
        "dist"
      ],
      "fields": [],
      "table": false,
      "tojson": false
    }
  ],
  "_help": [
    {
      "page": "ATSP",
      "title": "Class ATSP - Asymmetric traveling salesperson problem",
      "concept": [
        "TSP"
      ],
      "topics": [
        "as.ATSP",
        "as.ATSP.dist",
        "as.ATSP.matrix",
        "as.matrix.ATSP",
        "ATSP",
        "image.ATSP",
        "labels.ATSP",
        "n_of_cities.ATSP",
        "print.ATSP"
      ]
    },
    {
      "page": "Concorde",
      "title": "Using the Concorde TSP Solver",
      "concept": [
        "TSP"
      ],
      "topics": [
        "Concorde",
        "concorde",
        "concorde_help",
        "concorde_path",
        "linkern_help"
      ]
    },
    {
      "page": "cut_tour",
      "title": "Cut a tour to form a path",
      "concept": [
        "TOUR"
      ],
      "topics": [
        "cut_tour",
        "cut_tour.TOUR"
      ]
    },
    {
      "page": "ETSP",
      "title": "Class ETSP - Euclidean traveling salesperson problem",
      "concept": [
        "TSP"
      ],
      "topics": [
        "as.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"
      ]
    },
    {
      "page": "insert_dummy",
      "title": "Insert dummy cities into a distance matrix",
      "concept": [
        "TSP"
      ],
      "topics": [
        "insert_dummy",
        "insert_dummy.ATSP",
        "insert_dummy.ETSP",
        "insert_dummy.TSP"
      ]
    },
    {
      "page": "reformulate_ATSP_as_TSP",
      "title": "Reformulate a ATSP as a symmetric TSP",
      "concept": [
        "TSP"
      ],
      "topics": [
        "filter_ATSP_as_TSP_dummies",
        "reformulate_ATSP_as_TSP"
      ]
    },
    {
      "page": "solve_TSP",
      "title": "TSP solver interface",
      "concept": [
        "TOUR",
        "TSP"
      ],
      "topics": [
        "solve_TSP",
        "solve_TSP.ATSP",
        "solve_TSP.ETSP",
        "solve_TSP.TSP"
      ]
    },
    {
      "page": "TOUR",
      "title": "Class TOUR - Solution to a traveling salesperson problem",
      "concept": [
        "TOUR"
      ],
      "topics": [
        "as.TOUR",
        "as.TOUR.integer",
        "as.TOUR.numeric",
        "print.TOUR",
        "TOUR"
      ]
    },
    {
      "page": "tour_length",
      "title": "Calculate the length of a tour",
      "concept": [
        "TOUR"
      ],
      "topics": [
        "tour_length",
        "tour_length.ATSP",
        "tour_length.ETSP",
        "tour_length.integer",
        "tour_length.TOUR",
        "tour_length.TSP"
      ]
    },
    {
      "page": "TSP",
      "title": "Class TSP - Symmetric traveling salesperson problem",
      "concept": [
        "TSP"
      ],
      "topics": [
        "as.dist.TSP",
        "as.TSP",
        "as.TSP.dist",
        "as.TSP.matrix",
        "image.TSP",
        "labels.TSP",
        "n_of_cities",
        "n_of_cities.TSP",
        "print.TSP",
        "TSP"
      ]
    },
    {
      "page": "TSPLIB",
      "title": "Read and write TSPLIB files",
      "concept": [
        "TSP"
      ],
      "topics": [
        "read_TSPLIB",
        "TSPLIB",
        "write_TSPLIB",
        "write_TSPLIB.ATSP",
        "write_TSPLIB.ETSP",
        "write_TSPLIB.TSP"
      ]
    },
    {
      "page": "USCA",
      "title": "USCA312/USCA50 - 312/50 cities in the US and Canada",
      "topics": [
        "USCA",
        "USCA312",
        "USCA312_GPS",
        "USCA50"
      ]
    }
  ],
  "_pkglogo": "https://github.com/mhahsler/TSP/raw/HEAD/man/figures/logo.svg",
  "_readme": "https://github.com/mhahsler/TSP/raw/HEAD/README.md",
  "_rundeps": [
    "codetools",
    "foreach",
    "iterators"
  ],
  "_vignettes": [
    {
      "source": "TSP.Rnw",
      "filename": "TSP.pdf",
      "title": "Introduction to TSP",
      "engine": "utils::Sweave",
      "headings": [],
      "created": "2015-10-10 03:20:13",
      "modified": "2026-03-23 13:41:29",
      "commits": 6
    }
  ],
  "_score": 13.15338197236853,
  "_indexed": true,
  "_nocasepkg": "tsp",
  "_universes": [
    "mhahsler"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.2.7",
      "date": "2026-05-22T08:38:53.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "7a70be56da481d0d2f052ed78894bda145e1c7cb",
      "fileid": "aeeafae34a24efd7802ac102f1e4742553851186be8588163c7e4f56b3d577e8",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/mhahsler/actions/runs/26277382342"
    },
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.2.7",
      "date": "2026-05-22T08:38:59.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "7a70be56da481d0d2f052ed78894bda145e1c7cb",
      "fileid": "5ef41a8ebf3796ba870ffd9638e7a8479f87cafce3b086c4e396b049df11e49f",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/mhahsler/actions/runs/26277382342"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "1.2.7",
      "date": "2026-05-22T08:39:03.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "7a70be56da481d0d2f052ed78894bda145e1c7cb",
      "fileid": "4a189af35816e8b2e0e504ace7e0e99fdfff9c17a3f70b63be43635a55a82e0a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/mhahsler/actions/runs/26277382342"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "1.2.7",
      "date": "2026-05-22T08:38:52.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "7a70be56da481d0d2f052ed78894bda145e1c7cb",
      "fileid": "b041b9d42ed600e610ebc4bd419a5043c29361a00f44ae9c8063f6c674cded83",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/mhahsler/actions/runs/26277382342"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.2.7",
      "date": "2026-05-22T08:38:49.000Z",
      "arch": "aarch64",
      "commit": "7a70be56da481d0d2f052ed78894bda145e1c7cb",
      "fileid": "47e5079057138b90e9c3d5d700e896c181cd86d9ee1efca62fa44ee3e3aea55c",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/mhahsler/actions/runs/26277382342"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.2.7",
      "date": "2026-05-22T08:40:34.000Z",
      "arch": "x86_64",
      "commit": "7a70be56da481d0d2f052ed78894bda145e1c7cb",
      "fileid": "1033186b6d7d481032401546915896097725a4a6d6a4d403ec77a2d48d2c41b1",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/mhahsler/actions/runs/26277382342"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "1.2.7",
      "date": "2026-05-22T08:38:28.000Z",
      "arch": "aarch64",
      "commit": "7a70be56da481d0d2f052ed78894bda145e1c7cb",
      "fileid": "682838829f92c942dc08d8c5e0881ddd90da3932c12d7246498745e4e7e80a7d",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/mhahsler/actions/runs/26277382342"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "1.2.7",
      "date": "2026-05-22T08:39:09.000Z",
      "arch": "x86_64",
      "commit": "7a70be56da481d0d2f052ed78894bda145e1c7cb",
      "fileid": "18a0ddafd7760dc44e5e7092b8208e15af8c0ca22deb78b4a2cd2817ed14c3a1",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/mhahsler/actions/runs/26277382342"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "1.2.7",
      "date": "2026-05-22T08:38:46.000Z",
      "arch": "emscripten",
      "commit": "7a70be56da481d0d2f052ed78894bda145e1c7cb",
      "fileid": "a88f6894cb7a7cbb453e323c3f6628e5d970fe09443d92d289f3b3cf3131acc4",
      "status": "success",
      "buildurl": "https://github.com/r-universe/mhahsler/actions/runs/26277382342"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "1.2.7",
      "date": "2026-05-22T08:38:13.000Z",
      "arch": "x86_64",
      "commit": "7a70be56da481d0d2f052ed78894bda145e1c7cb",
      "fileid": "e0d3bb0db5d9d8d53b31836a758e3c3bcca84d75efdb37af3386a37f06ca3efe",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/mhahsler/actions/runs/26277382342"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "1.2.7",
      "date": "2026-05-22T08:38:05.000Z",
      "arch": "x86_64",
      "commit": "7a70be56da481d0d2f052ed78894bda145e1c7cb",
      "fileid": "56cbb9b168ada6d05d5f35b0cfc44f24727492527987afae85a98568ba2304ea",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/mhahsler/actions/runs/26277382342"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "1.2.7",
      "date": "2026-05-22T08:38:30.000Z",
      "arch": "x86_64",
      "commit": "7a70be56da481d0d2f052ed78894bda145e1c7cb",
      "fileid": "e3047c6c36a54d297bcedb135913166ba42e98568286535969d477e96561411f",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/mhahsler/actions/runs/26277382342"
    }
  ]
}