フィルターのクリア

Different solutions of fmincon when changing x0

2 ビュー (過去 30 日間)
Daniela Würmseer
Daniela Würmseer 2022 年 3 月 31 日
編集済み: Matt J 2022 年 4 月 26 日
I wanted to ask if it is normal that fmincon can have different solutions with different x0?
I implement an Algoritjm by myself and use fmincon as follows:
options = optimoptions('fmincon','Display','iter','Algorithm','sqp');
x = fmincon(fun,x0,A,b,Aeq,beq,lb,ub,nonlcon,options)

採用された回答

Torsten
Torsten 2022 年 3 月 31 日
編集済み: Torsten 2022 年 3 月 31 日
I wanted to ask if it is normal that fmincon can have different solutions with different x0?
There can be several reasons for fmincon to converge to different "solutions" dependent on the starting point. But - sure - the optimization algorithm implemented in "fmincon" tries to find local extrema. If a function has more than one or is ill-behaved, it depends on the starting point to which of the local extrema the algorithm converges.
  2 件のコメント
Shaily_T
Shaily_T 2022 年 4 月 26 日
Could you please elaborate more on an ill-behaved function? Is it inherent to the function or can be dependent on our codes as well? I mean for example something wrong in our code.
And is there a way to determine which of the probabilities you mentioned is the case in our function? I mean being ill-behaved or having more than one extrema.
Thank you in advance!
Matt J
Matt J 2022 年 4 月 26 日
編集済み: Matt J 2022 年 4 月 26 日
You can look at the function values at the two solutions to see if they are nearly the same. If so, then plainly you have multiple minima. Better still, given the two solutions x1 and x2,you could plot the 1D function
g(t)=fun(t*x1+(1-t)*x2) % t from -1 to 2
If the graph is very flat between t=0 and t=1 or is very bumpy, it is a likely sign that your graph has multiple local/global minima.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSolver Outputs and Iterative Display についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by