Matlab fmincon(function based) optimality issue :: constrained nonlinear optimization

1 回表示 (過去 30 日間)
jisoo jung
jisoo jung 2019 年 10 月 15 日
コメント済み: Matt J 2019 年 10 月 16 日
Hi,
I trying to optimize my problem.
Now i am using matlab fmincon with constrainted problem ('sqp' algorithm).
But , in my case, optimality is very large even though the objective fval is converge (please check img.)
So, when I see the exitflag = -2,2 , just keep trying rerun from final result.
My question is
1.
Why did objective function value is converge, but optimality is so great? I have tried a lot to solve this problem.
2.
Is it ok if I rerun to the last value even if exitflag didn't get 1?
( Ex. reulst is exitflag = -2( Constrint is not satisfied.) --> I try to make optimalityTolerence be small for obtaining exitflag = 1.)
I mean this approach is trick ?
3.
If I don't get an exitflag of 1 through sqp and rerun it doesn't work, is this a good approach to get the result using a nonderivative method instead of the sqp algorithm?
(Ex. pattern search )
Please help me.
Thank you for reading.
the below fig is exitflag = 2 situation.
My solver option is
options = optimoptions('fmincon',...
'StepTolerance',1e-20,'Display','iter',...
'Algorithm','sqp','Display','iter', 'MaxFunEvals',1e4,'MaxIter',1e4,...
'FiniteDifferenceType','central','ConstraintTolerance',1.0e-3); % 'FiniteDifferenceStepSize',1e-2, , 'ScaleProblem','obj-and-constr' 'FiniteDifferenceType','central',
ConstraintTolerance is adjusted whenver the exitflag isnot 1.
1,1 = x axis : iter , y axixs :current Variable value --> 6 variable
1,2 = (x axis : iter , y axis : function value)
2,1 = x axis: iter ,y axis : optimality
2,2 = x axis : iter , y axis : constraint violate

採用された回答

Matt J
Matt J 2019 年 10 月 15 日
編集済み: Matt J 2019 年 10 月 15 日
But , in my case, optimality is very large even though the objective fval is converge (please check img.)
Your plots are uninterpretable to many in the forum (and definitely to me), because they are not labelled in English. A few thoughts I can offer, however:
(1) It may be that fval is converging, but it is converging to something non-optimal. That could explain why the optimality measure is large, and is especially likely if fmincon is telling you that it cannot find even a feasible point.
(2) It is important to keep in mind that the optimality measure is not a normalized quantity and therefore you often can't be sure what to consider "very large" or "very small". For example, the point x0=1e-6 is quite close to the minima of both these functions: f(x)=x.^2 and g(x)=1e20*x^2. However, the gradients and the value of g(x0) are quite a bit larger than for f(x0).
Is it ok if I rerun to the last value even if exitflag didn't get 1?
I wouldn't have a lot of faith in it. It would be better to pursue improved initial guess strategies. If it is very hard to devise a good initial guess, it often means that the problem is infeasible and there is just no point trying to solve it.
If I don't get an exitflag of 1 through sqp and rerun it doesn't work, is this a good approach to get the result using a nonderivative method instead of the sqp algorithm?
Questions like that are not answerable without seeing the objective function and constraints.
  4 件のコメント
jisoo jung
jisoo jung 2019 年 10 月 16 日
編集済み: jisoo jung 2019 年 10 月 16 日
I just try any value & and I can find some init value with satisfied constraint.
Is there any method to find init value ?
and in that how can i proof my solution is global?
In my case, I try to show the same convergence at differenct init valu.e
Matt J
Matt J 2019 年 10 月 16 日
We have to see the optimization problem to answer these questions.

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

その他の回答 (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