Can matlab solve nonlinear problem with nonlinear constraints and 300 variables to decide?
When I try to solve with fmincon following message is released.
Solver stopped prematurely.
fmincon stopped because it exceeded the function evaluation limit,
options.MaxFunctionEvaluations = 3000 (the default value).

6 comentarios

Does fmincon return a different value than the initial guess? (that is does it even start moving?) You can always increase the number of steps and the other options to increase the defaults:
ops_fmnicon = optimset('fmincon')
and then set larger MaxFunctionEvaluations and other parameters, (smaller tolerances and step-lengths and whatnot). I've never run into other problems than time when looking for many parameters, also never ventured into the 100-s of them either, but there ought not to be no such limits
Ahmet Dogan
Ahmet Dogan el 6 de Jun. de 2022
Editada: Ahmet Dogan el 6 de Jun. de 2022
No, fmincon does not return a different value than the initial guess. I use following equations;
opts = optimset( 'MaxIter', 1000000, 'MaxFunEvals', 100000);
or
options = struct('MaxFunctionEvaluations', 100000);
Although increase iteration number and MaxFunctionEvaluations but it shows same message as follows;
Solver stopped prematurely.
fmincon stopped because it exceeded the function evaluation limit,
options.MaxFunctionEvaluations = 3000 (the default value).
Bjorn Gustavsson
Bjorn Gustavsson el 6 de Jun. de 2022
Does your starting-point have some peculiarities (in the gradient, jacobian etc), is it in a corner of the constraints? It is not a viable solution to your problem, but does fminsearch get rolling (check by setting the Display option to iter)? Sorry not to be more helpful, but there's not too much more to suggest with the information available.
Matt J
Matt J el 6 de Jun. de 2022
Editada: Matt J el 6 de Jun. de 2022
We need to see code. It is not possible that fmincon did more than one iteration without moving at least slightly from the initial point.
Steven Lord
Steven Lord el 6 de Jun. de 2022
Did you just create the options structure or did you pass it into fmincon as part of your call? Merely making the struct does not "change the global settings for fmincon" or anything like that. You have to tell fmincon to use those new options.
Matt J
Matt J el 9 de Jun. de 2022
Editada: Matt J el 9 de Jun. de 2022
Ahmet Dogan's comment moved here
Thank you for your help. I added options and updated MaxFunctionEvaluations .
[x,fval] = fmincon(fun,x0,A,b,Aeq,beq,lb,ub,@confuneq,options);

Iniciar sesión para comentar.

 Respuesta aceptada

Matt J
Matt J el 6 de Jun. de 2022

2 votos

Although increase iteration number and MaxFunctionEvaluations but it shows same message as follows
My guess would be that you created opts, but forgot to feed it to fmincon.

2 comentarios

Ahmet Dogan
Ahmet Dogan el 9 de Jun. de 2022
Thank you for your help. I added options and updated MaxFunctionEvaluations .
[x,fval] = fmincon(fun,x0,A,b,Aeq,beq,lb,ub,@confuneq,options);
Matt J
Matt J el 9 de Jun. de 2022
You're welcome, but if the answer resolved your question, please Aceept-click it.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Optimization en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 6 de Jun. de 2022

Comentada:

el 9 de Jun. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by