alphaville / optimization-engine

Nonconvex embedded optimization: code generation for fast real-time optimization + ROS support
https://alphaville.github.io/optimization-engine/
Other
513 stars 53 forks source link

[do not merge yet] C/C++ library export #15

Closed korken89 closed 5 years ago

korken89 commented 5 years ago

Hi Pantelis,

I have a working example of generating a static C/C++ library based on PANOC now. But I found an issue we have to tackle. Currently the generation of bounds allocate as we need to pass Vec<_>s into the constraints. I think we should change that to &[_], or have an API to move the vectors out again when we need to destroy the Problem struct.

I was hoping to be able to have the Problem struct as a part of the PanocInstance, but the use of generics in Problem made this impossible. This is why I'm thinking about the above so creating a Problem becomes cheap.

BR Emil

Closes #8

NOTE: This branch is based on the emil_fix branch

korken89 commented 5 years ago

Hey @alphaville I think you can start having a look at this now, I just have documentation left (I think). It now generates a complete library based on icasadi, so no Rust code generation is needed at all.

Do you have any comments on the generated interface?