nonlinear problem with 300 varibales

1 次查看(过去 30 天)
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 个评论
Steven Lord
Steven Lord 2022-6-6
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 2022-6-9
编辑:Matt J 2022-6-9
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);

请先登录,再进行评论。

采纳的回答

Matt J
Matt J 2022-6-6
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 个评论
Ahmet Dogan
Ahmet Dogan 2022-6-9
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 2022-6-9
You're welcome, but if the answer resolved your question, please Aceept-click it.

请先登录,再进行评论。

更多回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by