Failure in initial nonlinear constraint function evaluation. FMINCON cannot continue.
2 次查看(过去 30 天)
显示 更早的评论
Hey Guys,
My goal is to optimize the EoM that I implied in the constraint file, so that the 5th EoM (dmdt) gets as low as possible. That means that the Mass of the rocket arriving in the final orbit is as high as possible.
I get the following Errors:
Error in constraint (line 3)
y=Y(1);
Error in fmincon (line 633)
[ctmp,ceqtmp] = feval(confcn{3},X,varargin{:});
Error in main (line 59)
[YSol,fval]=fmincon(obj,Y0,A,b,Aeq,beq,lb,ub,nonlincon);
Caused by:
Failure in initial nonlinear constraint function evaluation. FMINCON cannot continue.
I was thinking that the problem may be that I only have to pass the initial value m0 to the fmincon function instead of, as I did now, the vector
Y0=[y0;v0;h0;0;m0;w0;a0];
Firstly I get exact the same errors and secondly I do not know how to pass my other initial values to the Optimization Toolbox?
Can someone explain the errors?
Thanks
0 个评论
回答(1 个)
Torsten
2018-12-14
The way you call fmincon, "t "should not be inside the list of input parameters to the constraint function.
6 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Nonlinear Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!