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

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

資源簡介

粒子群,pso,matlab實(shí)時繪圖,自帶測試函數(shù)

資源截圖

代碼片段和文件信息

%?demopsobehavior.m
%?demo?of?the?pso.m?function
%?the?pso?tries?to?find?the?minimum?of?the?f6?function?a?standard
%?benchmark
%
%?on?the?plots?blue?is?current?position?green?is?Pbest?and?red?is?Gbest

%?Brian?Birge
%?Rev?2.0
%?10/30/03

clear?all
close?all
clc
help?demopsobehavior
warning?off

%aviobj?=?avifile([‘demopsobehavior.avi‘]);
%aviobj.Quality=100;
%aviobj.Compression=‘Cinepak‘;
%aviobj.fps=15;

%xrng=input(‘Input?search?range?for?X?e.g.?[-1010]???‘);
%yrng=input(‘Input?search?range?for?Y???‘);
xrng=[-2020];
yrng=[-2020];

%?if?=0?then?we?look?for?minimum?=1?then?max
?%?minmax=input(‘Search?for?min?(0)?or?max?(1)??‘);
??minmax=1;
??mvden?=?input(‘Max?velocity?divisor???‘);?
??ps????=?input(‘How?many?particles??‘);
??modl??=?input(‘Choose?PSO?model??‘);
?%?note:?if?errgoal=NaN?then?unconstrained?min?or?max?is?performed
??if?minmax==1
????%??errgoal=0.97643183;?%?max?for?f6?function?(close?enough?for?termination)
??????errgoal=NaN;
??else
?????%?errgoal=0;?%?min
??????errgoal=NaN;
??end
??minx?=?xrng(1);
??maxx?=?xrng(2);
??miny?=?yrng(1);
??maxy?=?yrng(2);

%--------------------------------------------------------------------------
??dims=2;
??varrange=[];
??mv=[];
??for?i=1:dims
??????varrange=[varrange;minx?maxx];
??????mv=[mv;(varrange(i2)-varrange(i1))/mvden];
??end
??
??ac??????=?[2.12.1];%?acceleration?constants?only?used?for?modl=0
??Iwt?????=?[0.90.6];??%?intertia?weights?only?used?for?modl=0
??shw?????=?100;???%?how?often?to?update?display
??epoch???=?20000;?%?max?iterations
??wt_end??=?1500;?%?iterations?it?takes?to?go?from?Iwt(1)?to?Iwt(2)?only?for?modl=0
??errgrad?=?1e-99;???%?lowest?error?gradient?tolerance
??errgraditer=5000;?%?max?#?of?epochs?without?error?change?>=?errgrad
??PSOseed?=?0;????%?if=1?then?can?input?particle?starting?positions?if=?0?then?all?random
??%?starting?particle?positions?(first?20?at?zero?just?for?an?example)
???PSOseedValue?=?repmat([0]ps-101);
??
??psoparams=...
???[shw?epoch?ps?ac(1)?ac(2)?Iwt(1)?Iwt(2)?...
????wt_end?errgrad?errgraditer?errgoal?modl?PSOseed];

?%?run?pso
?%?vectorized?version?(normally?instead?of?goplotpso4demo?use?goplotpso?or?your?own)
??pso_out=pso_Trelea_vectorized(‘f6‘?dims...
??????mv?varrange?minmax?psoparams‘goplotpso4demo‘PSOseedValue);
??%%?vectorized?version?(normally?instead?of?goplotpso4demo?use?goplotpso?or?your?own)
??%[pso_outtrte]=pso_Trelea_vectorized(‘f6‘?dims...
??%????mv?varrange?minmax?psoparams‘goplotpso‘PSOseedValue);
??
??%%?non-vectorized?(much?slower?but?some?cost?functions?can‘t?be?vectorized)
?%??pso_out=pso_Trelea(‘f6‘?dims...
?%??????mv?varrange?minmax?psoparams‘goplotpso4demo‘);??
%--------------------------------------------------------------------------?
disp(‘Best?fit?parameters:?cost?=?f6(xy)‘);
disp([‘????x?=?‘num2str(pso_out(1))]);
disp([‘????y?=?‘num2str(pso_out(2))]);
disp([‘?cost?=?‘num2str(pso_out(3))]);
disp

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

?????文件?????741121??2003-05-22?08:25??PSOtool\PSOtool\A?Particle?Swarm?Optimization?(PSO)?Primer.pdf

?????文件???????3549??2005-03-22?10:54??PSOtool\PSOtool\DemoPSOBehavior.m

?????文件???????2615??2005-03-22?12:46??PSOtool\PSOtool\goplotpso.m

?????文件???????3260??2005-03-22?12:50??PSOtool\PSOtool\goplotpso4demo.m

?????文件????????172??2004-04-27?15:05??PSOtool\PSOtool\hiddenutils\forcecol.m

?????文件????????181??2004-04-27?15:05??PSOtool\PSOtool\hiddenutils\forcerow.m

?????文件???????4455??2001-08-07?09:15??PSOtool\PSOtool\hiddenutils\normalize.m

?????文件??????14968??2005-03-22?13:01??PSOtool\PSOtool\pso_Trelea.m

?????文件??????19904??2005-03-22?12:52??PSOtool\PSOtool\pso_Trelea_vectorized.m

?????文件???????2626??2005-03-22?13:11??PSOtool\PSOtool\ReadME.txt

?????文件????????871??2004-08-23?13:42??PSOtool\PSOtool\testfunctions\ackley.m

?????文件????????639??2004-08-19?15:40??PSOtool\PSOtool\testfunctions\alpine.m

?????文件????????732??2004-08-13?13:06??PSOtool\PSOtool\testfunctions\DeJong_f2.m

?????文件????????506??2004-08-19?15:39??PSOtool\PSOtool\testfunctions\DeJong_f3.m

?????文件???????1004??2004-08-13?13:17??PSOtool\PSOtool\testfunctions\DeJong_f4.m

?????文件????????950??2004-08-13?14:04??PSOtool\PSOtool\testfunctions\DeJong_f4_noise.m

?????文件????????314??2004-08-19?15:30??PSOtool\PSOtool\testfunctions\f6.m

?????文件????????700??2004-08-23?13:42??PSOtool\PSOtool\testfunctions\f6mod.m

?????文件???????1510??2004-08-26?13:16??PSOtool\PSOtool\testfunctions\f6_bubbles_dyn.m

?????文件????????788??2004-08-20?14:03??PSOtool\PSOtool\testfunctions\f6_dynamic.m

?????文件????????839??2004-08-24?13:14??PSOtool\PSOtool\testfunctions\f6_linear_dyn.m

?????文件????????806??2004-08-27?13:20??PSOtool\PSOtool\testfunctions\f6_spiral_dyn.m

?????文件???????1278??2004-08-13?15:48??PSOtool\PSOtool\testfunctions\Foxhole.m

?????文件???????1214??2004-08-13?11:02??PSOtool\PSOtool\testfunctions\Griewank.m

?????文件????????749??2004-08-23?15:41??PSOtool\PSOtool\testfunctions\linear_dyn.m

?????文件????????663??2004-08-19?15:26??PSOtool\PSOtool\testfunctions\NDparabola.m

?????文件????????521??2004-08-19?15:26??PSOtool\PSOtool\testfunctions\Rastrigin.m

?????文件????????723??2004-08-19?15:24??PSOtool\PSOtool\testfunctions\Rosenbrock.m

?????文件????????841??2004-08-27?15:51??PSOtool\PSOtool\testfunctions\spiral_dyn.m

?????文件????????895??2004-08-19?15:23??PSOtool\PSOtool\testfunctions\tripod.m

............此處省略7個文件信息

評論

共有 條評論