フィルターのクリア

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

1 回表示 (過去 30 日間)
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 件のコメント
Richárd Tóth
Richárd Tóth 2019 年 7 月 26 日
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?

サインインしてコメントする。

採用された回答

Matt J
Matt J 2019 年 7 月 26 日
編集済み: Matt J 2019 年 7 月 26 日
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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear Least Squares についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by