Multi-Objective Particle Swarm Optimization (MOPSO) is proposed by Coello Coello et al., in 2004. It is a multi-objective version of PSO which incorporates the Pareto Envelope and grid making technique, similar to Pareto Envelope-based Selection Algorithm to handle the multi-objective optimization problems.
Just like PSO, particle in MOPSO are sharing information and moving towards global best particles and their own personal (local) best memory. However, unlike PSO, there is more than one criterion to determine and define the best (global or local). All of non-dominated particles in the swarm, are gathered into a sub-swarm called Repository, and every particle chooses its global best target, among members of this Repository. For personal (local) best particle, a domination based and probabilistic rules is utilized.
In this post, we are going to share with you the open source MATLAB implementation of MOPSO. The algorithm is implemented in a structured manner and if you are familiar with MATLAB programming language, you will find it easy, to use the codes in your research projects.
The download link of this project follows.
Implementation of MOPSO in MATLABDownload
Citing This Work
If you wish, you can cite this content as follows.
Cite as:Mostapha Kalami Heris, Multi-Objective PSO in MATLAB (URL: https://yarpiz.com/59/ypea121-mopso), Yarpiz, 2015.
Thanks for your sharing! Would you mind share the single-objective PSO algorithm implementation with us. Much appreciated! Your code are well documented and well written, it’s very helpful for my research.
You’re welcome, dear Bruce. You can download the implementation of standard Particle Swarm Optimization (PSO) in MATLAB, from following link:
Particle Swarm Optimization in MATLAB
getting the following error:-
Improper assignment with rectangular empty matrix.
Error in FindGridIndex (line 24)
Error in mopso (line 158)
Maybe some exceptional situation cause the error. Please send us the definition of your optimization problem. We will investigate the problem and resolve any unhandled exceptions in the codes.
gamma=18.5;gammaw=0;fi_dash = 30*(pi/180);E=25000;nu=0.3;F=2000;
D = x(1); L= x(2); B = x(3);Ht = x(4);
Nq = ((tan((pi/4)+(fi_dash/2)))^2) * exp(pi*tan(fi_dash));
Nc = (Nq-1)/tan(fi_dash);
Nr = 2*(Nq+1)*tan(fi_dash);
F_gamas = 1-0.4*(B/L);
F_gamad = 1 ;
si = atan(D/B);
Fqs = 1+(B/L)*tan(fi_dash);
Fqd = 1+2*tan(fi_dash)*((1-sin(fi_dash))^2)*si;
gamma_dash = gamma-gammaw ;
q_dash = gamma_dash*D ;
q_ult=0.5*B*gamma_dash*Nr*F_gamas*F_gamad + q_dash*Nq*Fqs*Fqd;
%check for depth– Take Maximum of Critical BM
%One way shear–Vu11.0)
% Two way shear–Vu2<Vc2
%Reinforcement Long Direction– Ht or d for Atsx
%Reinforceement in short Direction– Ht or d for Atsy
FOS = q_ult/(F/(B*L));
beta_z = -0.0017*((L/B)^2)+0.0597*(L/B)+0.9843 ;
delta = (F*(1-(nu^2)))/(beta_z*E*sqrt(B*L));
%construction cost estimate–D and Ht interchange,+/- Qb
Qe = (B+Bo)*(L+Lo)*D;
Qf = 2*Ht*(B+L);
Qc = B*L*Ht;
Qr =(Wsx+Wsy) ;
Qb = Qe-Qc ;
Total_cost= Qe*Ce+Qf*Cf+Qc*Cc+Qr*Cr+Qb*Cb ;
% printf("\n\n Total_cost = %f",Total_cost);
z=[z1 z2 z3]';
Your objectives can have the value of NaN. So everything may fall, due to incomparability of NaN to other numbers. You should modify your code, to replace the potential NaN outputs, with nun-NaN but invalid values.
Thank you very much for your remarkable codes in matlab. Its really being helpful for my research work.
very helpful for my research
Thanks a lot Yarpiz…!!
Great help to all….Highly appreciated your work and the way you wrote the Matlab codes.
Thanks for your sharing!
since this is copyrifgt code. May I please get to know, in order to use this algorithm for my application domain, if I can use this code or not.
Thank you so much for your provide us knowledge about optimisation . In very less time I am understanding PSO by Seeing your video.. but I want to ask one thing How can we apply particle swarm optimisation for total cost function of inventory control problem…will you please explain with any example. I am try to use but I can’t understand how to right the cost and then how can I find the sensitivity table …please help me … I will be grateful …thank you again!
How can I cite your Matlab code in my research?
Will u please share the code for Harris hawks optimization with constraints.
Thanks & Regards,