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

資源簡介

多目標優(yōu)化,需要的請自行下載。The power-supply side uses the combined cooling, heating, and power supply system in conjunction with power grids. In the first stage, the single-target energy supply with the lowest cost of the combined heat and power system and the least emission of polluting gas is optimized. In th

資源截圖

代碼片段和文件信息

function?PSOfirst()
%%?清空環(huán)境
clear;
clc;

%%?參數(shù)設置
w=0.9;%權(quán)值?將影響PSO?的全局與局部搜優(yōu)能力,?值較大,全局搜優(yōu)能力強,局部搜優(yōu)能力弱;反之,則局部搜優(yōu)能力增強,而全局搜優(yōu)能力減弱。
c1=0.1;%加速度,影響收斂速度
c2=0.1;
dim=6;%6維,表示企業(yè)數(shù)量
swarmsize=100;%粒子群規(guī)模,表示有100個解的空間
maxiter=200;%最大循環(huán)次數(shù),影響時間
minfit=0.001;%最小適應值
vmax=0.01;
vmin=-0.01;
ub=[0.20.20.20.20.20.2];%解向量的最大限制
lb=[0.010.010.010.010.010.01];%解向量的最小限制

%%?種群初始化
range=ones(swarmsize1)*(ub-lb);
swarm=rand(swarmsizedim).*range+ones(swarmsize1)*lb;%粒子群位置矩陣
Y1=[33.08;
???21.85;?
???6.19;?
???11.77;?
???9.96;?
???17.15;];?
Y=Y1./100;%將百分數(shù)化為小數(shù)
[ymyn]=size(Y);
for?i=1:swarmsize??%%?YX的約束
????s=swarm(i:);
????ss=s‘;
????while?sum(Y.*ss)<0.1*sum(Y)
????????ss=rand(dim1).*((ub-lb)‘)+ones(dim1).*((lb)‘);
????end
????swarm(i:)=ss‘;
end
vstep=rand(swarmsizedim)

評論

共有 條評論