Solving multi-depot closed-path multiple traveling salesman problem using k-means++ hierarchical clustering and neural combinatorial networks.
The 8 matches
- [1] § Proposed method › Cluster refinement in KHC-NCN ↔ clustering.py, lines 7–84 · score 0.89 · donor clusters, singleton cluster, singleton node, cluster refinement, nearest cluster, target cluster
- [2] § Experimental studies › Experimental setup › Neural TSP solver component ↔ nets/graph_encoder.py, lines 183–215 · score 0.69 · multi head attention, feed forward, graph, layer, encoder, masked
- [3] § Proposed method › The proposed KHC-NCN algorithm ↔ solving_MTSP_one_instance.py, lines 14–53 · score 0.63 · end2end_solver, cluster refinement, MDCP MTSP, iteratively, sub, KHC
- [4] § Proposed method › Tour merging in KHC-NCN ↔ merge_sub_tours.py, lines 99–132 · score 0.63 · nearest inter tour, sub tour, clusters, edges, node
- [5] § Experimental studies › Experimental setup › Neural TSP solver component ↔ problems/vrp/encode-attend-navigate/Neural_Reinforce.py, lines 103–239 · score 0.62 · blocks, attends, stack, permutation, encoded, layer
- [6] § Proposed method › The proposed KHC-NCN algorithm ↔ solving_MTSP_one_instance.py, lines 14–53 · score 0.60 · end2end_solver, sub clusters, MDCP MTSP, KHC NCN, model
- [7] § Experimental studies › Comparison with LKH-3 and POMO ↔ LKH-3.0.8/SRC/INCLUDE/LKH.h, lines 80–164 · score 0.60 · TSP transformation, cost matrix, customer, segmented, sub, depot
- [8] § Proposed method › Tour merging in KHC-NCN ↔ merge_sub_tours.py, lines 99–132 · score 0.59 · farthest insertion, sub tours, centroids, cluster, TSP, nodes
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: 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
- import argparse
- import os
- import math
- import numpy as np
- import time
- from tqdm import tqdm
- from clustering import k_means_plusplus_clustering_sklearn,clusterRefinement
- from neural_end2end_solver import end2end_solver,make_opts
- from common import HyperparametersConfig, TSP_tour_distance, loadDataFormTSPLibFile
- from end2end_model.kool2019.utils import load_model
- from merge_sub_tours import merge
- def KHC_NCN_MDCP_MTSP(mdcp_mtsp,salesman_m,ideal_cluster_size,alpha,model, random_seed=1234):
- # load config parameters
- config=HyperparametersConfig("config.ini")
- opts=make_opts()
- # clusters <- k-means++(mdcp_mtsp, salesman_m)
- 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)
- clusters=clusterRefinement(clusters,True)
- cluster_data_list=[]
- for c in clusters:
- cluster_data_list.append(np.copy(c["points"]))
- allTours=[]
- for tsp in tqdm(cluster_data_list):
- if tsp.shape[0]<=standard_cluster_size*(1+alpha):
- result_dict=end2end_solver(tsp,model,opts,normalize=True)
- allTours.append(result_dict["sorted_tsp_data"])
- else:
- k=math.floor(tsp.shape[0]/standard_cluster_size)
- if tsp.shape[0]-k*standard_cluster_size>standard_cluster_size*alpha:
- k=k+1
- sub_clusters=k_means_plusplus_clustering_sklearn(tsp, k, config.max_clustering_iter, config.n_jobs)
- sub_clusters=clusterRefinement(sub_clusters,False)
- # solve each cluster with end2end Model and merge the results
- subTours=[]
- for sub_cluster in sub_clusters:
- tmp_tsp_data=np.array(sub_cluster['points'])
- sub_tour_result_dict=end2end_solver(tmp_tsp_data,model,opts,normalize=True)
- sub_tour_result_dict["center"]=sub_cluster['centroid']
- subTours.append(sub_tour_result_dict)
- # merge the results
- merged_tour=merge(subTours)
- allTours.append(merged_tour)
- return allTours
- def solve_one_MTSP_with_different_K(data_file,model_path,standard_cluster_size,m_list,alpha,log_tag, random_seed=1234):
- m_list=[m_list[0]] + m_list
- ## load model
- end2end_model, _ = load_model(model_path)
- different_m_results=[]
- different_m_time_consumed_list=[]
- _,mdcp_mtsp_data=loadDataFormTSPLibFile(data_file)
- mdcp_mtsp=np.array(mdcp_mtsp_data)
- for m in tqdm(m_list):
- time_start=int(round(time.time()*1000))
- 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)
- total_distance=0
- for r in fixed_m_allTours:
- total_distance+=TSP_tour_distance(r)
- different_m_results.append(total_distance)
- end_time=int(round(time.time()*1000))
- time_consumed=end_time-time_start
- print("----------cluster sizes: m={}---------------".format(m))
- for r in fixed_m_allTours:
- print("cluster size:{}".format(len(r)))
- print("----------end cluster sizes---------------")
- print("total distance: {}".format(total_distance))
- print("time consumed: {} ms".format(time_consumed))
- different_m_time_consumed_list.append(time_consumed)
- return different_m_results[1:], different_m_time_consumed_list[1:]
- if __name__ == "__main__":
- config=HyperparametersConfig("config.ini")
- model_path=config.model
- standard_cluster_size=config.standard_cluster_size
- alpha=config.scaling_factor
- parser = argparse.ArgumentParser(
- description="Run MTSP experiment with user-provided data_file and k_list."
- )
- parser.add_argument(
- "--data_file", "-d", required=True, type=str,
- help="Path to the TSP/MTSP data file, e.g., data/eil76.tsp"
- )
- parser.add_argument(
- "--k_list", "-k", required=True, nargs='+',type=int,
- help="List of cluster sizes, e.g. -k 2 3 4 5"
- )
- parser.add_argument(
- "--random_seed", "-r", required=False,type=int,
- help="RandomSeed, e.g. 1234; default: None, meaning random"
- )
- args = parser.parse_args()
- data_file = args.data_file
- if not os.path.exists(data_file):
- raise FileNotFoundError(f"Data file not found: {data_file}")
- k_list = args.k_list
- print("data_file:", data_file)
- print("k_list:", k_list)
- if args.random_seed is not None:
- random_seed=args.random_seed
- print("random_seed:", random_seed)
- else:
- print("random_seed: default, using system time.")
- random_seed=int(time.time())
- pure_data_file_name=data_file.split("/")[-1].split(".")[0]
- k_list_str="_".join([str(k) for k in k_list])
- timestamp=time.strftime("%Y%m%d%H%M%S", time.localtime())
- log_tag="{}_TSP{}Model_m_{}_{}".format(pure_data_file_name, standard_cluster_size, k_list_str, timestamp)
- if not os.path.exists(data_file):
- raise FileNotFoundError(f"Data file not found: {data_file}")
- 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)
- result_file_name="{}.txt".format(log_tag)
- log_dir="logs"
- if not os.path.exists(log_dir):
- os.makedirs(log_dir)
- with open(os.path.join(log_dir, result_file_name), "w") as f:
- for m, total_distance, time_consumed in zip(k_list, different_m_results, different_m_time_consumed_list):
- f.write("m={}; total_distance={}; time_consumed={} ms\n".format(m, total_distance, time_consumed))
- # print results
- print("-------------------Results-------------------")
- for m, total_distance, time_consumed in zip(k_list, different_m_results, different_m_time_consumed_list):
- 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
- School of Computer Science and Engineering, Sichuan University of Science & Engineering,Zigong, 643000 Sichuan China
- School of Computer Sciences, Universiti Sains Malaysia,11800 USM Gelugor, Pulau Pinang Malaysia
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
310a9cca9bd3d2c98be043283128b14c0ef29d50, 8 May 2026Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
76 files
- clustering.py, Python, 104 lines, 1 match
- common.py, Python, 37 lines
- end2end_model/
kool2019/ , Python, 222 lineseval.py - end2end_model/
kool2019/ , Python, 168 lineseval_zhao.py - end2end_model/
kool2019/ , Python, 167 linesgenerate_data.py - end2end_model/
kool2019/ , Python, 1 linenets/ __init__.py - end2end_model/
kool2019/ , Python, 513 linesnets/ attention_model.py - end2end_model/
kool2019/ , Python, 40 linesnets/ critic_network.py - end2end_model/
kool2019/ , Python, 215 linesnets/ graph_encoder.py - end2end_model/
kool2019/ , Python, 353 linesnets/ pointer_network.py - end2end_model/
kool2019/ , Python, 87 linesoptions.py - end2end_model/
kool2019/ , Jupyter, 146 linesplot_vrp.ipynb - end2end_model/
kool2019/ , Python, 4 linesproblems/ __init__.py - end2end_model/
kool2019/ , Python, 1 lineproblems/ op/ __init__.py - end2end_model/
kool2019/ , Shell, 15 linesproblems/ op/ install_compass.sh - end2end_model/
kool2019/ , Python, 394 linesproblems/ op/ op_baseline.py - end2end_model/
kool2019/ , Python, 119 linesproblems/ op/ op_gurobi.py - end2end_model/
kool2019/ , Python, 263 linesproblems/ op/ op_ortools.py - end2end_model/
kool2019/ , Python, 1 lineproblems/ op/ opga/ __init__.py - end2end_model/
kool2019/ , Python, 154 linesproblems/ op/ opga/ opevo.py - end2end_model/
kool2019/ , Python, 131 linesproblems/ op/ opga/ oph.py - end2end_model/
kool2019/ , Python, 33 linesproblems/ op/ opga/ optest.py - end2end_model/
kool2019/ , Python, 141 linesproblems/ op/ problem_op.py - end2end_model/
kool2019/ , Python, 159 linesproblems/ op/ state_op.py - end2end_model/
kool2019/ , Python, 42 linesproblems/ op/ tsiligirides.py - end2end_model/
kool2019/ , C++, 616 linesproblems/ pctsp/ PCTSP/ PCPTSP/ main.cpp - end2end_model/
kool2019/ , Python, 1 lineproblems/ pctsp/ __init__.py - end2end_model/
kool2019/ , Python, 455 linesproblems/ pctsp/ pctsp_baseline.py - end2end_model/
kool2019/ , Python, 124 linesproblems/ pctsp/ pctsp_gurobi.py - end2end_model/
kool2019/ , Python, 242 linesproblems/ pctsp/ pctsp_ortools.py - end2end_model/
kool2019/ , Python, 184 linesproblems/ pctsp/ problem_pctsp.py - end2end_model/
kool2019/ , Python, 1 lineproblems/ pctsp/ salesman/ __init__.py - end2end_model/
kool2019/ , Python, 11 linesproblems/ pctsp/ salesman/ pctsp/ __init__.py - end2end_model/
kool2019/ , Python, 2 linesproblems/ pctsp/ salesman/ pctsp/ __main__.py - end2end_model/
kool2019/ , Python, 10 linesproblems/ pctsp/ salesman/ pctsp/ algo/ __init__.py - end2end_model/
kool2019/ , Python, 30 linesproblems/ pctsp/ salesman/ pctsp/ algo/ geni.py - end2end_model/
kool2019/ , Python, 27 linesproblems/ pctsp/ salesman/ pctsp/ algo/ genius.py - end2end_model/
kool2019/ , Python, 98 linesproblems/ pctsp/ salesman/ pctsp/ algo/ ilocal_search.py - end2end_model/
kool2019/ , Python, 60 linesproblems/ pctsp/ salesman/ pctsp/ application.py - end2end_model/
kool2019/ , Python, 10 linesproblems/ pctsp/ salesman/ pctsp/ model/ __init__.py - end2end_model/
kool2019/ , Python, 42 linesproblems/ pctsp/ salesman/ pctsp/ model/ pctsp.py - end2end_model/
kool2019/ , Python, 164 linesproblems/ pctsp/ salesman/ pctsp/ model/ solution.py - end2end_model/
kool2019/ , Python, 1 lineproblems/ pctsp/ salesman/ pctsp/ model/ tests/ __init__.py - end2end_model/
kool2019/ , Python, 60 linesproblems/ pctsp/ salesman/ pctsp/ model/ tests/ test_solution.py - end2end_model/
kool2019/ , Python, 167 linesproblems/ pctsp/ state_pctsp.py - end2end_model/
kool2019/ , Python, 1 lineproblems/ tsp/ __init__.py - end2end_model/
kool2019/ , Shell, 27 linesproblems/ tsp/ install_concorde.sh - end2end_model/
kool2019/ , Python, 77 linesproblems/ tsp/ problem_tsp.py - end2end_model/
kool2019/ , Python, 133 linesproblems/ tsp/ state_tsp.py - end2end_model/
kool2019/ , Python, 449 linesproblems/ tsp/ tsp_baseline.py - end2end_model/
kool2019/ , Python, 121 linesproblems/ tsp/ tsp_gurobi.py - end2end_model/
kool2019/ , Python, 1 lineproblems/ vrp/ __init__.py - end2end_model/
kool2019/ , Python, 464 linesproblems/ vrp/ encode-attend-navigate/ Neural_Reinforce.py - end2end_model/
kool2019/ , Python, 109 linesproblems/ vrp/ encode-attend-navigate/ data_generator.py - end2end_model/
kool2019/ , Python, 100 linesproblems/ vrp/ encode-attend-navigate/ utils.py - end2end_model/
kool2019/ , Python, 205 linesproblems/ vrp/ problem_vrp.py - end2end_model/
kool2019/ , Python, 155 linesproblems/ vrp/ state_cvrp.py - end2end_model/
kool2019/ , Python, 119 linesproblems/ vrp/ state_sdvrp.py - end2end_model/
kool2019/ , Python, 265 linesproblems/ vrp/ vrp_baseline.py - end2end_model/
kool2019/ , Python, 246 linesreinforce_baselines.py - end2end_model/
kool2019/ , Python, 172 linesrun.py - end2end_model/
kool2019/ , Jupyter, 212 linessimple_tsp.ipynb - end2end_model/
kool2019/ , Python, 162 linestrain.py - end2end_model/
kool2019/ , Python, 1 lineutils/ __init__.py - end2end_model/
kool2019/ , Python, 218 linesutils/ beam_search.py - end2end_model/
kool2019/ , Python, 68 linesutils/ boolmask.py - end2end_model/
kool2019/ , Python, 25 linesutils/ data_utils.py - end2end_model/
kool2019/ , Python, 209 linesutils/ functions.py - end2end_model/
kool2019/ , Python, 55 linesutils/ lexsort.py - end2end_model/
kool2019/ , Python, 24 linesutils/ log_utils.py - end2end_model/
kool2019/ , Python, 70 linesutils/ monkey_patch.py - end2end_model/
kool2019/ , Python, 34 linesutils/ tensor_functions.py - merge_sub_tours.py, Python, 305 lines, 2 matches
- neural_end2end_solver.py
, Python, 57 lines - solving_MTSP_one_instanc
e.py , Python, 158 lines, 2 matches - README.md, Text, 18 lines
wouterkool/attention-learn-to-route
c9abf41ac2f878a55b20dc7e829bc942bb999631, 9 January 2024Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
71 files
- eval.py, Python, 216 lines
- generate_data.py, Python, 167 lines
- nets/
__init__.py , Python, 1 line - nets/
attention_model.py , Python, 513 lines - nets/
critic_network.py , Python, 40 lines - nets/
graph_encoder.py , Python, 215 lines, 1 match - nets/
pointer_network.py , Python, 353 lines - options.py, Python, 87 lines
- plot_vrp.ipynb, Jupyter, 146 lines
- problems/
__init__.py , Python, 4 lines - problems/
op/ , Python, 1 line__init__.py - problems/
op/ , Shell, 15 linesinstall_compass.sh - problems/
op/ , Python, 394 linesop_baseline.py - problems/
op/ , Python, 119 linesop_gurobi.py - problems/
op/ , Python, 263 linesop_ortools.py - problems/
op/ , Python, 1 lineopga/ __init__.py - problems/
op/ , Python, 154 linesopga/ opevo.py - problems/
op/ , Python, 131 linesopga/ oph.py - problems/
op/ , Python, 33 linesopga/ optest.py - problems/
op/ , Python, 141 linesproblem_op.py - problems/
op/ , Python, 159 linesstate_op.py - problems/
op/ , Python, 42 linestsiligirides.py - problems/
pctsp/ , C++, 616 linesPCTSP/ PCPTSP/ main.cpp - problems/
pctsp/ , Python, 1 line__init__.py - problems/
pctsp/ , Python, 455 linespctsp_baseline.py - problems/
pctsp/ , Python, 124 linespctsp_gurobi.py - problems/
pctsp/ , Python, 242 linespctsp_ortools.py - problems/
pctsp/ , Python, 184 linesproblem_pctsp.py - problems/
pctsp/ , Python, 1 linesalesman/ __init__.py - problems/
pctsp/ , Python, 11 linessalesman/ pctsp/ __init__.py - problems/
pctsp/ , Python, 2 linessalesman/ pctsp/ __main__.py - problems/
pctsp/ , Python, 10 linessalesman/ pctsp/ algo/ __init__.py - problems/
pctsp/ , Python, 30 linessalesman/ pctsp/ algo/ geni.py - problems/
pctsp/ , Python, 27 linessalesman/ pctsp/ algo/ genius.py - problems/
pctsp/ , Python, 98 linessalesman/ pctsp/ algo/ ilocal_search.py - problems/
pctsp/ , Python, 60 linessalesman/ pctsp/ application.py - problems/
pctsp/ , Python, 10 linessalesman/ pctsp/ model/ __init__.py - problems/
pctsp/ , Python, 42 linessalesman/ pctsp/ model/ pctsp.py - problems/
pctsp/ , Python, 164 linessalesman/ pctsp/ model/ solution.py - problems/
pctsp/ , Python, 1 linesalesman/ pctsp/ model/ tests/ __init__.py - problems/
pctsp/ , Python, 60 linessalesman/ pctsp/ model/ tests/ test_solution.py - problems/
pctsp/ , Python, 167 linesstate_pctsp.py - problems/
tsp/ , Python, 1 line__init__.py - problems/
tsp/ , Shell, 27 linesinstall_concorde.sh - problems/
tsp/ , Python, 77 linesproblem_tsp.py - problems/
tsp/ , Python, 133 linesstate_tsp.py - problems/
tsp/ , Python, 449 linestsp_baseline.py - problems/
tsp/ , Python, 121 linestsp_gurobi.py - problems/
vrp/ , Python, 1 line__init__.py - problems/
vrp/ , Python, 464 lines, 1 matchencode-attend-navigate/ Neural_Reinforce.py - problems/
vrp/ , Python, 109 linesencode-attend-navigate/ data_generator.py - problems/
vrp/ , Python, 100 linesencode-attend-navigate/ utils.py - problems/
vrp/ , Python, 205 linesproblem_vrp.py - problems/
vrp/ , Python, 155 linesstate_cvrp.py - problems/
vrp/ , Python, 119 linesstate_sdvrp.py - problems/
vrp/ , Python, 265 linesvrp_baseline.py - reinforce_baselines.py, Python, 246 lines
- run.py, Python, 172 lines
- simple_tsp.ipynb, Jupyter, 212 lines
- train.py, Python, 162 lines
- utils/
__init__.py , Python, 1 line - utils/
beam_search.py , Python, 218 lines - utils/
boolmask.py , Python, 68 lines - utils/
data_utils.py , Python, 25 lines - utils/
functions.py , Python, 209 lines - utils/
lexsort.py , Python, 55 lines - utils/
log_utils.py , Python, 24 lines - utils/
monkey_patch.py , Python, 70 lines - utils/
tensor_functions.py , Python, 34 lines - LICENSE, License, 21 lines
- README.md, Text, 117 lines
yd-kwon/POMO
d7c3d6ea580499a53e874fe9e065f69e799a8551, 2 October 2022Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
45 files
- NEW_py_ver/
CVRP/ , Python, 48 linesCVRProblemDef.py - NEW_py_ver/
CVRP/ , Python, 240 linesPOMO/ CVRPEnv.py - NEW_py_ver/
CVRP/ , Python, 378 linesPOMO/ CVRPModel.py - NEW_py_ver/
CVRP/ , Python, 130 linesPOMO/ CVRPTester.py - NEW_py_ver/
CVRP/ , Python, 200 linesPOMO/ CVRPTrainer.py - NEW_py_ver/
CVRP/ , Python, 113 linesPOMO/ test_n100.py - NEW_py_ver/
CVRP/ , Python, 132 linesPOMO/ train_n100.py - NEW_py_ver/
TSP/ , Python, 127 linesPOMO/ TSPEnv.py - NEW_py_ver/
TSP/ , Python, 321 linesPOMO/ TSPModel.py - NEW_py_ver/
TSP/ , Python, 127 linesPOMO/ TSPTester.py - NEW_py_ver/
TSP/ , Python, 195 linesPOMO/ TSPTrainer.py - NEW_py_ver/
TSP/ , Python, 106 linesPOMO/ test_n100.py - NEW_py_ver/
TSP/ , Python, 106 linesPOMO/ test_n20.py - NEW_py_ver/
TSP/ , Python, 130 linesPOMO/ train_n100.py - NEW_py_ver/
TSP/ , Python, 130 linesPOMO/ train_n20.py - NEW_py_ver/
TSP/ , Python, 31 linesTSProblemDef.py - NEW_py_ver/
utils/ , Python, 342 linesutils.py - OLD_ipynb_ver/
POMO_CVRP/ , Python, 27 linesHYPER_PARAMS.py - OLD_ipynb_ver/
POMO_CVRP/ , Jupyter, 333 linesInference.ipynb - OLD_ipynb_ver/
POMO_CVRP/ , Python, 46 linesTORCH_OBJECTS.py - OLD_ipynb_ver/
POMO_CVRP/ , Jupyter, 171 linesTrain.ipynb - OLD_ipynb_ver/
POMO_CVRP/ , Python, 311 linessource/ MODEL__Actor/ grouped_actors.py - OLD_ipynb_ver/
POMO_CVRP/ , Python, 105 linessource/ TRAIN_N_EVAL/ Evaluate__Grouped_Actors .py - OLD_ipynb_ver/
POMO_CVRP/ , Python, 137 linessource/ TRAIN_N_EVAL/ Train_Grouped_Actors.py - OLD_ipynb_ver/
POMO_CVRP/ , Python, 346 linessource/ cvrp.py - OLD_ipynb_ver/
POMO_CVRP/ , Python, 201 linessource/ utilities.py - OLD_ipynb_ver/
POMO_KP/ , Python, 28 linesHYPER_PARAMS.py - OLD_ipynb_ver/
POMO_KP/ , Jupyter, 223 linesInference.ipynb - OLD_ipynb_ver/
POMO_KP/ , Python, 46 linesTORCH_OBJECTS.py - OLD_ipynb_ver/
POMO_KP/ , Jupyter, 170 linesTrain.ipynb - OLD_ipynb_ver/
POMO_KP/ , Python, 305 linessource/ MODEL__Actor/ grouped_actors.py - OLD_ipynb_ver/
POMO_KP/ , Python, 99 linessource/ TRAIN_N_EVAL/ Evaluate_Grouped_Actors. py - OLD_ipynb_ver/
POMO_KP/ , Python, 133 linessource/ TRAIN_N_EVAL/ Train_Grouped_Actors.py - OLD_ipynb_ver/
POMO_KP/ , Python, 295 linessource/ knapsack_problem.py - OLD_ipynb_ver/
POMO_KP/ , Python, 174 linessource/ utilities.py - OLD_ipynb_ver/
POMO_TSP/ , Python, 27 linesHYPER_PARAMS.py - OLD_ipynb_ver/
POMO_TSP/ , Jupyter, 296 linesInference.ipynb - OLD_ipynb_ver/
POMO_TSP/ , Python, 46 linesTORCH_OBJECTS.py - OLD_ipynb_ver/
POMO_TSP/ , Jupyter, 173 linesTrain.ipynb - OLD_ipynb_ver/
POMO_TSP/ , Python, 313 linessource/ MODEL__Actor/ grouped_actors.py - OLD_ipynb_ver/
POMO_TSP/ , Python, 103 linessource/ TRAIN_N_EVAL/ Evaluate_Grouped_Actors. py - OLD_ipynb_ver/
POMO_TSP/ , Python, 124 linessource/ TRAIN_N_EVAL/ Train_Grouped_Actors.py - OLD_ipynb_ver/
POMO_TSP/ , Python, 244 linessource/ travelling_saleman_probl em.py - OLD_ipynb_ver/
POMO_TSP/ , Python, 203 linessource/ utilities.py - README.md, Text, 18 lines
fikisipi/elkai
dbdd81256410d8c790b95459d07eaf6227f0e620, 23 December 2024Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
181 files
- LKH-3.0.8/
SRC/ , C, 29 linesActivate.c - LKH-3.0.8/
SRC/ , C, 47 linesAddCandidate.c - LKH-3.0.8/
SRC/ , C, 48 linesAddExtraCandidates.c - LKH-3.0.8/
SRC/ , C, 82 linesAddTourCandidates.c - LKH-3.0.8/
SRC/ , C, 60 linesAdjustCandidateSet.c - LKH-3.0.8/
SRC/ , C, 58 linesAdjustClusters.c - LKH-3.0.8/
SRC/ , C, 110 linesAllocateStructures.c - LKH-3.0.8/
SRC/ , C, 202 linesAscent.c - LKH-3.0.8/
SRC/ , C, 319 linesBIT.c - LKH-3.0.8/
SRC/ , C, 129 linesBest2OptMove.c - LKH-3.0.8/
SRC/ , C, 202 linesBest3OptMove.c - LKH-3.0.8/
SRC/ , C, 341 linesBest4OptMove.c - LKH-3.0.8/
SRC/ , C, 789 linesBest5OptMove.c - LKH-3.0.8/
SRC/ , C, 244 linesBestKOptMove.c - LKH-3.0.8/
SRC/ , C, 758 linesBestSpecialOptMove.c - LKH-3.0.8/
SRC/ , C, 30 linesBetween.c - LKH-3.0.8/
SRC/ , C, 44 linesBetween_SL.c - LKH-3.0.8/
SRC/ , C, 62 linesBetween_SSL.c - LKH-3.0.8/
SRC/ , C, 270 linesBridgeGain.c - LKH-3.0.8/
SRC/ , C, 129 linesBuildKDTree.c - LKH-3.0.8/
SRC/ , C, 220 linesC.c - LKH-3.0.8/
SRC/ , C, 46 linesCTSP_InitialTour.c - LKH-3.0.8/
SRC/ , C, 242 linesCVRP_InitialTour.c - LKH-3.0.8/
SRC/ , C, 49 linesCandidateReport.c - LKH-3.0.8/
SRC/ , C, 204 linesChooseInitialTour.c - LKH-3.0.8/
SRC/ , C, 63 linesConnect.c - LKH-3.0.8/
SRC/ , C, 189 linesCreateCandidateSet.c - LKH-3.0.8/
SRC/ , C, 112 linesCreateDelaunayCandidateS et.c - LKH-3.0.8/
SRC/ , C, 65 linesCreateNNCandidateSet.c - LKH-3.0.8/
SRC/ , C, 529 linesCreateQuadrantCandidateS et.c - LKH-3.0.8/
SRC/ , C, 736 linesCreate_POPMUSIC_Candidat eSet.c - LKH-3.0.8/
SRC/ , C, 594 linesDelaunay.c - LKH-3.0.8/
SRC/ , C, 266 linesDistance.c - LKH-3.0.8/
SRC/ , C, 47 linesDistance_MTSP.c - LKH-3.0.8/
SRC/ , C, 11 linesDistance_SOP.c - LKH-3.0.8/
SRC/ , C, 32 linesDistance_SPECIAL.c - LKH-3.0.8/
SRC/ , C, 151 linesERXT.c - LKH-3.0.8/
SRC/ , C, 22 linesExcludable.c - LKH-3.0.8/
SRC/ , C, 22 linesExclude.c - LKH-3.0.8/
SRC/ , C, 170 linesFindTour.c - LKH-3.0.8/
SRC/ , C, 27 linesFixedOrCommonCandidates. c - LKH-3.0.8/
SRC/ , C, 85 linesFlip.c - LKH-3.0.8/
SRC/ , C, 369 linesFlip_SL.c - LKH-3.0.8/
SRC/ , C, 593 linesFlip_SSL.c - LKH-3.0.8/
SRC/ , C, 78 linesForbidden.c - LKH-3.0.8/
SRC/ , C, 91 linesFreeStructures.c - LKH-3.0.8/
SRC/ , C, 354 linesGain23.c - LKH-3.0.8/
SRC/ , C, 158 linesGenerateCandidates.c - LKH-3.0.8/
SRC/ , C, 283 linesGenetic.c - LKH-3.0.8/
SRC/ , C, 53 linesGeoConversion.c - LKH-3.0.8/
SRC/ , C, 37 linesGetTime.c - LKH-3.0.8/
SRC/ , C, 423 linesGreedyTour.c - LKH-3.0.8/
SRC/ , C, 75 linesHashing.c - LKH-3.0.8/
SRC/ , C, 156 linesHeap.c - LKH-3.0.8/
SRC/ , C/C++, 24 linesINCLUDE/ BIT.h - LKH-3.0.8/
SRC/ , C/C++, 35 linesINCLUDE/ CLARIST.h - LKH-3.0.8/
SRC/ , C/C++, 47 linesINCLUDE/ Delaunay.h - LKH-3.0.8/
SRC/ , C/C++, 32 linesINCLUDE/ GainType.h - LKH-3.0.8/
SRC/ , C/C++, 38 linesINCLUDE/ Genetic.h - LKH-3.0.8/
SRC/ , C/C++, 21 linesINCLUDE/ GeoConversion.h - LKH-3.0.8/
SRC/ , C/C++, 29 linesINCLUDE/ Hashing.h - LKH-3.0.8/
SRC/ , C/C++, 20 linesINCLUDE/ Heap.h - LKH-3.0.8/
SRC/ , C/C++, 608 lines, 1 matchINCLUDE/ LKH.h - LKH-3.0.8/
SRC/ , C/C++, 77 linesINCLUDE/ Segment.h - LKH-3.0.8/
SRC/ , C/C++, 39 linesINCLUDE/ Sequence.h - LKH-3.0.8/
SRC/ , C/C++, 510 linesINCLUDE/ gb_string.h - LKH-3.0.8/
SRC/ , C/C++, 77 linesINCLUDE/ gpx.h - LKH-3.0.8/
SRC/ , C, 40 linesImprovement.c - LKH-3.0.8/
SRC/ , C, 18 linesIsBackboneCandidate.c - LKH-3.0.8/
SRC/ , C, 18 linesIsCandidate.c - LKH-3.0.8/
SRC/ , C, 20 linesIsCommonEdge.c - LKH-3.0.8/
SRC/ , C, 61 linesIsPossibleCandidate.c - LKH-3.0.8/
SRC/ , C, 81 linesKSwapKick.c - LKH-3.0.8/
SRC/ , C, 221 linesLKH.c - LKH-3.0.8/
SRC/ , C, 410 linesLKHmain.c - LKH-3.0.8/
SRC/ , C, 198 linesLinKernighan.c - LKH-3.0.8/
SRC/ , C, 102 linesMTSP2TSP.c - LKH-3.0.8/
SRC/ , C, 115 linesMTSP_InitialTour.c - LKH-3.0.8/
SRC/ , C, 41 linesMTSP_Report.c - LKH-3.0.8/
SRC/ , C, 45 linesMTSP_WriteSolution.c - LKH-3.0.8/
SRC/ , C, 15 linesMake2OptMove.c - LKH-3.0.8/
SRC/ , C, 27 linesMake3OptMove.c - LKH-3.0.8/
SRC/ , C, 49 linesMake4OptMove.c - LKH-3.0.8/
SRC/ , C, 256 linesMake5OptMove.c - LKH-3.0.8/
SRC/ , C, 108 linesMakeKOptMove.c - LKH-3.0.8/
SRC/ , C, 34 linesMergeTourWithBestTour.c - LKH-3.0.8/
SRC/ , C, 545 linesMergeWithTourCLARIST.c - LKH-3.0.8/
SRC/ , C, 181 linesMergeWithTourGPX2.c - LKH-3.0.8/
SRC/ , C, 263 linesMergeWithTourIPT.c - LKH-3.0.8/
SRC/ , C, 74 linesMinimum1TreeCost.c - LKH-3.0.8/
SRC/ , C, 110 linesMinimumSpanningTree.c - LKH-3.0.8/
SRC/ , C, 24 linesNormalizeNodeList.c - LKH-3.0.8/
SRC/ , C, 28 linesNormalizeSegmentList.c - LKH-3.0.8/
SRC/ , C, 234 linesOrderCandidateSet.c - LKH-3.0.8/
SRC/ , C, 43 linesPDPTW_Reduce.c - LKH-3.0.8/
SRC/ , C, 322 linesPatchCycles.c - LKH-3.0.8/
SRC/ , C, 29 linesPenalty_1_PDTSP.c - LKH-3.0.8/
SRC/ , C, 56 linesPenalty_ACVRP.c - LKH-3.0.8/
SRC/ , C, 45 linesPenalty_BWTSP.c - LKH-3.0.8/
SRC/ , C, 56 linesPenalty_CCVRP.c - LKH-3.0.8/
SRC/ , C, 33 linesPenalty_CTSP.c - LKH-3.0.8/
SRC/ , C, 51 linesPenalty_CVRP.c - LKH-3.0.8/
SRC/ , C, 54 linesPenalty_CVRPTW.c - LKH-3.0.8/
SRC/ , C, 7 linesPenalty_M1_PDTSP.c - LKH-3.0.8/
SRC/ , C, 42 linesPenalty_MLP.c - LKH-3.0.8/
SRC/ , C, 108 linesPenalty_MTSP.c - LKH-3.0.8/
SRC/ , C, 44 linesPenalty_M_PDTSP.c - LKH-3.0.8/
SRC/ , C, 48 linesPenalty_OVRP.c - LKH-3.0.8/
SRC/ , C, 72 linesPenalty_PDPTW.c - LKH-3.0.8/
SRC/ , C, 50 linesPenalty_PDTSP.c - LKH-3.0.8/
SRC/ , C, 52 linesPenalty_PDTSPF.c - LKH-3.0.8/
SRC/ , C, 43 linesPenalty_PDTSPL.c - LKH-3.0.8/
SRC/ , C, 60 linesPenalty_RCTVRP.c - LKH-3.0.8/
SRC/ , C, 56 linesPenalty_SOP.c - LKH-3.0.8/
SRC/ , C, 42 linesPenalty_TRP.c - LKH-3.0.8/
SRC/ , C, 32 linesPenalty_TSPDL.c - LKH-3.0.8/
SRC/ , C, 26 linesPenalty_TSPPD.c - LKH-3.0.8/
SRC/ , C, 27 linesPenalty_TSPTW.c - LKH-3.0.8/
SRC/ , C, 45 linesPenalty_VRPB.c - LKH-3.0.8/
SRC/ , C, 56 linesPenalty_VRPBTW.c - LKH-3.0.8/
SRC/ , C, 69 linesPenalty_VRPPD.c - LKH-3.0.8/
SRC/ , C, 203 linesPrintParameters.c - LKH-3.0.8/
SRC/ , C, 84 linesRandom.c - LKH-3.0.8/
SRC/ , C, 74 linesReadCandidates.c - LKH-3.0.8/
SRC/ , C, 78 linesReadEdges.c - LKH-3.0.8/
SRC/ , C, 115 linesReadLine.c - LKH-3.0.8/
SRC/ , C, 1,248 linesReadParameters.c - LKH-3.0.8/
SRC/ , C, 60 linesReadPenalties.c - LKH-3.0.8/
SRC/ , C, 2,282 linesReadProblem.c - LKH-3.0.8/
SRC/ , C, 19 linesRecordBestTour.c - LKH-3.0.8/
SRC/ , C, 49 linesRecordBetterTour.c - LKH-3.0.8/
SRC/ , C, 23 linesRemoveFirstActive.c - LKH-3.0.8/
SRC/ , C, 48 linesResetCandidateSet.c - LKH-3.0.8/
SRC/ , C, 31 linesRestoreTour.c - LKH-3.0.8/
SRC/ , C, 176 linesSFCTour.c - LKH-3.0.8/
SRC/ , C, 44 linesSINTEF_WriteSolution.c - LKH-3.0.8/
SRC/ , C, 92 linesSOP_InitialTour.c - LKH-3.0.8/
SRC/ , C, 79 linesSOP_RepairTour.c - LKH-3.0.8/
SRC/ , C, 7 linesSOP_Report.c - LKH-3.0.8/
SRC/ , C, 102 linesSTTSP2TSP.c - LKH-3.0.8/
SRC/ , C, 135 linesSegmentSize.c - LKH-3.0.8/
SRC/ , C, 180 linesSequence.c - LKH-3.0.8/
SRC/ , C, 40 linesSolveCompressedSubproble m.c - LKH-3.0.8/
SRC/ , C, 226 linesSolveDelaunaySubproblems .c - LKH-3.0.8/
SRC/ , C, 106 linesSolveKCenterSubproblems. c - LKH-3.0.8/
SRC/ , C, 271 linesSolveKMeansSubproblems.c - LKH-3.0.8/
SRC/ , C, 128 linesSolveKarpSubproblems.c - LKH-3.0.8/
SRC/ , C, 248 linesSolveRoheSubproblems.c - LKH-3.0.8/
SRC/ , C, 94 linesSolveSFCSubproblems.c - LKH-3.0.8/
SRC/ , C, 368 linesSolveSubproblem.c - LKH-3.0.8/
SRC/ , C, 252 linesSolveSubproblemBorderPro blems.c - LKH-3.0.8/
SRC/ , C, 87 linesSolveTourSegmentSubprobl ems.c - LKH-3.0.8/
SRC/ , C, 109 linesStatistics.c - LKH-3.0.8/
SRC/ , C, 28 linesStatusReport.c - LKH-3.0.8/
SRC/ , C, 45 linesStoreTour.c - LKH-3.0.8/
SRC/ , C, 21 linesSymmetrizeCandidateSet.c - LKH-3.0.8/
SRC/ , C, 71 linesTSPDL_InitialTour.c - LKH-3.0.8/
SRC/ , C, 20 linesTSPTW_MakespanCost.c - LKH-3.0.8/
SRC/ , C, 50 linesTSPTW_Reduce.c - LKH-3.0.8/
SRC/ , C, 31 linesTrimCandidateSet.c - LKH-3.0.8/
SRC/ , C, 15 linesVRPB_Reduce.c - LKH-3.0.8/
SRC/ , C, 47 linesWriteCandidates.c - LKH-3.0.8/
SRC/ , C, 34 linesWritePenalties.c - LKH-3.0.8/
SRC/ , C, 108 linesWriteTour.c - LKH-3.0.8/
SRC/ , C, 44 lineseprintf.c - LKH-3.0.8/
SRC/ , C, 36 linesfscanint.c - LKH-3.0.8/
SRC/ , C, 1,830 linesgpx.c - LKH-3.0.8/
SRC/ , C, 16 linesprintff.c - elkai/
__init__.py , Python, 2 lines - elkai/
_elkai.c , C, 149 lines - elkai/
deprecated.py , Python, 21 lines - elkai/
types.py , Python, 89 lines - elkai/
utils.py , Python, 49 lines - tests/
__init__.py , Python, 1 line - tests/
deprecated_test.py , Python, 40 lines - tests/
known_solutions.py , Python, 32 lines - tests/
test_coords.py , Python, 27 lines - tests/
test_distance_matrix.py , Python, 36 lines - tests/
test_internal_solver.py , Python, 9 lines - LICENSE, License, 11 lines
- README.md, Text, 65 lines
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://
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/
url = {https://
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/
VL - 16
IS - 1
SP - 15631
SN - 2045-2322
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"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":
"volume": "16",
"issue": "1",
"page": "15631",
"DOI": "10.1038/
"PMID": "41927696",
"PMCID": "PMC13187187",
"ISSN": "2045-2322",
"publisher": "Nature Publishing Group",
"URL": "https://
"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.7554/elife.110588 [code]
- Opening the black box toward a modular approach to spike sorting.Journal: eLifeIn common: TensorFlow, PyTorch, scikit-learn, 3 other tools, methods / tools
- [3] doi:10.1126/sciadv.aed3650 [code]
- Truthful visualizations for mass spectrometry imaging enable high-spatial-resolution interactive &
lt;i& gt;m/ z& lt;/ i& gt; mapping and exploration. Journal: Science advancesIn common: TensorFlow, PyTorch, scikit-learn, 3 other tools, methods / tools - [4] doi:10.1038/s41592-026-03194-8 [code]
- Beyond benchmarking: an expert-guided consensus approach to spatially aware clustering.Journal: Nature methodsIn common: TensorFlow, PyTorch, scikit-learn, 3 other tools, methods / tools
- [5] doi:10.21203/rs.3.rs-9676637/v1 [code]
- A Comprehensive Benchmarking of Spatial Deconvolution and Domain Detection Methods across Diverse Tissues and Spatial Transcriptomic TechnologiesJournal: Research Square (preprint)In common: TensorFlow, PyTorch, scikit-learn, 3 other tools, methods / tools
- [6] doi:10.1016/j.isci.2026.116168 [code]
- See the small lesions: Frequency-guided spatial debiasing GAN for multimodal medical image fusion.Journal: iScienceIn common: TensorFlow, PyTorch, scikit-learn, 3 other tools, methods / tools
- [7] doi:10.1038/s41586-026-10658-6 [code]
- An AI system to help scientists write expert-level empirical software.Journal: NatureIn common: TensorFlow, PyTorch, scikit-learn, 3 other tools, methods / tools
- [8] doi:10.1002/nbm.70263 [code]
- Cross-Site Generalization of CNN-Based $$ {B}_1^{+} $$ Mapping in UHF MRI.Journal: NMR in biomedicineIn common: TensorFlow, PyTorch, scikit-learn, 3 other tools, methods / tools
- [9] doi:10.1371/journal.pone.0347671 [code]
- RMETNet: A cross-subject motor imagery EEG signal classification model based on TSLANet and riemannian geometry features.Journal: PloS oneIn common: TensorFlow, PyTorch, scikit-learn, 3 other tools, methods / tools
- [10] doi:10.1371/journal.pone.0346575 [code]
- Statistically valid explainable black-box machine learning: applications in sex classification across species using brain imaging.Journal: PloS oneIn common: TensorFlow, PyTorch, scikit-learn, 3 other tools, methods / tools
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.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 4 repositories of the authors' code, each at its verified commit and with its license, 367 scripts, and 8 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:d5f9f8aa98305778…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
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: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
