% This code solves the travelling salesman problem.
% Part 1 data formating.
%-------------------
% n is the number pf cities.
%MATLAB linprog solver converge to global solution for n<40
% so if n>40 change solver options or use some other solver[CPLEX,GUROBI ,...] interface
%(x,y) is the cartesian coordinatea id rge cities.
% n (x,y) coordinate pairs are created randomly.
n=30;
% MATLAB intlinprog solver may not get global solution if n>40.
引用格式
RMS Danaraj (2026). Travelling salesman problem:Integer Programming Solution (https://ww2.mathworks.cn/matlabcentral/fileexchange/74482-travelling-salesman-problem-integer-programming-solution), MATLAB Central File Exchange. 检索时间: .
MATLAB 版本兼容性
创建方式
R2019b
兼容 R2017a 到 R2019b 的版本
平台兼容性
Windows macOS Linux类别
- Mathematics and Optimization > Global Optimization Toolbox > Particle Swarm >
- AI and Statistics > Statistics and Machine Learning Toolbox > Cluster Analysis and Anomaly Detection > Nearest Neighbors >
- Mathematics and Optimization > Optimization Toolbox > Solver-Based Optimization Problem Setup >
在 Help Center 和 MATLAB Answers 中查找有关 Particle Swarm 的更多信息
标签
| 版本 | 已发布 | 发行说明 | |
|---|---|---|---|
| 1.0.0 |
