资源简介
用模拟退火的方法解TSP问题,思路明晰,有注释。
代码片段和文件信息
%用模拟退火的方法解TSP问题 total search paht
%开始是随机产生的10个坐标点,保存成了address数据.
%address(:1)=rand(101)*100;
%address(:2)=rand(101)*100;
function aneal_test
order1=randperm(10)‘;
load address;
%plot(address(order11)address(order12)‘*r-‘)
T_max=1000;%input(‘please input the start temprature‘)%最大的温度
T_min=1;%;input(‘please input the end temprature‘)%最小的温度
iter_max=3000;%input(‘please input the most interp steps on the fit temp‘)%一个温度最多迭代次数
s_max=30;%input(‘please input the most steady steps ont the fit temp‘)%如果新解比上一个解差,最多尝试几次放弃新解
T=T_max;
totaldis1=distance(addressorder1);
zhe=[];
while T>=T_min %温度控制
iter_num=1;
s_num=1;
%plot(Ttotaldis1)
TT=[Ttotaldis1];
zhe=[zhe;TT];
hold on
while (iter_num order2=exhgpath(order1);
totaldis2=distance(addressorder2);
R=rand;
DeltaDis=totaldis2-totaldis1;
if DeltaDis<0;%若新解好
order1=order2;
totaldis1=totaldis2;
相关资源
- 用蚁群算法求解TSP问题的matlab程序
- GA算法解决TSP问题(超完整版)(ma
- 贪婪算法和最小路径算法解决TSP问题
- 十大算法之详解模拟退火,禁忌搜索
- 基于遗传算法的TSP问题求解
- 基于遗传模拟退火算法的模糊C均值聚
- 模拟退火算法解决0-1背包问题
- 蚁群算法MATLAB代码287131
- SOM-TSP[Matlab].rar
- 粒子群 模拟退火 蚁群算法MATLAB实现
- Matlab模拟退火算法-模拟退火.zip
- matlab模拟退火工具箱-matlab模拟退火工
- matlab解决旅行商问题
- hopfield网络解决TSP问题
- 基于MATLAB的模拟退火算法求解最短路
- Hopfield解决TSP问题
- 基于遗传算法的TSP问题(matlab)
- 蚁群优化模拟退火算法、多目标,遗
- 简单的模拟退火算法,利用模拟退火
- 模拟退火法求解整数非线性规划MATL
- 解决灾情巡视TSP问题数模的MATLAB程序
- 磷虾群优化算法加入模拟退火思想和
- 模拟退火解决tsp的Matlab程序+设计报告
- 基于Matlab解决TSP问题的蚁群算法
- Matlab的模拟退火算法工具包
- 模拟退火算法解决旅行商问题-matlab代
- 基于模拟退火算法的遗传模拟退火算
- 模拟退火算法计算费马点
- 神经网络解决TSP问题
- 改进遗传算法求解TSP问题的Matlab程序
评论
共有 条评论