91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 4KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-06-05
  • 語言: Matlab
  • 標(biāo)簽: DPSO??Matlab??

資源簡介

離散粒子群算法的Matlab實現(xiàn),歡迎大家下載學(xué)習(xí),一起進(jìn)行改善。

資源截圖

代碼片段和文件信息

function?current_Path=add_M(current_Pathadd_Edge)
%%?添加邊并調(diào)整函數(shù)
%%%%?current_Path為合法路徑,Path(city_nums1);
%%%%?add_Edge為待添加邊,edge(21);
%%%%?添加一條邊后,從左到右搜索Path獲取在Path中edge端點的位置jk且j%%%%?將Path中j到(k-1)或者j+1到k路徑點逆序
len=length(current_Path);
keyPosition=zeros(21);
j=1;
for?i=1:len
????if(current_Path(i1)==add_Edge(11)||current_Path(i1)==add_Edge(21))
????????keyPosition(j1)=i;
????????j=j+1;
????end
end
exchange_Len=keyPosition(21)-keyPosition(11);
if(exchange_Len~=1?&&?exchange_Len~=len-1)
????tempM=zeros(exchange_Len1);
????if(rand<0.5)
????????k=1;
????else
????????k=0;
????end
????for?i=1:exchange_Len
????????tempM(exchange_Len+1-i1)=current_Path(keyPosition(11)+k+i-11);
????end
????current_Path(keyPosition(11)+k:keyPosition(21)-1+k1)=tempM;
end

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2013-04-13?20:28??離散粒子群算法DPSO\
?????文件?????????261??2013-04-13?20:28??離散粒子群算法DPSO\PM2VM.m
?????文件?????????854??2013-04-13?20:28??離散粒子群算法DPSO\add_M.m
?????文件??????????66??2013-04-13?20:28??離散粒子群算法DPSO\and_M.m
?????文件?????????220??2013-04-13?20:28??離散粒子群算法DPSO\calFitness.m
?????文件?????????233??2013-04-13?20:28??離散粒子群算法DPSO\linkM.m
?????文件????????3316??2013-04-13?20:28??離散粒子群算法DPSO\main.m
?????文件?????????325??2013-04-13?20:28??離散粒子群算法DPSO\pathPlot.m
?????文件?????????129??2013-04-13?20:28??離散粒子群算法DPSO\sub_M.m
?????文件?????????357??2013-04-13?20:28??離散粒子群算法DPSO\wGenerate.m

評論

共有 條評論