The folder contain the Gaussian Q-PSO main code (GQPSO) and 11 functions for benchmark (+ the Gaussian Q-PSO original article).
fun = @griewankfcn;
D = 30;
nPop = 50;
lb = -600;
ub = 600;
maxit = 1000;
maxeval = 10000*D;
[xmin,fmin,histout] = GQPSO(fun,D,nPop,lb,ub,maxit,maxeval);
[xmin,fmin,histout] = GQPSO(@griewankfcn,30,50,-600,600,1000,10000*30);
dos Santos Coelho, Leandro. “Gaussian Quantum-Behaved Particle Swarm Optimization Approaches for Constrained Engineering Design Problems.” Expert Systems with Applications, vol. 37, no. 2, Elsevier BV, Mar. 2010, pp. 1676–83, doi:10.1016/j.eswa.2009.06.044.
w1 and w2 are used to control the "contraction-expansion coefficient".
Reference: The particle swarm - explosion, stability, and convergence in a multidimensional complex space (https://doi.org/10.1109/4235.985692)
constants c1 and c2 are the "cognitive and social components", respectively, which are the acceleration constants responsible for varying the particle velocity towards pbest and gbest, respectively.
Reference: Gaussian quantum-behaved particle swarm optimization approaches for constrained engineering design problems (https://doi.org/10.1016/j.eswa.2009.06.044)
x = unifrnd([lb,ub],[nPop,D]); % input the bounds as single array
The original code assumes only one input. If the code is modified as above, it would work.
lb=[0 5 10];ub=[0 25 100];D=3;
Error using unifrnd (line 25)
Size information is inconsistent.
Error in GQPSO (line 31)
x = unifrnd(lb,ub,[nPop,D]);
Error in Run_sim_QEG (line 449)
[xmin,fmin,histout] = GQPSO(Fobj,dim,nPop,lb,ub,maxit,C1,C2);
Perfect work. Clean code. Thx!
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!