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?

2 views (last 30 days)
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?

Accepted Answer

Matt J
Matt J on 25 Jun 2021
There's nothing to solve. It's a good thing.
  3 Comments

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!