Failure in initial nonlinear constraint function evaluation. FMINCON cannot continue.

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

Respuestas (1)

The way you call fmincon, "t "should not be inside the list of input parameters to the constraint function.

6 comentarios

But I have a function rt in my constraint function, which is the inner radius of my propellant tank over the time, which is dependant on that variable t.
And where do you define "t" ? I don't see it in the files you included.
t=[0 tburn];
yeah i forgot that line. But if I define my "t" as above as a matrix, doesn't that change the size of "Ix" to another size than the vectors that my EoM should return?
Yes, but why should an "inner radius of the propellant tank" be a vector ?
The radius changes over time because the propellant burns from the inside to the outside.
With that rt gets
rt=[rt1;rt2;...;rtn];
Torsten
Torsten el 14 de Dic. de 2018
Editada: Torsten el 14 de Dic. de 2018
I think you will have to reconsider your problem formulation. As far as I can see, you have an optimal control problem that can not be solved as easily as you tried.

Iniciar sesión para comentar.

Etiquetas

Preguntada:

el 14 de Dic. de 2018

Editada:

el 14 de Dic. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by