필터 지우기
필터 지우기

Fmincon stopped because the size of the current step is less than the default value of the step size tolerance...How can I solve this?

조회 수: 8 (최근 30일)
This is my coding
U=[0.04854 0 0 0; 0.03483 0.03125 0 0; 0.02477 0.02223 0.04000 0; 0.01738 0.01550 0.02807 0.05263];
m=[1.6378; 1.1753; 0.8359; 0.5867];
n=4;
fun=inline('200*0.5.^0.8+1000*0.5.^0.8*x(1).^2+200*0.3.^0.8+1000*0.3.^0.8*x(2).^2+200*0.4.^0.8+1000*0.4.^0.8*x(3).^2+200*0.5.^0.8+1000*0.5.^0.8*x(4).^2');
x0=[1 1 1 1];
a=[5;5;5;5];
b=[200;200;200;200];
A=[-200 0 0 0; 0 -200 0 0; 0 0 -200 0; 0 0 0 -200];
B=inv(U)*(a-m);
LB=[0 0 0 0];
UB=[1 1 1 1];
[x,fval]=fmincon(fun,x0,A,B,[],[],LB,UB,[]);
x;
fval;
L=ones(4,1);
for i=1:n
L(i)=200*(1-x(i));
end;
L;
L2=U*L+m;
But after running it, it shows
Local minimum possible. Constraints satisfied.
fmincon stopped because the size of the current step is less than
the default value of the step size tolerance and constraints are
satisfied to within the default value of the constraint tolerance.
<stopping criteria details>
May I ask, how can I solve this?

채택된 답변

Matt J
Matt J 2021년 6월 25일
There's nothing to solve. It's a good thing.
  댓글 수: 3
Matt J
Matt J 2021년 6월 25일
Although, you might try reducing the StepTolerance, if you are not happy with the results.

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by