optimization code with pso

Hello all
please how can i use pso to optimize the following objective functions
MIN f1=sum(x)
MAX f2=1/n *sum(x)
where x is an 1D vector and n is length ot it
thansk you

 Risposta accettata

John D'Errico
John D'Errico il 28 Apr 2019
Modificato: John D'Errico il 28 Apr 2019

0 voti

You can't optimize two things at once, unless they both happen to be optimal at the same location. However, you can try to optimize something like
f3 = f1(x) - f2(x)
minimizing the combination of the two. The result won't be optimal for either of the individual pieces, but as I said, you can't do that.
In some cases, you may need to fine tune the linear combination of objectives, thus weighting one or the other of them more highly, so if they have very different scalings, this will be important.
As far as using PSO, that is your problem. You should already know how to use the PSO tool. If not, then you need to read the documentation.

2 Commenti

sahar adil
sahar adil il 28 Apr 2019
thanks for your answer , i dont main optimize the tio functions at same time each function alone
i read about it but never understand what number of varibles mean !!
my problem is that i have vector of data one need find min solution second find max, solution
younes youyou
younes youyou il 18 Dic 2019
can you give me your email i want to text you ?

Accedi per commentare.

Più risposte (0)

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by