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

  • 大小: 5KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-06-05
  • 語言: 其他
  • 標簽: pso??

資源簡介

利用PSO算法進行分布式電源的無功優化,程序中帶有詳細的說明

資源截圖

代碼片段和文件信息

clear
clc
tic;
iterations?=?25;%?迭代次數
inertia?=?1.0;%?慣性
correction_factor?=?2.0;%?修正系數
max_swarm=1.0;%?最大慣性權值
min_swarm=0.3;%?最小慣性權值
swarm_size?=?24;%?群的大小
loss=0;%網損
eps_all=0.5;%潮流計算循環精確度
n_all=0;%潮流計算循環次數
eps_temp=12;%潮流計算循環當前變化量
val_all=0;%費用初值
val=0;
xx=1280;
o=0.25;p=0.25;q=0.25;u=0.25;r=0.13;s=320;yy=0.206;
%--?潮流計算迭代循環?--
while(abs(eps_temp)>eps_all)
????n_all=n_all+1;

???%--?初始化粒子?--
????index?=?1;
????j=0;
????for?i?=?1?:?swarm_size
????????while(j==0)
????????????swarm(index?1?1)?=?0+rand*680;
????????????swarm(index?1?2)?=?0+rand*360;
????????????swarm(index?1?3)?=?0+rand*360;
????????????swarm(index?1?4)?=?60+rand*180;
????????????swarm(index?1?5)?=?60+rand*180;
????????????swarm(index?1?6)?=?60+rand*180;
????????????swarm(index?1?7)?=?60+rand*180;
????????????swarm(index?1?8)?=?60+rand*180;
????????????swarm(index?1?9)?=?60+rand*180;
????????????swarm(index?1?10)?=?40+rand*120;
????????????swarm(index?1?11)?=?40+rand*120;
????????????swarm(index?1?12)?=?55+rand*120;
????????????swarm(index?1?13)?=?xx-swarm(index?1?1)-swarm(index?1?2)?-swarm(index?1?3)?-swarm(index?1?4)?-swarm(index?1?5)?-?swarm(index?1?6)-swarm(index?1?7)-swarm(index?1?8)-swarm(index?1?9)-swarm(index?1?10)-swarm(index?1?11)?-swarm(index?1?12);
????????????if(swarm(index?1?13)>55&swarm(index?1?13)<120)?j=1;end
????????end
????????????index?=?index?+?1;
????????????j=0;
????end
????swarm(:?4?1)?=?20000;???%?初始化整體最優為很遠值
????swarm(:?2?:)?=?0;???????%?初始化速度
????
???%--?粒子群算法迭代?--
????for?iter?=?1?:?iterations

???????%--?更新位置?&?更新最優?---
????????for?i?=?1?:?swarm_size
????????????switch(unidrnd(13))
????????????case?1
????????????????tempx?=?swarm(i?1?1)?+?swarm(i?2?1)*(max_swarm-(max_swarm-min_swarm)*iter/iterations);
????????????????if(tempx<0)?tempx=0;end
????????????????if(tempx>680)?tempx=680;end
????????????????tempy?=?swarm(i?1?2)?+?swarm(i?2?2)*(max_swarm-(max_swarm-min_swarm)*iter/iterations);
????????????????if(tempy<0)?tempy=0;end
????????????????if(tempy>360)?tempy=360;end
????????????????tempz?=?swarm(i?1?3)?+?swarm(i?2?3)*(max_swarm-(max_swarm-min_swarm)*iter/iterations);
????????????????if(tempz<0)?tempz=0;end
????????????????if(tempz>360)?tempz=360;end
????????????????tempb?=?swarm(i?1?4)?+?swarm(i?2?4)*(max_swarm-(max_swarm-min_swarm)*iter/iterations);
????????????????if(tempb<60)?tempb=60;end
????????????????if(tempb>180)?tempb=180;end
????????????????tempc?=?swarm(i?1?5)?+?swarm(i?2?5)*(max_swarm-(max_swarm-min_swarm)*iter/iterations);
????????????????if(tempc<60)?tempc=60;end
????????????????if(tempc>180)?tempc=180;end
????????????????tempd?=?swarm(i?1?6)?+?swarm(i?2?6)*(max_swarm-(max_swarm-min_swarm)*iter/iterations);
????????????????if(tempd<60)?tempd=60;end
????????????????if(tempd>180)?tempd=180;end
????????????????tempe?=?swarm(i?1?7)?+?swarm(i?2?7)*(max_swarm-(max_swarm-min_swarm)*iter/it

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件??????60690??2011-05-04?10:45??董師兄程序\cao.m

?????文件????????413??2011-11-25?09:01??董師兄程序\fit.asv

?????文件????????351??2011-11-25?14:24??董師兄程序\fit.m

?????文件???????1599??2011-11-25?09:16??董師兄程序\pso.asv

?????文件???????1604??2011-11-25?14:38??董師兄程序\pso.m

?????目錄??????????0??2012-03-19?11:14??董師兄程序

-----------?---------??----------?-----??----

????????????????64657????????????????????6


評論

共有 條評論