File Exchange

image thumbnail

Gaussian Quantum-Behaved Particle Swarm Optimization

version 1.0.2 (211 KB) by David Franco
The Gaussian Q-PSO function + 11 benchmark functions + original article.


Updated 18 Oct 2018

View Version History

View License

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);

Cite As

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.

View more styles

Comments and Ratings (5)

David Franco

Xia Joshua,

w1 and w2 are used to control the "contraction-expansion coefficient".
Reference: The particle swarm - explosion, stability, and convergence in a multidimensional complex space (

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 (

Xia Joshua

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.

Khurram Shahzad Sana

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);

Mark Stevenson

Perfect work. Clean code. Thx!

MATLAB Release Compatibility
Created with R2018a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!