⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 result.m

📁 本文以著名的旅行商问题(TSP)为例说明如何利用MATLAB语言实现模拟退火算法。
💻 M
字号:
%结果输出函数

cla;
for i=1:city_n
    plot(pos(i,1),pos(i,2),'o');hold on;
end

for i=1:(city_n-1)
    a=solution_everbest(i);
    b=solution_everbest(i+1);
    line([pos(a,1),pos(b,1)],[pos(a,2),pos(b,2)]);
end
a=solution_everbest(city_n);
b=solution_everbest(1);
line([pos(a,1),pos(b,1)],[pos(a,2),pos(b,2)]);


solution_everbest
adapt_everbest

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -