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

  • 大小: 2KB
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-03-25
  • 語言: Matlab
  • 標簽: MATLAB??DG??

資源簡介

PARTICLE SWARM OPTIMIZTION FOR DG PLACEMENT

資源截圖

代碼片段和文件信息

%?The?implementation?of?PSO?program?to?find?the?location?and?size?of?DG.?
%?The?user?can?make?m-files?for?bus?data?line?data?and?additional?file?myloss.m?
%?before?using?this?program?as?per?the?user?requirement?with?support?files.

%?The?basic?reffence?papers?for?this?program??“James?Kennedy?and?Russell?Eberhart“?on
%?PSO
%?Author:?AASHISH?KUMAR?BOHRE?MANIT?BHOPAL?MP?INDIA

clear?all
clc

[basemva?busdata?linedata]=?Mydgalldata;
up=28;?low=0.001;?accuracy?=?0.001;??maxiter?=?10;
qwe=busdata;
for?bss=4:1:16
????aasuu=aasuu1;
????aasuu(bss1)=2;
?????????????n=length(qwe(:1));
?????????Dn=?n-6;???????????
?????????itera_max??=?10;?c1?=2;?c2?=?2;?R1?=?0.5;?R2?=?0.5;
???????????Pdg=rand(Dn1).*(up-low)+low;
????????????current_pop?=?[Pdg];
???????????current_fitnsssss=ones(Dn1).*inf;?????????????????????
???????????local_best_fitnsssss??=?current_fitnsssss;???????????
???????????[global_best_fitnsssssg]?=?min(local_best_fitnsssss);
???????????local_best_pop??=?current_pop;
???????????globl_best_pop?=?local_best_pop(g:);
????????????velocity?=?rand(Dn1).*0.5;
????????itera?=?0?;
??????while??(?itera?????????itera?=?itera?+?1;
????????w=(itera_max-itera)/itera_max;
?????????velocity?=?w?*velocity?+?c1*rand.*(local_best_pop-current_pop)+...
?????????????c2*rand.*((ones(Dn1)*globl_best_pop)-current_pop);
?????????current_pop?=?current_pop?+?velocity;????????
??????????????for?i=1:Dn
??????????????????if?current_pop(i:)??????????????????????current_pop(i:)=low;
??????????????????elseif?current_pop(i:)>up
??????????????????????current_pop(i:)=up;
??????????????????end
??????????????end
??????????????p_g=gar;
????????????for?dgb=1:1:Dn
????????????????p_g(bss1)=current_pop(dgb1);
????????????????aai=p_g(bss1);
????????????????
????????????????myloss?
????????????????ajj?=?real(myloss);
?????????????
??????????????fitP_LOSS(dgb)=ajj;
????????????end
????????????current_fitnsssss=fitP_LOSS‘;
????????for?i?=?1?:?Dn
????????????????if?current_fitnsssss(i:)????????????????????local_best_fitnsssss(i:)??=?current_fitnsssss(i:);??
???????????????????local_best_pop(i:)?=?current_pop(i:);
????????????????end???
????????end
?????????[current_global_best_fitnsssssg]?=?min(local_best_fitnsssss);
????????if?current_global_best_fitnsssss????????????global_best_fitnsssss?=?current_global_best_fitnsssss;
????????end???
?????????globl_best_pop?=?local_best_pop(g:);
????????minfit(itera)=global_best_fitnsssss;
????????itera
??????end???
????????global_best_fitnsssss???
????????globl_best_pop?????????
end



?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????1509??2020-09-19?08:46??license.txt
?????文件????????2620??2020-09-19?08:46??PSO_dg_prog.m

評論

共有 條評論