《计算机应用》唯一官方网站 ›› 2026, Vol. 46 ›› Issue (6): 1712-1720.DOI: 10.11772/j.issn.1001-9081.2025050646
收稿日期:2025-06-12
修回日期:2025-09-11
接受日期:2025-09-19
发布日期:2025-10-17
出版日期:2026-06-10
通讯作者:
魏凤凤
作者简介:蔡泰鑫(2004—),男,广东东莞人,主要研究方向:群体智能、演化计算基金资助:Received:2025-06-12
Revised:2025-09-11
Accepted:2025-09-19
Online:2025-10-17
Published:2026-06-10
Contact:
Fengfeng WEI
About author:CAI Taixin, born in 2004. His research interests include swarm intelligence, evolutionary computation.Supported by:摘要:
在组合优化(CO)问题中,多解旅行商问题(MSTSP)的目标是获取一组互异的全局最优路径,在物流调度、旅游线路规划等场景具有关键价值。作为求解路径优化问题的传统方法,蚁群优化算法(ACO)存在信息素早熟收敛、质量与多样性失衡的瓶颈。针对上述挑战,提出一种面向MSTSP的大语言模型(LLM)增强蚁群优化算法(L-ACO),采用多层提示工程策略将LLM双阶段集成于传统ACO:在种子生成阶段,解析城市拓扑特征构建高质量多样化初始路径;在扰动优化阶段,针对解池路径及其统计信息生成新路径,跳出局部最优。此外,构建多维评价体系综合检验求解质量、多样性和LLM有效性。25项MSTSP基准实例上的测试结果表明,相较于传统ACO,L-ACO的结构多样性指标(SDI)提升了0.08,质量-数量综合指标(QQCI)相对提升了13%,表明L-ACO改善了传统ACO在多解场景下的收敛性。
中图分类号:
蔡泰鑫, 魏凤凤. 面向多解旅行商问题的大语言模型增强蚁群优化算法[J]. 计算机应用, 2026, 46(6): 1712-1720.
Taixin CAI, Fengfeng WEI. Large language model-enhanced ant colony optimization for multi-solution traveling salesman problems[J]. Journal of Computer Applications, 2026, 46(6): 1712-1720.
| Sinple1_9 | 680 | 680 | 680 | 3.00 | 3.00 | 2.00 | 0.630 | 0.630 | 0.444 | 1.552 | 1.552 | |
| Sinple2_10 | 1265 | 1 297 | 1 265 | 2.10 | 1.05 | 1.40 | 0.238 | 0.040 | 0.120 | 1.317 | 1.001 | |
| Sinple3_10 | 832 | 832 | 832 | 5.30 | 3.70 | 2.80 | 0.455 | 0.428 | 0.360 | 1.947 | 1.678 | |
| Sinple4_11 | 804 | 811 | 803 | 1.70 | 1.05 | 1.05 | 0.271 | 0.014 | 0.009 | 1.214 | 1.010 | |
| Sinple5_12 | 763 | 771 | 765 | 1.30 | 1.05 | 1.00 | 0.225 | 0.038 | 0.000 | 1.088 | 1.003 | |
| Sinple6_12 | 845 | 854 | 845 | 1.70 | 1.10 | 1.05 | 0.444 | 0.083 | 0.006 | 1.215 | 1.025 | |
| Geometry1_10 | 130 | 130 | 130 | 10.20 | 7.20 | 4.00 | 0.734 | 0.711 | 0.701 | 2.523 | 2.192 | |
| Geometry2_12 | 1 344 | 1 344 | 1 344 | 9.00 | 4.70 | 4.80 | 0.746 | 0.697 | 0.660 | 2.401 | 1.853 | |
| Geometry3_10 | 72 | 72 | 72 | 2.10 | 1.00 | 1.40 | 0.453 | 0.000 | 0.160 | 1.321 | 1.000 | |
| Geometry4_10 | 72 | 72 | 72 | 4.00 | 3.70 | 1.70 | 0.642 | 0.640 | 0.689 | 1.741 | 1.682 | |
| Geometry5_10 | 78 | 78 | 78 | 10.30 | 5.35 | 4.40 | 0.661 | 0.622 | 0.677 | 2.534 | 1.934 | |
| Geometry6_15 | 130 | 131 | 130 | 4.50 | 4.15 | 2.40 | 0.844 | 0.778 | 0.582 | 1.803 | 1.737 | |
| Composite1_28 | 3 067 | 3 089 | 3 152 | 1.30 | 1.10 | 1.00 | 0.066 | 0.030 | 0.000 | 1.093 | 1.025 | |
| Composite2_34 | 3 671 | 3 705 | 3 731 | 1.05 | 1.05 | 1.00 | 0.006 | 0.003 | 0.000 | 1.000 | 0.994 | |
| Composite3_22 | 9 674 | 9 780 | 11 175 | 1.60 | 1.00 | 1.60 | 0.043 | 0.000 | 0.023 | 1.163 | 0.985 | |
| Composite4_33 | 8 811 | 8 821 | 8 851 | 2.80 | 1.15 | 1.20 | 0.104 | 0.017 | 0.061 | 1.428 | 1.044 | |
| Composite5_35 | 9 178 | 9 201 | 9 369 | 1.55 | 1.05 | 1.50 | 0.022 | 0.004 | 0.029 | 1.182 | 1.007 | |
| Composite6_39 | 23 956 | 24 013 | 24 475 | 1.35 | 1.05 | 1.10 | 0.031 | 0.005 | 0.007 | 1.106 | 1.010 | |
| Composite7_42 | 14 534 | 14 590 | 14 793 | 1.10 | 1.05 | 1.00 | 0.006 | 0.020 | 0.000 | 1.022 | 1.008 | |
| Composite8_45 | 11 097 | 11 131 | 11 340 | 1.10 | 1.05 | 1.80 | 0.010 | 0.008 | 0.033 | 1.025 | 1.007 | |
| Composite9_48 | 6 944 | 6 995 | 7 103 | 1.00 | 1.00 | 1.00 | 0.000 | 0.000 | 0.000 | 0.985 | 0.980 | |
| Composite10_55 | 10 561 | 10 585 | 13 973 | 1.25 | 1.05 | 1.05 | 0.009 | 0.002 | 0.003 | 1.073 | 1.008 | |
| Composite11_59 | 24 662 | 24 699 | 25 125 | 1.20 | 1.05 | 1.20 | 0.025 | 0.025 | 0.013 | 1.054 | 1.010 | |
表1 整体性能的比较
Tab. 1 Overall performance comparison
| Sinple1_9 | 680 | 680 | 680 | 3.00 | 3.00 | 2.00 | 0.630 | 0.630 | 0.444 | 1.552 | 1.552 | |
| Sinple2_10 | 1265 | 1 297 | 1 265 | 2.10 | 1.05 | 1.40 | 0.238 | 0.040 | 0.120 | 1.317 | 1.001 | |
| Sinple3_10 | 832 | 832 | 832 | 5.30 | 3.70 | 2.80 | 0.455 | 0.428 | 0.360 | 1.947 | 1.678 | |
| Sinple4_11 | 804 | 811 | 803 | 1.70 | 1.05 | 1.05 | 0.271 | 0.014 | 0.009 | 1.214 | 1.010 | |
| Sinple5_12 | 763 | 771 | 765 | 1.30 | 1.05 | 1.00 | 0.225 | 0.038 | 0.000 | 1.088 | 1.003 | |
| Sinple6_12 | 845 | 854 | 845 | 1.70 | 1.10 | 1.05 | 0.444 | 0.083 | 0.006 | 1.215 | 1.025 | |
| Geometry1_10 | 130 | 130 | 130 | 10.20 | 7.20 | 4.00 | 0.734 | 0.711 | 0.701 | 2.523 | 2.192 | |
| Geometry2_12 | 1 344 | 1 344 | 1 344 | 9.00 | 4.70 | 4.80 | 0.746 | 0.697 | 0.660 | 2.401 | 1.853 | |
| Geometry3_10 | 72 | 72 | 72 | 2.10 | 1.00 | 1.40 | 0.453 | 0.000 | 0.160 | 1.321 | 1.000 | |
| Geometry4_10 | 72 | 72 | 72 | 4.00 | 3.70 | 1.70 | 0.642 | 0.640 | 0.689 | 1.741 | 1.682 | |
| Geometry5_10 | 78 | 78 | 78 | 10.30 | 5.35 | 4.40 | 0.661 | 0.622 | 0.677 | 2.534 | 1.934 | |
| Geometry6_15 | 130 | 131 | 130 | 4.50 | 4.15 | 2.40 | 0.844 | 0.778 | 0.582 | 1.803 | 1.737 | |
| Composite1_28 | 3 067 | 3 089 | 3 152 | 1.30 | 1.10 | 1.00 | 0.066 | 0.030 | 0.000 | 1.093 | 1.025 | |
| Composite2_34 | 3 671 | 3 705 | 3 731 | 1.05 | 1.05 | 1.00 | 0.006 | 0.003 | 0.000 | 1.000 | 0.994 | |
| Composite3_22 | 9 674 | 9 780 | 11 175 | 1.60 | 1.00 | 1.60 | 0.043 | 0.000 | 0.023 | 1.163 | 0.985 | |
| Composite4_33 | 8 811 | 8 821 | 8 851 | 2.80 | 1.15 | 1.20 | 0.104 | 0.017 | 0.061 | 1.428 | 1.044 | |
| Composite5_35 | 9 178 | 9 201 | 9 369 | 1.55 | 1.05 | 1.50 | 0.022 | 0.004 | 0.029 | 1.182 | 1.007 | |
| Composite6_39 | 23 956 | 24 013 | 24 475 | 1.35 | 1.05 | 1.10 | 0.031 | 0.005 | 0.007 | 1.106 | 1.010 | |
| Composite7_42 | 14 534 | 14 590 | 14 793 | 1.10 | 1.05 | 1.00 | 0.006 | 0.020 | 0.000 | 1.022 | 1.008 | |
| Composite8_45 | 11 097 | 11 131 | 11 340 | 1.10 | 1.05 | 1.80 | 0.010 | 0.008 | 0.033 | 1.025 | 1.007 | |
| Composite9_48 | 6 944 | 6 995 | 7 103 | 1.00 | 1.00 | 1.00 | 0.000 | 0.000 | 0.000 | 0.985 | 0.980 | |
| Composite10_55 | 10 561 | 10 585 | 13 973 | 1.25 | 1.05 | 1.05 | 0.009 | 0.002 | 0.003 | 1.073 | 1.008 | |
| Composite11_59 | 24 662 | 24 699 | 25 125 | 1.20 | 1.05 | 1.20 | 0.025 | 0.025 | 0.013 | 1.054 | 1.010 | |
表2 算法时间开销的比较 (s)
Tab. 2 Comparison of algorithm time cost
表3 不同解质量权重下的QQCI提升率对比
Tab. 3 Comparison of QQCI improvement rates under different quality weights
表4 消融实验结果
Tab. 4 Ablation experimental results
| [1] | KORTE B, VYGEN J. Combinatorial optimization: theory and algorithms, AC 21[M]. 6th ed. Berlin: Springer, 2018: 5-6. |
| [2] | KORTE B, VYGEN J. Combinatorial optimization: theory and algorithms, AC 21[M]. 6th ed. Berlin: Springer, 2018: 29-30. |
| [3] | DHOUIB S. Adaptive iterated stochastic metaheuristic to optimize holes drilling path in printed circuit boards[J]. Engineering Applications of Artificial Intelligence, 2023, 121: No.105829. |
| [4] | NAŁĘCZ-CHARKIEWICZ K, NOWAK R M. Algorithm for DNA sequence assembly by quantum annealing[J]. BMC Bioinformatics, 2022, 23: No.122. |
| [5] | 孙鉴,马宝全,吴隹伟,等. 地震场景下无人机群路径规划与任务分配均衡联合优化[J]. 计算机应用, 2024, 44(10): 3232-3239. |
| SUN J, MA B Q, WU Z W, et al. Joint optimization of UAV swarm path planning and task allocation balance in earthquake scenarios[J]. Journal of Computer Applications, 2024, 44(10): 3232-3239. | |
| [6] | 赵浩宇,于自强,陈晓萌,等. 支持关键词搜索的top-K条最优路线查询问题[J]. 计算机应用, 2024, 44(8): 2455-2465. |
| ZHAO H Y, YU Z Q, CHEN X M, et al. top-K optimal route query problem with keyword search support[J]. Journal of Computer Applications, 2024, 44(8): 2455-2465. | |
| [7] | YIN Y Q, YANG Y J, YU Y G, et al. Robust vehicle routing with drones under uncertain demands and truck travel times in humanitarian logistics [J]. Transportation Research Part B: Methodological, 2023, 174: 102781. |
| [8] | HUANG T, GONG Y J, ZHANG J. Seeking multiple solutions of combinatorial optimization problems: a proof of principle study[C]// 2018 IEEE Symposium Series on Computational Intelligence. Piscataway: IEEE, 2018: 1212-1218. |
| [9] | BÄCK T, FOGEL D B, MICHALEWICZ Z. Evolutionary computation 1: basic algorithms and operators[M]. New York: Taylor & Francis Group, 2000: -. |
| [10] | DORIGOM, STÜTZLE T. Ant colony optimization: overview and recent advances[C]// GENDREAU M, POTVIN J Y. Handbook of metaheuristics, ISOR 272. Cham: Springer, 2019: 311-351. |
| [11] | HAN X C, KE H W, GONG Y J, et al. Multimodal optimization of traveling salesman problem: a niching ant colony system[C]// Proceedings of the 2018 Genetic and Evolutionary Computation Conference Companion. New York: ACM, 2018: 87-88. |
| [12] | HUANG T, ZHANG Z Q, GONG Y J, et al. nLKH-ACS: a niching Lin-Kernighan-Helsgaun based ant colony system for multi-solution traveling salesman problems[J]. IEEE Transactions on Evolutionary Computation, 2025, 29(6): 2596-2610. |
| [13] | MO Y, YOU X, LIU S. Multi-colony ant optimization with dynamic collaborative mechanism and cooperative game[J]. Complex and Intelligent Systems, 2022, 8(6): 4679-4696. |
| [14] | GAO W. New ant colony optimization algorithm for the traveling salesman problem[J]. International Journal of Computational Intelligence Systems, 2020, 13(1): 44-55. |
| [15] | BROWN T B, MANN B, RYDER N, et al. Language models are few-shot learners[C]// Proceedings of the 34th International Conference on Neural Information Processing Systems. Red Hook: Curran Associates Inc. 2020: 1877-1901. |
| [16] | RÉGIN F, DE MARIA E, BONLARRON A. Combining constraint programming reasoning with large language models[C]// Proceedings of the 30th International Conference on Principles and Practice of Constraint Programming. Wadern: Leibniz-Zentrum für Informatik, 2024: No.25. |
| [17] | VAN STEIN N, BÄCK T. LLaMEA: a large language model evolutionary algorithm for large-scale optimization[J]. IEEE Transactions on Evolutionary Computation, 2025, 29(2): 331-345. |
| [18] | DONG Q, LI L, DAI D, et al. A survey on in-context learning[C]// Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing. Stroudsburg: ACL, 2024: 1107-1128. |
| [19] | LIU S, CHEN C, QU X, et al. Large language models as evolutionary optimizers[C]// Proceedings of the 2024 IEEE Congress on Evolutionary Computation. Piscataway: IEEE, 2024: 1-8. |
| [20] | WANG D, ZHANG Z, TENG Y. Large language model implemented simulated annealing algorithm for traveling salesman problem[C]// Proceedings of the 2024 IEEE International Conference on Systems, Man, and Cybernetics. Piscataway: IEEE, 2024: 209-214. |
| [21] | LIU F, TONG X, YUAN M, et al. Evolution of heuristics: towards efficient automatic algorithm design using large language model[C]// Proceedings of the 41st International Conference on Machine Learning. New York: JMLR.org, 2024: 32201-32223. |
| [22] | DORIGO M, GAMBARDELLA L M. Ant colony system: a cooperative learning approach to the traveling salesman problem[J]. IEEE Transactions on Evolutionary Computation, 1997, 1(1): 53-66. |
| [23] | STÜTZLE T, HOOS H H. MAX-MIN ant system[J]. Future Generation Computer Systems, 2000, 16(8): 889-914. |
| [24] | CHU X Y, TALLURI S, LU Q X, et al. An empirical characterization of outages and incidents in public services for large language models [C]// Proceedings of the 16th ACM/SPEC International Conference on Performance Engineering. New York: ACM, 2025: 69-80. |
| [25] | LI X, EPITROPAKIS M G, DEB K, et al. Seeking multiple solutions: an updated survey on niching methods and their applications[J]. IEEE Transactions on Evolutionary Computation, 2017, 21(4): 518-538. |
| [26] | WANG M Y, SPITZ A. Quantifying the risks of LLM- and tool-assisted rephrasing to linguistic diversity [EB/OL]. [2025-04-06]. . |
| [27] | FONTAINE M C, NIKOLAIDIS S. Differentiable quality diversity[C]// Proceedings of the 35th International Conference on Neural Information Processing Systems. Red Hook: Curran Associates Inc., 2021: 10040-10052. |
| [28] | PEREIRA J L J, OLIVER G A, FRANCISCO M B, et al. A review of multi-objective optimization: methods and algorithms in mechanical engineering applications[J]. Archives of Computational Methods in Engineering, 2022, 29(4): 2285-2308. |
| [29] | DEB K, PRATAP A, AGARWAL S, et al. A fast and elitist multiobjective genetic algorithm: NSGA-Ⅱ[J]. IEEE Transactions on Evolutionary Computation, 2002, 6(2): 182-197. |
| [30] | SÖRENSEN K. Distance measures based on the edit distance for permutation-type representations[J]. Journal of Heuristics, 2007, 13(1): 35-47. |
| [1] | 熊龙雨, 杜圣东, 史浩琛, 胡节, 杨燕, 李天瑞. 基于知识增强大语言模型架构的政务热线问答系统[J]. 《计算机应用》唯一官方网站, 2026, 46(6): 1721-1727. |
| [2] | 王劲滔, 高志霖, 孟琪翔, 卜凡亮. 基于大语言模型重构案件信息的类案检索方法[J]. 《计算机应用》唯一官方网站, 2026, 46(6): 1785-1792. |
| [3] | 易宇声, 黄兆豪, 邓梓昊, 孔蕾蕾, 齐浩亮. 面向信创数据库迁移的多知识库协同大语言模型提示框架CORER[J]. 《计算机应用》唯一官方网站, 2026, 46(6): 1811-1817. |
| [4] | 盛兴, 翁孙贤, 陈扩松, 王忠平, 任芮锋, 刘勇. 基于深度学习的电网企业专利价值评估[J]. 《计算机应用》唯一官方网站, 2026, 46(5): 1468-1474. |
| [5] | 王倩飞, 李旸, 李德玉, 王素格. 基于大语言模型的双通道特征融合表示的短文本聚类方法[J]. 《计算机应用》唯一官方网站, 2026, 46(5): 1441-1449. |
| [6] | 郑嘉丽, 周刚, 陈静, 李顺航. 基于多特征自适应融合的智能生成文本检测方法[J]. 《计算机应用》唯一官方网站, 2026, 46(5): 1433-1440. |
| [7] | 王晓宇, 李欣, 薛迪, 蒋章涛, 王威, 肖岩军. 基于大语言模型的视频监控网络安全漏洞分类框架[J]. 《计算机应用》唯一官方网站, 2026, 46(4): 1158-1170. |
| [8] | 师凯洲, 何旋, 候国义, 李根, 李泷杲, 黄翔. 基于大语言模型的机载产品计量溯源知识图谱构建方法[J]. 《计算机应用》唯一官方网站, 2026, 46(4): 1086-1095. |
| [9] | 陈浩轩, 叶培昌, 刘磊, 刘承明, 胡文华. 自动代码编辑推荐综述[J]. 《计算机应用》唯一官方网站, 2026, 46(4): 1227-1237. |
| [10] | 王日龙, 李振平, 李晓松, 高强, 何亚, 钟勇, 赵英潇. 多Agent协作的知识推理框架[J]. 《计算机应用》唯一官方网站, 2026, 46(3): 708-714. |
| [11] | 张昊洋, 张丽萍, 闫盛, 李娜, 张学飞. 面向知识图谱补全的大模型方法综述[J]. 《计算机应用》唯一官方网站, 2026, 46(3): 683-695. |
| [12] | 郗恩康, 范菁, 金亚东, 董华, 俞浩, 孙伊航. 联邦学习在隐私安全领域面临的威胁综述[J]. 《计算机应用》唯一官方网站, 2026, 46(3): 798-808. |
| [13] | 黄奕明, 邹喜华, 邓果, 郑狄. 预回答与召回过滤:双阶段RAG问答系统优化方法[J]. 《计算机应用》唯一官方网站, 2026, 46(3): 696-707. |
| [14] | 沈斌, 陈晓宁, 程华, 房一泉, 王慧锋. 基于大语言模型的本科教学评估智能系统[J]. 《计算机应用》唯一官方网站, 2026, 46(3): 993-1003. |
| [15] | 吴定佳, 崔喆. 增强模式链接与多生成器协同的SQL生成框架MG-SQL[J]. 《计算机应用》唯一官方网站, 2026, 46(3): 723-731. |
| 阅读次数 | ||||||
|
全文 |
|
|||||
|
摘要 |
|
|||||
