-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Structure specified does not correspond to what the interface can handle #19
Comments
I am working with William on this project. For all the constraints of our problem, CasADi throws this error: |
Can you verify that you did not include stagewise constraints depending on variables from different intervals? Fatrop requires the problem to be written in a form with
You can find more information about the problem structure in the Fatrop paper. Using an implicit integrator scheme with dynamics of this form However, it is possible to rewrite the implicit integrator in the format supported by Fatrop by introducing auxiliary controls Concretely:
By introducing these extra controls your stagewise constraints only depend on variables of the corresponding stage, as required. Note that this is certainly not the most efficient way to implement implicit integrators, but in many examples we still see a significant speed-up w.r.t. Ipopt. If you have not used it yet, there is a debugger functionality to inspect the structure. You can find more information about it in the instruction video. |
@wdecre Thanks for the answer. This is our current loop for collocation:
Thank you again |
Hi!
I'm a student in Mechanical Engineer writing a sim for the Formula Student competition and we wanted to try out FatRop for our solver as ipopt as been a bit too slow for our liking lately. We think we have set up everything nicely according to some examples, although the ones using collocation are rare, however we have hit this wall today and have no clue what it means :
Error using casadi.Opti/solve (line 562) Error in Opti::solve [OptiNode] at .../casadi/core/optistack.cpp:165: .../casadi/core/function_internal.cpp:147: Error calling FatropInterface::init for 'solver': .../casadi/interfaces/fatrop/fatrop_interface.cpp:477: Assertion "errors.empty() && (A_ + total).nnz() == total.nnz()" failed: HPIPM: specified structure of A does not correspond to what the interface can handle. Structure is: N 2690, nx [10, 10, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1 Error in OptiSetupCar (line 218) sol = opti.solve(); Error in CarOptimization (line 19) OptiSetupCar
The solver works perfectly fine with ipopt... I know this is maybe not the best place to note for such thing, but could it be possible to have an hint on where to find as we really want to evaluate FatRop's potential for our sim!
Thank you
William Chayer
The text was updated successfully, but these errors were encountered: