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

조회 수: 1 (최근 30일)
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 CenterFile Exchange에서 Solver 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