資源簡介
用MATLAB實現的啟發式算法---退火算法,數學建模常用的算法

代碼片段和文件信息
%隨機交換兩個節點的順序函數exchange.m
function[long_newroute_new]=exchange(routed)
n=length(d);
temp1=ceil(n*rand(1));
temp2=ceil(n*rand(1));
tem1=min(temp1temp2);
tem2=max(temp1temp2);
route_temp=fliplr(route(tem1:tem2));
route_new=[route(1:(tem1-1))?route_temp?route((tem2+1):n)];
long_new=route_long(route_newd);
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????329??2009-08-14?10:37??最短路退火\exchange.m
?????文件????????220??2009-08-14?10:19??最短路退火\route_long.m
?????文件????????967??2009-08-14?10:42??最短路退火\tsp.m
?????文件?????756224??2009-07-16?10:51??最短路退火\模擬退火算法求TSP.doc
?????目錄??????????0??2010-03-10?22:51??最短路退火
-----------?---------??----------?-----??----
???????????????757740????????????????????5
- 上一篇:matlab遺傳算法程序
- 下一篇:混淆矩陣的生成實現
評論
共有 條評論