How could you modify this semi-infinite optimization to global optimization using GlobalSearch?

1 vue (au cours des 30 derniers jours)
Hello
I managed to create a script and find local minimum for my problem based on this example:
But how could you modify that example into a form that uses GlobalSearch to find global minimum? Let's say you have the myfun.m and mycon.m files. Normally you just set x0 and call fseminf and you have a local minimum. I suppose you need to do something like what is written in the answer here:
So let's say you do this : w1=1:100 and w2=1:100. What next? If you could show me how to modify this MathWorks example, then I could modify my scripts.
Thanks
  1 commentaire
Richárd Tóth
Richárd Tóth le 26 Juil 2019
or is it easier if I simply call fseminf lots of times with different values? Is my code going to be as efficient and fast as by using GA,GlobalSearch or some other solver?

Connectez-vous pour commenter.

Réponse acceptée

Matt J
Matt J le 26 Juil 2019
Modifié(e) : Matt J le 26 Juil 2019
If you could show me how to modify this MathWorks example, then I could modify my scripts.
It would look like below,
myfun=@(x) norm(x-0.5).^2;
[w1,w2]=deal(1:100);
x0=ga(myfun,3,A,b,Aeq,beq,lb,ub,@(x) nonlcon(x,w1,w2));
function [c,ceq]=nonlcon(X,w1,w2)
K1 = sin(w1*X(1)).*cos(w1*X(2)) - 1/1000*(w1-50).^2 -...
sin(w1*X(3))-X(3)-1;
K2 = sin(w2*X(2)).*cos(w2*X(1)) - 1/1000*(w2-50).^2 -...
sin(w2*X(3))-X(3)-1;
c=[K1;K2];
ceq=[];
end
Then, you feed the x0, returned from ga(), as the initial guess to fseminf, exactly as implemented at

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by