Skip to content

Does efficiency of casadi code affect the final performance of the solver? #328

Answered by alphaville
sandeep026 asked this question in Q&A
Discussion options

You must be logged in to vote

@sandeep026 We use CasADi to generate C code for some gradients. The C code is then co-compiled with our Rust code. The generated code can indeed be very lengthy. We have a paper where we implemented a custom code generator for optimal control problems, which has a significantly lower footprint in terms of geneated code:

and in some examples seems to run faster (esp. for large prediction horizons):

We have implemented this in gradgen, but we haven't integrated it with OpEn.

That said, overall I find that CasADi performs decently well, despite the fact that it can lead to very large auto-generated files.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sandeep026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants