Dependent variable #245
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Welcome back :). The short answer is this unexpected behavior likely pertains to a modeling error. I do not have all the details of the model, but I can provide some better clarification on what is going on in InfiniteOpt with respect to variables and constraints. Before I dive into all that, I'll quickly note that First, let me explain that everything defined in the variable macro is treated as a decision variable (the term variable should not be thought of in the classical algebraic sense). When the model is transformed into a finite approximation using a simultaneous direct transcription approach, this becomes a regular NLP that a traditional NLP solver like Ipopt can deal with. Ipopt has no notion of control vs. state variables. It will simply manipulate all the variables simultaneously in accordance with the constraints. The freedom it has to do this is determined by the degrees of freedom inherent in the model formulation. If you have too many degrees of freedom, then the solver will start to manipulate the state variables in ways you probably don't expect. If you have too few degrees of freedom then your problem will likely be infeasible. InfiniteOpt.jl is a very flexible interface, but the cost of this flexibility is that the responsibility of model accuracy is placed on the user. Now for your model, here are some thoughts that might be helpful. (Note that I don't have the complete model so I don't have the complete picture).
In the future, I would like to add some automated tools for debugging models like this, but that'll constitute a novel research project in and of itself. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the detailed reply, I really appreciate it. When you say
Does that include increasing the number of iterations such that that's never the cause for ending? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Hey,
I just wanted to give you an update since you've been helping so much. After much experimentation, what worked was removing those variables that didn't actually contribute to the problem
x, y, theta
, solve the problem with out and then useDifferentialEquations
to forward integrate their ODEs.This model now converges very nicely:
and navigates around the track
I was hoping to finish the week off with a full solution and the model going around the track... but I think there's something wrong in my ODE integration codes 😄
I think that as fare as InfiniteOpt is concerned, I'm doing everything right now, so I hopefully won't bother you much in the future. Thank you so much for all th…