fmincon doesn't stop
2 次查看(过去 30 天)
显示 更早的评论
Hi I am using fmincon to do optimization. Here is my code
if true
% A=[1 1 1 0 0 0 0 0];
b=[1];
lb=[0.1;0.1;0.1;0.0001;1.1;0.001;1.1;0.001];
ub=[1;1;1;1;Inf;1;Inf;1];
options=optimset('Algorithm','interior-point','Display','iter','TolFun', 1e-1,'MaxIter',4);
x = fmincon(@beta,[0.2,0.2,0.2,0.08,100,0.05,100,0.04],A,b,[],[],lb,ub,[],options)
%x= ga(@beta,8,A,b,[],[],lb,ub,[],options)
end
and here is the result I got so far. Could tell me what this tell me about this problem? It already finds the optima which is around 159, but it just doesn't stop and return the optimized parameter to me...Even I set the maxiter to 4 and tolfun to just 1e-1...
sumllh =
161.5270
sumllh =
161.5270
sumllh =
161.5270
sumllh =
161.5270
sumllh =
161.5270
sumllh =
161.5270
sumllh =
161.5270
sumllh =
161.5270
sumllh =
161.5270
First-order Norm of
Iter F-count f(x) Feasibility optimality step
0 9 1.615270e+002 0.000e+000 2.410e+002
sumllh =
3.1124e+003
sumllh =
841.5238
sumllh =
332.1484
sumllh =
199.9506
sumllh =
Inf
sumllh =
Inf
sumllh =
413.8880
sumllh =
199.6041
sumllh =
164.9631
sumllh =
159.8651
sumllh =
159.8651
sumllh =
159.8651
sumllh =
159.8651
sumllh =
159.8651
sumllh =
159.8651
sumllh =
159.8651
sumllh =
159.8651
sumllh =
159.8651
User objective function returned Inf; trying a new point... 1 27 1.598651e+002 0.000e+000 5.029e+002 7.786e-003
sumllh =
Inf
sumllh =
159.5856
sumllh =
159.5856
sumllh =
159.5856
sumllh =
159.5856
sumllh =
159.5856
sumllh =
159.5856
sumllh =
159.5856
sumllh =
159.5856
sumllh =
159.5856
User objective function returned Inf; trying a new point... 2 37 1.595856e+002 0.000e+000 5.090e+002 1.156e-002
sumllh =
Inf
sumllh =
212.1647
sumllh =
174.3417
sumllh =
162.5951
sumllh =
176.9179
sumllh =
166.3836
sumllh =
160.0872
sumllh =
159.0489
sumllh =
159.0489
sumllh =
159.0489
sumllh =
159.0489
0 个评论
回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!