matlab fmincon _ nonlinear optimization

조회 수: 4 (최근 30일)
jisoo jung
jisoo jung 2019년 10월 14일
댓글: jisoo jung 2019년 10월 14일
Hi. I have been trying to resolve the following issues, but i cannot solve that.
Used thing : Nonlinear optimization
Used option is
options = optimoptions('fmincon',...
'StepTolerance',1e-10,'Hessian','lbfgs','Display','iter','Algorithm','sqp','Display','iter', 'MaxFunEvals',1e4,'MaxIter',1e4,'FiniteDifferenceType','central',...
'OptimalityTolerance',1e-6)
My question is
  1. the objection function value is not changed after certain time.
2. But the first order optimality isnot zero.
3. The lase thing is that (the exitflag = 2) is not good solution ? ( optimality is not zero )
Please check the fig as following.
In my objective function is unknown function. I just known input variable & output. becuase I am using the linearization mode.
So I can only use difference in gradient.
I try to all of thing that i can do, but i cannot solve the problem. Please give me good solution.
( I also using 'interior-point', 'sqp' etc).
Thanks for reading.
  댓글 수: 12
Bruno Luong
Bruno Luong 2019년 10월 14일
편집: Bruno Luong 2019년 10월 14일
"You mean first optimality have to be considered both case?"
Yes. Condider this simple 2D example, where I minimize a x(1) on the circle x(1)^2+x(2)^2 = 1 using non-linear constraint:
[x,fval,exitflag,output] = fmincon(@fun,[0; 0],[],[],[],[],[],[],@mycon)
function f=fun(x)
f = x(1);
end
function [c,ceq]=mycon(x)
c = [];
ceq = sum(x.^2)-1;
end
The output of FMINCON is
output =
struct with fields:
iterations: 9
funcCount: 43
constrviolation: 5.1070e-14
stepsize: 2.1720e-07
algorithm: 'interior-point'
firstorderopt: 2.2352e-08
cgiterations: 4
message: '↵Local minimum found that satisfies the constraints.↵↵Optimization completed because the objective function is non-decreasing in ↵feasible directions, to within the value of the optimality tolerance,↵and constraints are satisfied to within the value of the constraint tolerance.↵↵<stopping criteria details>↵↵Optimization completed: The relative first-order optimality measure, 2.235174e-08,↵is less than options.OptimalityTolerance = 1.000000e-06, and the relative maximum constraint↵violation, 5.107026e-14, is less than options.ConstraintTolerance = 1.000000e-06.↵↵'
The first order reach 2.2352e-08 and trigger the stop of FMINCON (read the message) because the firstorder is rightly computed from the gradient of the Lagrangian.
jisoo jung
jisoo jung 2019년 10월 14일
So , waht do you think aobut my phnomenom ?
The fval is converge. and also constraint also converge to some value.
;But the optimality is very large.
What is your opnion ? and I want to resolve this prob. Please.
My function is unknown function . So I cannot use gradinet personally.
Please give your help.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Nonlinear Optimization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by