- x: An N-by-M matrix representing the coordinates of N-nodes (cities) in M-dimensions.
- iter (optional): Iteration count, specified as a scalar or a vector. If scalar, it represents the number of iterations. If vector, the first element specifies the number of attempts. If (any) negative, the non-symmetric TSP is solved. Default: max(10, ceil(n/10))
- N/A (optional): If passed, flag to query for the longest possible route. Default: none
- path: A vector containing the indices of the nodes in the order they are visited in the optimized path.
- dist: The total distance of the computed path.
인용 양식
Moreno, M. (2024). Fast 2-Opt Travelling Salesman Problem (TSP) (https://www.mathworks.com/matlabcentral/fileexchange/169161-fast-2-opt-travelling-salesman-problem-tsp), MATLAB Central File Exchange. 검색 날짜: .
MATLAB 릴리스 호환 정보
플랫폼 호환성
Windows macOS Linux태그
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!버전 | 게시됨 | 릴리스 정보 | |
---|---|---|---|
1.0.9 | Final version: optimal 2-opt implementation given an iteration number |
||
1.0.8 | Problem-based default iteration count
|
||
1.0.7 | - Added non-symmetric problem (TSP2OPT1)
|
||
1.0.6 | Fully-optimized code via test functions. |
||
1.0.5 | Separated first segment from the FOR loop to accelerate the calculation.
|
||
1.0.4 | Corrected a small error in the final distance calculation |
||
1.0.3 | Increased speed of the function and grouped inputs more intuitively. |
||
1.0.2 | Logo change. |
||
1.0.1 | Includes 'worst' possible solution upon an additional input parameter call |
||
1.0.0 |