OSCR

Solving multi-depot closed-path multiple traveling salesman problem using k-means++ hierarchical clustering and neural combinatorial networks.

Code ↔ Paper

8 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

6 blocks of code here have a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.

The 8 matches
  1. [1] § Proposed method › Cluster refinement in KHC-NCN ↔ clustering.py, lines 7 to 84 · score 0.89 · donor clusters, singleton cluster, singleton node, cluster refinement, nearest cluster, target cluster · block oscr:b:PNV0RHY5Y35AW-N · Report a mismatch
  2. [2] § Experimental studies › Experimental setup › Neural TSP solver component ↔ nets/graph_encoder.py, lines 183 to 215 · score 0.69 · multi head attention, feed forward, graph, layer, encoder, masked · block oscr:b:DS97FK7BZBD3Q-L · Report a mismatch
  3. [3] § Proposed method › The proposed KHC-NCN algorithm ↔ solving_MTSP_one_instance.py, lines 14 to 53 · score 0.63 · end2end_solver, cluster refinement, MDCP MTSP, iteratively, sub, KHC · block oscr:b:JCHP1KM1YJ3ET-S · Report a mismatch
  4. [4] § Proposed method › Tour merging in KHC-NCN ↔ merge_sub_tours.py, lines 99 to 132 · score 0.63 · nearest inter tour, sub tour, clusters, edges, node · block oscr:b:7FHZ0B96R8KRA-T · Report a mismatch
  5. [5] § Experimental studies › Experimental setup › Neural TSP solver component ↔ problems/vrp/encode-attend-navigate/Neural_Reinforce.py, lines 103 to 239 · score 0.62 · blocks, attends, stack, permutation, encoded, layer · block oscr:b:SRARSSB7QYFQ1-1 · Report a mismatch
  6. [6] § Proposed method › The proposed KHC-NCN algorithm ↔ solving_MTSP_one_instance.py, lines 14 to 53 · score 0.60 · end2end_solver, sub clusters, MDCP MTSP, KHC NCN, model · block oscr:b:JCHP1KM1YJ3ET-S · Report a mismatch
  7. [7] § Experimental studies › Comparison with LKH-3 and POMO ↔ LKH-3.0.8/SRC/INCLUDE/LKH.h, lines 80 to 164 · score 0.60 · TSP transformation, cost matrix, customer, segmented, sub, depot · block oscr:b:2V6ZZWC5QPQF8-5 · Report a mismatch
  8. [8] § Proposed method › Tour merging in KHC-NCN ↔ merge_sub_tours.py, lines 99 to 132 · score 0.59 · farthest insertion, sub tours, centroids, cluster, TSP, nodes · block oscr:b:7FHZ0B96R8KRA-T · Report a mismatch

Paper

Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

Python · 158 lines · 5.9 KB · no license · 2 matches

  1. import argparse
  2. import os
  3. import math
  4. import numpy as np
  5. import time
  6. from tqdm import tqdm
  7. from clustering import k_means_plusplus_clustering_sklearn,clusterRefinement
  8. from neural_end2end_solver import end2end_solver,make_opts
  9. from common import HyperparametersConfig, TSP_tour_distance, loadDataFormTSPLibFile
  10. from end2end_model.kool2019.utils import load_model
  11. from merge_sub_tours import merge
  12. def KHC_NCN_MDCP_MTSP(mdcp_mtsp,salesman_m,ideal_cluster_size,alpha,model, random_seed=1234):
  13. # load config parameters
  14. config=HyperparametersConfig("config.ini")
  15. opts=make_opts()
  16. # clusters <- k-means++(mdcp_mtsp, salesman_m)
  17. clusters=k_means_plusplus_clustering_sklearn(mdcp_mtsp, salesman_m, max_iterations=config.max_clustering_iter, n_jobs=config.n_jobs, random_seed=random_seed)
  18. clusters=clusterRefinement(clusters,True)
  19. cluster_data_list=[]
  20. for c in clusters:
  21. cluster_data_list.append(np.copy(c["points"]))
  22. allTours=[]
  23. for tsp in tqdm(cluster_data_list):
  24. if tsp.shape[0]<=standard_cluster_size*(1+alpha):
  25. result_dict=end2end_solver(tsp,model,opts,normalize=True)
  26. allTours.append(result_dict["sorted_tsp_data"])
  27. else:
  28. k=math.floor(tsp.shape[0]/standard_cluster_size)
  29. if tsp.shape[0]-k*standard_cluster_size>standard_cluster_size*alpha:
  30. k=k+1
  31. sub_clusters=k_means_plusplus_clustering_sklearn(tsp, k, config.max_clustering_iter, config.n_jobs)
  32. sub_clusters=clusterRefinement(sub_clusters,False)
  33. # solve each cluster with end2end Model and merge the results
  34. subTours=[]
  35. for sub_cluster in sub_clusters:
  36. tmp_tsp_data=np.array(sub_cluster['points'])
  37. sub_tour_result_dict=end2end_solver(tmp_tsp_data,model,opts,normalize=True)
  38. sub_tour_result_dict["center"]=sub_cluster['centroid']
  39. subTours.append(sub_tour_result_dict)
  40. # merge the results
  41. merged_tour=merge(subTours)
  42. allTours.append(merged_tour)
  43. return allTours
  44. def solve_one_MTSP_with_different_K(data_file,model_path,standard_cluster_size,m_list,alpha,log_tag, random_seed=1234):
  45. m_list=[m_list[0]] + m_list
  46. ## load model
  47. end2end_model, _ = load_model(model_path)
  48. different_m_results=[]
  49. different_m_time_consumed_list=[]
  50. _,mdcp_mtsp_data=loadDataFormTSPLibFile(data_file)
  51. mdcp_mtsp=np.array(mdcp_mtsp_data)
  52. for m in tqdm(m_list):
  53. time_start=int(round(time.time()*1000))
  54. fixed_m_allTours=KHC_NCN_MDCP_MTSP(mdcp_mtsp,salesman_m=m,ideal_cluster_size=standard_cluster_size,alpha=alpha,model=end2end_model, random_seed=random_seed)
  55. total_distance=0
  56. for r in fixed_m_allTours:
  57. total_distance+=TSP_tour_distance(r)
  58. different_m_results.append(total_distance)
  59. end_time=int(round(time.time()*1000))
  60. time_consumed=end_time-time_start
  61. print("----------cluster sizes: m={}---------------".format(m))
  62. for r in fixed_m_allTours:
  63. print("cluster size:{}".format(len(r)))
  64. print("----------end cluster sizes---------------")
  65. print("total distance: {}".format(total_distance))
  66. print("time consumed: {} ms".format(time_consumed))
  67. different_m_time_consumed_list.append(time_consumed)
  68. return different_m_results[1:], different_m_time_consumed_list[1:]
  69. if __name__ == "__main__":
  70. config=HyperparametersConfig("config.ini")
  71. model_path=config.model
  72. standard_cluster_size=config.standard_cluster_size
  73. alpha=config.scaling_factor
  74. parser = argparse.ArgumentParser(
  75. description="Run MTSP experiment with user-provided data_file and k_list."
  76. )
  77. parser.add_argument(
  78. "--data_file", "-d", required=True, type=str,
  79. help="Path to the TSP/MTSP data file, e.g., data/eil76.tsp"
  80. )
  81. parser.add_argument(
  82. "--k_list", "-k", required=True, nargs='+',type=int,
  83. help="List of cluster sizes, e.g. -k 2 3 4 5"
  84. )
  85. parser.add_argument(
  86. "--random_seed", "-r", required=False,type=int,
  87. help="RandomSeed, e.g. 1234; default: None, meaning random"
  88. )
  89. args = parser.parse_args()
  90. data_file = args.data_file
  91. if not os.path.exists(data_file):
  92. raise FileNotFoundError(f"Data file not found: {data_file}")
  93. k_list = args.k_list
  94. print("data_file:", data_file)
  95. print("k_list:", k_list)
  96. if args.random_seed is not None:
  97. random_seed=args.random_seed
  98. print("random_seed:", random_seed)
  99. else:
  100. print("random_seed: default, using system time.")
  101. random_seed=int(time.time())
  102. pure_data_file_name=data_file.split("/")[-1].split(".")[0]
  103. k_list_str="_".join([str(k) for k in k_list])
  104. timestamp=time.strftime("%Y%m%d%H%M%S", time.localtime())
  105. log_tag="{}_TSP{}Model_m_{}_{}".format(pure_data_file_name, standard_cluster_size, k_list_str, timestamp)
  106. if not os.path.exists(data_file):
  107. raise FileNotFoundError(f"Data file not found: {data_file}")
  108. different_m_results, different_m_time_consumed_list=solve_one_MTSP_with_different_K(data_file,model_path,standard_cluster_size,k_list,alpha,log_tag, random_seed=random_seed)
  109. result_file_name="{}.txt".format(log_tag)
  110. log_dir="logs"
  111. if not os.path.exists(log_dir):
  112. os.makedirs(log_dir)
  113. with open(os.path.join(log_dir, result_file_name), "w") as f:
  114. for m, total_distance, time_consumed in zip(k_list, different_m_results, different_m_time_consumed_list):
  115. f.write("m={}; total_distance={}; time_consumed={} ms\n".format(m, total_distance, time_consumed))
  116. # print results
  117. print("-------------------Results-------------------")
  118. for m, total_distance, time_consumed in zip(k_list, different_m_results, different_m_time_consumed_list):
  119. print("m={}; total_distance={}; time_consumed={} ms".format(m, total_distance, time_consumed))

solving_MTSP_one_instance.py at commit 310a9cc, no license · at the source

Overview

Authors: Chun-Sheng Zhao1,2, Li-Pei Wong2, Chey Fung2
  1. School of Computer Science and Engineering, Sichuan University of Science & Engineering,Zigong, 643000 Sichuan China
  2. School of Computer Sciences, Universiti Sains Malaysia,11800 USM Gelugor, Pulau Pinang Malaysia
Journal: Scientific reports, volume 16, issue 1, article 15631
Dates: received 15 August 2025; accepted 23 March 2026; published online 2 April 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1038/s41598-026-45824-3 · PMID 41927696 · PMCID PMC13187187 · OpenAlex W7147148148
Open access: gold, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: methods / tools (subfield)
Methods: Machine learning
Keywords: Engineering, Mathematics and computing
Topic: Vehicle Routing Optimization Methods (Industrial and Manufacturing Engineering, Engineering), according to OpenAlex
Funding: Ministry of Higher Education Malaysia, Fundamental Research Grant Scheme (FRGS/1/2020/ICT02/USM/02/2)
Citations: not cited yet (Europe PMC); 64 references in the paper

Abstract

The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.

Repositories

Its files are read in the Code ↔ Paper reader above, with 8 matches between paragraphs and lines of code.

Zhao-Chunsheng/MDCP-MTSP-KHC-NCN

License: none: the authors keep all their rights
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: 310a9cca9bd3d2c98be043283128b14c0ef29d50, 8 May 2026
Languages: Python (70), Jupyter (2), Shell (2), C++ (1)
Size: 166 files, 75 scripts
Software Heritage: not archived
Found in: the appendix
Holds: README, CITATION.cff, environment (end2end_model/kool2019/environment.yml), tests, 2 notebooks
Not found: license file, continuous integration, documentation
Tools: PyTorch (31 files), NumPy (28 files), Matplotlib (4 files), scikit-learn (3 files), SciPy (3 files), TensorFlow (2 files)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
76 files

wouterkool/attention-learn-to-route

License: MIT
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: c9abf41ac2f878a55b20dc7e829bc942bb999631, 9 January 2024
Languages: Python (64), Jupyter (2), Shell (2), C++ (1)
Size: 145 files, 69 scripts
Software Heritage: archived
Found in: the appendix
Holds: README, license file, environment (environment.yml), tests, 2 notebooks
Not found: CITATION.cff, continuous integration, documentation
Tools: PyTorch (29 files), NumPy (22 files), Matplotlib (4 files), SciPy (3 files), scikit-learn (2 files), TensorFlow (2 files)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
71 files

yd-kwon/POMO

License: none: the authors keep all their rights
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: d7c3d6ea580499a53e874fe9e065f69e799a8551, 2 October 2022
Languages: Python (38), Jupyter (6)
Size: 77 files, 44 scripts
Software Heritage: not archived
Found in: the appendix
Holds: README, tests, 6 notebooks
Not found: license file, CITATION.cff, environment file, continuous integration, documentation
Tools: NumPy (24 files), PyTorch (22 files), Matplotlib (4 files)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
45 files

fikisipi/elkai

License: other
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: dbdd81256410d8c790b95459d07eaf6227f0e620, 23 December 2024
Languages: C (156), C/C++ (13), Python (10)
Size: 196 files, 179 scripts
Software Heritage: not archived
Found in: the appendix
Holds: README, license file, environment (pyproject.toml), tests, continuous integration
Not found: CITATION.cff, documentation
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
181 files

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 4 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 367 scripts, each with its path and the digest of its content;
  • 8 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

No dataset and no data link were found in the paper.

Data availability statement

The paper has a data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

  • no repository, dataset or request procedure was recognized in it

Read it in the paper: doi.org/10.1038/s41598-026-45824-3.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 28 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 3 authors, 2 keywords, 1 funder, 36 references.

Cite

This paper

Zhao, C.-S., Wong, L.-P., & Fung, C. (2026). Solving multi-depot closed-path multiple traveling salesman problem using k-means++ hierarchical clustering and neural combinatorial networks. Scientific reports, 16(1), 15631. https://doi.org/10.1038/s41598-026-45824-3

BibTeX

@article{zhao2026solving,
author = {Zhao, Chun-Sheng and Wong, Li-Pei and Fung, Chey},
title = {{Solving multi-depot closed-path multiple traveling salesman problem using k-means++ hierarchical clustering and neural combinatorial networks}},
journal = {Scientific reports},
year = {2026},
month = apr,
volume = {16},
number = {1},
pages = {15631},
publisher = {Nature Publishing Group},
issn = {2045-2322},
doi = {10.1038/s41598-026-45824-3},
url = {https://doi.org/10.1038/s41598-026-45824-3},
pmid = {41927696},
pmcid = {PMC13187187}
}

RIS

TY - JOUR
AU - Zhao, Chun-Sheng
AU - Wong, Li-Pei
AU - Fung, Chey
TI - Solving multi-depot closed-path multiple traveling salesman problem using k-means++ hierarchical clustering and neural combinatorial networks
T2 - Scientific reports
J2 - Sci Rep
PY - 2026
DA - 2026/04/02
VL - 16
IS - 1
SP - 15631
SN - 2045-2322
PB - Nature Publishing Group
DO - 10.1038/s41598-026-45824-3
UR - https://doi.org/10.1038/s41598-026-45824-3
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41598-026-45824-3",
"type": "article-journal",
"title": "Solving multi-depot closed-path multiple traveling salesman problem using k-means++ hierarchical clustering and neural combinatorial networks",
"container-title": "Scientific reports",
"author": [
{
"family": "Zhao",
"given": "Chun-Sheng"
},
{
"family": "Wong",
"given": "Li-Pei"
},
{
"family": "Fung",
"given": "Chey"
}
],
"container-title-short": "Sci Rep",
"volume": "16",
"issue": "1",
"page": "15631",
"DOI": "10.1038/s41598-026-45824-3",
"PMID": "41927696",
"PMCID": "PMC13187187",
"ISSN": "2045-2322",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s41598-026-45824-3",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
2
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.3390/biomimetics11070516 [code]
Evolutionary, Neural, or LLM-Driven Heuristic Generation? A Unified Ant Colony Optimization Benchmark for Nature-Inspired Routing Heuristics on the TSP and CVRP.
Journal: Biomimetics (Basel, Switzerland)
In common: PyTorch, scikit-learn, SciPy, 2 other tools, methods / tools, 1 reference
[2] doi:10.1186/s12868-022-00758-0 [code]
Objective hearing threshold identification from auditory brainstem response measurements using supervised and self-supervised approaches.
Journal: BMC neuroscience
In common: TensorFlow, scikit-learn, SciPy, 2 other tools, 1 reference
[3] doi:10.3389/fnagi.2021.729635 [code]
Longitudinal Analysis of Brain-Predicted Age in Amnestic and Non-amnestic Sporadic Early-Onset Alzheimer's Disease.
Journal: Frontiers in aging neuroscience
In common: TensorFlow, scikit-learn, SciPy, 2 other tools, 1 reference
[4] doi:10.3390/diagnostics15040470 [code]
Brain Morphometry and Cognitive Features in the Prediction of Irritable Bowel Syndrome.
Journal: Diagnostics (Basel, Switzerland)
In common: scikit-learn, SciPy, Matplotlib, 1 other tool, methods / tools, 1 reference
[5] doi:10.1016/j.xpro.2025.103693 [code]
Protocol to study brain dynamics of mammals through the hierarchy of complex correlation patterns defining a robust functional architecture.
Journal: STAR protocols
In common: PyTorch, SciPy, Matplotlib, 1 other tool, 1 reference
[6] doi:10.1111/epi.18705 [code]
Network hubs supporting memory encoding: Implications for cognitive preservation in epilepsy surgery.
Journal: Epilepsia
In common: scikit-learn, SciPy, NumPy, 1 reference
[7] doi:10.1117/1.nph.13.1.015001 [code]
DL-QC-fNIRS: a deep learning tool for automated quality control in functional near-infrared spectroscopy signals.
Journal: Neurophotonics
In common: methods / tools, 1 reference
[8] doi:10.3389/fnins.2026.1871265
Clustered pattern projection for EEG dementia classification: evaluating the reliability of disorder patterns.
Journal: Frontiers in neuroscience
In common: 1 reference
[9] doi:10.1093/nar/gkag374
Dual role of ZIC2 during neural induction: from priming transcription factor to enhancer activator.
Journal: Nucleic acids research
In common: 1 reference
[10] doi:10.3390/diagnostics16040530
Dynamic Mode Decomposition-Based Clustered Pattern Projection for Reliable Alzheimer's Disease Detection from EEG.
Journal: Diagnostics (Basel, Switzerland)
In common: 1 reference

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Add the badge to the code's README

OSCR: the badge of this paper

If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.

Markdown
<!-- oscr-badge:start -->
[![OSCR](https://openscicode.org/badge/doi/10.1038/s41598-026-45824-3.svg)](https://openscicode.org/badge/doi/10.1038/s41598-026-45824-3)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1038/s41598-026-45824-3.svg
   :target: https://openscicode.org/badge/doi/10.1038/s41598-026-45824-3
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1038/s41598-026-45824-3"><img src="https://openscicode.org/badge/doi/10.1038/s41598-026-45824-3.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->

On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".

If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.

Report a mismatch between the code and the paper · Report a code error (signed in)

Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.

Report a reproduction failure (signed in)

Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.