CasADiNLPModels.jl: an interface for CasADi via loading code generated functions

We (@frapac, @apozharski, and Armin Nurkanović) have released a small new package for easily interfacing NLPs modeled in CasADi with the NLPModels.jl ecosystem. The package implements loading of CasÄDi code generated functions from compiled binaries. This is used to load NLPs from such binaries and wrap them in an CasADiNLPModel which can then be solved using any of the suite of Julia solvers which handle AbstractNlpModels.

The workflow to use this package can be quickly summarized as:

  1. Model your problem using CasADi, using whatever interface you would like.
  2. Code generate the C code for the required functions (see the README on github), and compile them into a shared library using your favorite C compiler.
  3. Create a JSON file with the required numerical data.
  4. Load the NLP into Julia using the CasADiNLPModel constructor.
  5. Solve using your favorite Julia interfaced NLP solver.

The package is fairly basically featured at the moment so if you find any bugs or have any feature requests, feel free to submit an issue.

2 Likes

(post deleted by author)