File Exchange

image thumbnail

Multi-Objective Particle Swarm Optimization (MOPSO)

version 1.0.0.0 (11.4 KB) by Yarpiz
A structure MATLAB implementation of MOPSO for Evolutionary Multi-Objective Optimization

50 Downloads

Updated 20 Oct 2015

View License

For more information, see following link:
http://yarpiz.com/59/ypea121-mopso

Cite As

Yarpiz (2020). Multi-Objective Particle Swarm Optimization (MOPSO) (https://www.mathworks.com/matlabcentral/fileexchange/52870-multi-objective-particle-swarm-optimization-mopso), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (37)

Index exceeds array bounds.

Any solution to this problem

Error in FindGridIndex (line 25)
find(particle.Cost(j)<Grid(j).UB,1,'first');

Error in mopso (line 87)
rep(i)=FindGridIndex(rep(i),Grid);

Ruiqi Wang

Very useful program. Structure is very clear, and it is easy to modify. Thank the authors.

Error in Mutate (line 33)
xnew(j)=unifrnd(lb,ub);
simpily do this
SOLVED
xnew=x;
xnew(j)=unifrnd(lb(j),ub(j));

Thanks, it's great. But how do we define nonlinear constraints in this code?

Sir, I am using your Matlab code but I am facing the same problem as Ravi Mandava. Please help me.

Index exceeds matrix dimensions.
Error in FindGridIndex (line 24)
particle.GridSubIndex(j)=...
Error in mopso (line 87)
rep(i)=FindGridIndex(rep(i),Grid);
Error in main (line 14)

Problem can be solved if you put
z = [f1 ; f2]; not z = [f1 f2];

nima rezaee

firs of all awesome code and algorithm. thank you.
but unfortunately i have the same problem as RAVI MANDAVA. i want to have different varmin and varmax for each variable in mopso.
i can change the code but im not sure it will work. i dont know maybe im missing something.
can someone please help me .
thanks in advance.

yibe man

can you tell me how to accept the training and test data from excel

This is great!
Thank you

How to implement it in MATLAB

Can anyone please tell me HOw to convert the normalized pareto fronts (between 0 and 1 ) into original values ??
email id : sharmamanpreet35@gmail.com

hi I am using Mopso but i have 4 variables i am facing error. how i will write the Varmax and Var min in mutate function

Error:

VarMax =

10 100 60 6

VarMin =

6 50 40 2

In an assignment A(I) = B, the number of elements in B and I must be the
same.

Error in Mutate (line 33)
xnew(j)=unifrnd(lb,ub);

Error in mopso (line 120)
NewSol.Position=Mutate(pop(i).Position,pm,VarMin,VarMax);

Can anyone PLEASE explain me, how to use this toolbox ?

Luanna Lira

Does this code deal with binary variables?

Thank you. Great works.
Could you tell me the paper about this code?

Great work! Thanks for sharing.

How do we define constraints in this implementation ?

preeti s

Can anyone tell me what is that exact function.That function in not in code library...

Undefined function or variable 'unifrnd'.

Error in mopso (line 66)
pop(i).Position=unifrnd(VarMin,VarMax,VarSize);

think you ... where is equation which write this code or where is the refreance paper for this code ... and have you optimal sizing and location to reduce power losses in radial distribution system can you help me plase
my email
al_mohnds2006@yahoo.com

please share the published paper link

Thanks, Great work! Is it suitable for non-linear constraints?

Hi,
Thanks for the file.
Please how to display the optimal solutions for the variables?
Looking for your reply as soon as possible.

Regards.

Index exceeds matrix dimensions.
Error in FindGridIndex (line 24)
particle.GridSubIndex(j)=...
Error in mopso (line 87)
rep(i)=FindGridIndex(rep(i),Grid);
Error in main (line 14)
mopso;
The above error is showing while I am taking 3 variables with different ranges.

wang

dear Yarpiz,
how to make sure that the generated element is within the specified decision space,like this:-1<x1<1,2<x2<5,-2<x3<8,.... thank u !

good

Fred

Hi,

Great work, thanks for sharing.

I have a question regarding how to handle constraints in MOPSO. In GA I know there is a feature where you can define your constraints but I could not find any similar thing in MOPSO. More specifically, I'm doing power system optimization and would like to check my bus voltages after each solution and if my voltages are not in the limits then I would like to give a message to the solver it is not the right way to go. I used to do it in GA by assigning infinity to the cost function when my voltages out of the range. I've tried the same thing in MOPSO, but did not work.

Thanks,

Abdulaziz

Great code! There is some version of PSO with binary representation of the particles?

Adri Jenie

i'm doing a PSO for aggregate production planning with many decision variables. how many particle in a swarm i must initiate to find pareto optimal for optimizing 16 variable

How to update the velocity of particle,

initial particle.....particle(i).Position

pbest......particle(i).Best.Position

gbest.......rep_h.Position

if we see the value of initial particle (particle(i).Position) and best particle position (particle(i).Best.Position) is same so in the velocity update it will be zero value.

anyone can help in this please

Yarpiz

Thank you for your comment. There were a minor bug in the code, which is now resolved. The lower and upper bound of variables did not applied correctly.

qiang

hello,i need your help please. i use the function ZDT.m which from "ypea124-moea-d",but it can not run. help me please. thank you very much!
??? Improper assignment with rectangular empty matrix.

Error in ==> FindGridIndex at 24
particle.GridSubIndex(j)=...

Error in ==> mopsozdt1 at 158
rep(i)=FindGridIndex(rep(i),Grid);

Updates

1.0.0.0

Bug Resolved: minor bug in the application of lower and upper bound for variables.

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