필터 지우기
필터 지우기

fmincon doesn't stop

조회 수: 3 (최근 30일)
xueqi
xueqi 2013년 2월 16일
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

답변 (1개)

Walter Roberson
Walter Roberson 2013년 2월 16일
Your function "beta" has a singularity.
  댓글 수: 1
xueqi
xueqi 2013년 2월 16일
편집: xueqi 2013년 2월 16일
Hi Do you mean that the singularity is the optima or the existence of singularity causes fmincon to never stop? And also I have answered your comment in another questionhttp://www.mathworks.com/matlabcentral/answers/63283-problems-about-solve-exponential-function could you have a look at that too please? I accept an answer for that question and then realized the solution is not valid...

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

카테고리

Help CenterFile Exchange에서 Get Started with Optimization Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by