Borrar filtros
Borrar filtros

fmincon doesn't stop

3 visualizaciones (últimos 30 días)
xueqi
xueqi el 16 de Feb. de 2013
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

Respuestas (1)

Walter Roberson
Walter Roberson el 16 de Feb. de 2013
Your function "beta" has a singularity.
  1 comentario
xueqi
xueqi el 16 de Feb. de 2013
Editada: xueqi el 16 de Feb. de 2013
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...

Iniciar sesión para comentar.

Categorías

Más información sobre Get Started with Optimization Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by