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

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

資源簡介

提出了一種基于改進離散粒子群優化算法求解機組組合問題的新方法.首先采用新的策略生成粒子,以保證所有生成的粒子均為滿足基本約束條件的可行解,使整個算法只在可行解區域進行優化搜索;然后引入優化窗口的概念和啟發式的規則以縮短計算時間和提高優化精度.仿真結果表明所提出的算法具有解的質量高、收斂速度快的特點,充分證明了它能很好地解決機組組合問題。

資源截圖

代碼片段和文件信息

%?問題模型
%??(1)數學模型:
%???以IEEE?3機6節點為工況模型?,Load=850MW
%??(2)目標函數:
%???minF=∑(i=1,Ng)Fi(PGi),Fi(PGi)?=aiPi2+biPi+ci+Ei,考慮閥點(Valve-Point)效應
%??(3)約束條件:
%??a.發電機組輸出功率上下限約束,即PGi?min<=PGi<=?PGimax;
%??b.電力負荷平衡約束;
%??c.忽略網損,即∑(i=1,Ng)(PGi)=?PGD;

?????

function?pso
%主程序
clear;
clc;
format?long;
xGbest=0;
yPbest=[];
bound=[100?600;100?400;50?200;50?200];???%上下限
a=[0.00156;0.00194;0.00482;0.00482]?;
b=[7.92;7.85;7.97;7.97];
c=[561;310;78;78];
g=[300;200;150;150];
h=[0.0315;0.042;0.063;0.063];
load=500;??????%負荷
popsize=20?;????%粒子數
MaxDD=100;?????%迭代次數
c1=1.4962;????????%學習因子
c2=1.4962;????????%學習因子
w=0.729;??????%慣性權重
dimsize=length(bound);

?vmax=vmaxinitial(dimsizebound);????????????????%vmax產生過程??
?pop=initial(dimsizepopsizeboundload);????????%初始種群
?cost=obj(popdimsizepopsizeabcghbound)?;?%初始種群目標函數值
??
?Pbest=pop(:1:dimsize);?????????????????????????%初始Pbest?和?Gbest
?[ggBestxindex]=min(cost);
?xtemp=pop(xindex1:dimsize);
?Gbest=xtemp;
?
?v=vinitial(popsizedimsizevmax);?????????????%初始速度種群
?
?for?m=1:MaxDD
????
??for?t=1:popsize
?????while(1)
?????????vv=vrenew(vmaxdimsizePbestpopGbesttwvc1c2);??????%進化速度
?????????ppop=poprenew(vvdimsizetpopboundload)?;????????????%進化位置
?????????if(ppop(t1)bound(11))??break;
?????????end
?????end
????
?????ccost=hobjrenew(tdimsizeappopbcghbound)?;???????%進化目標函數值
?????pcost=hPestobj(tdimsizeaPbestbcghbound)??;???????%Pbest的目標函數值
?????Gcost=hGbestobj(dimsizeaGbestbcghbound)???;?????%Gbest的目標函數值
???
?????if??ccost?????????Pbest(t1:dimsize)=ppop(t1:dimsize);
?????end
??
?????if??ccost?????????Gbest=ppop(t1:dimsize);
?????????GGcost=ccost;
?????end
????
??pop(t:)=ppop(t:);
??v(tdimsize:2)=vv(tdimsize:2);
??end
???

??ggBest(m:)=Gcost;
??xtemp(m:)=Gbest;??
?
?end
????yPbest=xtemp(MaxDD:);
????xGbest=ggBest(MaxDD);
????yPbestxGbestpop
????plot(1:MaxDDggBest)

?

function?vmax=vmaxinitial(dimsizebound)????????????????????%子程序
????for?i=1:dimsize???????????????????????????????????????%vmax產生過程
????vmax(i)=(bound(i2)-bound(i1))/20;
????end
end

?

function?pop=initial(dimsizepopsizeboundload)??
?while?(1)??????????????????????????????????????????????%初始種群
????
??????for?i=dimsize:-1:2
??????pop(:i)=rand(popsize1)*(bound(i2)-bound(i1))+bound(i1);
??????end

??????i=dimsize;s=zeros(popsize1);
??????while?i>=2
????????s=s+pop(:i);
????????i=i-1;
??????end

??????pop(:1)=load*ones(popsize1)-s;
??
??????if(pop(:1)ones(popsize1)*bound(11))??break;
??????end
?
?end
end
end

?

function?cost=obj(popdimsizepopsizeabcghbound)
????t=1;cost=zeros(popsize1);?????????????????????????????%初始種群目標函數值
????while?t<=dimsize
??????cost=cost+a(t)*pop(:t).^2+b(t)*pop(:t)+c(t)+abs(g(

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

?????文件???????5640??2012-02-24?08:23??pso.m

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

?????????????????5640????????????????????1


評論

共有 條評論

相關資源