How can i fix this errors while performing Optimization using fmincon.
Mostrar comentarios más antiguos
Warning: Length of lower bounds is < length(x); filling in missing lower bounds with -Inf. > In checkbounds (line 33) In fmincon (line 306) In companies1 (line 27) Warning: Length of upper bounds is < length(x); filling in missing upper bounds with +Inf. > In checkbounds (line 47) In fmincon (line 306) In companies1 (line 27) Attempt to execute SCRIPT companies1 as a function: C:\Users\shahn\Desktop\companies1.m
Error in optimfcnchk/checkfun (line 315)
f = userfcn(x,varargin{:});
Error in fmincon (line 534)
initVals.f = feval(funfcn{3},X,varargin{:});
Error in companies1 (line 27) [x,fval,exitflag,output]=fmincon(@companies1,x0,A,B,Aeq,beq,lb,ub,[],options);
Caused by:
Failure in initial user-supplied objective function evaluation. FMINCON cannot continue.
Respuesta aceptada
Más respuestas (5)
NIKET shah
el 19 de Abr. de 2018
0 votos
NIKET shah
el 19 de Abr. de 2018
0 votos
NIKET shah
el 20 de Abr. de 2018
0 votos
1 comentario
Walter Roberson
el 20 de Abr. de 2018
Are you trying to constrain the first 3 out of 72 input variables? Or are you trying to work with what is really a 24 x 3 array and you want to constrain each of the rows of that to sum to 1?
NIKET shah
el 20 de Abr. de 2018
0 votos
NIKET shah
el 20 de Abr. de 2018
0 votos
3 comentarios
Walter Roberson
el 20 de Abr. de 2018
https://www.mathworks.com/help/optim/ug/quadprog.html
NIKET shah
el 20 de Abr. de 2018
Walter Roberson
el 20 de Abr. de 2018
Your objective appears to me at the moment to fit within what can be done with quadprog. If I I am correct about that then you should switch to that instead, as the algorithms involved know how to divide everything up into subproblems that can each be solved exactly, and then the best is taken, leading to a global minimization.
If I have instead misread your objective (it is after 4am here), or if you choose to use fmincon even if quadprog would work, then the best you can get is a local minima.
Categorías
Más información sobre Surrogate Optimization en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!