Skip to content
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

Can spectool do codegen for .so and .json files on python? #15

Open
LeZH13 opened this issue Jul 19, 2024 · 2 comments
Open

Can spectool do codegen for .so and .json files on python? #15

LeZH13 opened this issue Jul 19, 2024 · 2 comments

Comments

@LeZH13
Copy link

LeZH13 commented Jul 19, 2024

Hi,
I know that rockit can generate .so and .json files for direct usage. But I am choosing spectool because the problem I am trying to solve have different stages. Can I do codegen on spectool for my problem just like on rockit? Thanks!

@lvanroye
Copy link
Collaborator

lvanroye commented Jul 26, 2024

Hello,

I am currently working on allowing code-generation for fatrop spectool based on the casadi API. I expect to release it in the coming week.

Alternatively you might be interested to have a look at the casadi integration of fatrop.

Fatrop is being integrated as a solver by the casadi developers and will ship with the coming release. This means that you can use fatrop directly from casadi Opti. You'll only have to make sure that the problem is in the right structure and that you define your variables and constraints in a specific order. I recommend watching the tutorial video: https://www.youtube.com/watch?v=X-nS4i8jJyM&ab_channel=JorisGillis, you can already try it by `pip installing' a nightly casadi build: https://github.com/casadi/casadi/releases/tag/nightly-fatrop_nlp

It already supports codegen, which will enable you using fatrop in a similar fashion as the .so and ,json files (and without a casadi depedency).

Best.
Lander

@LeZH13
Copy link
Author

LeZH13 commented Jul 27, 2024

Thanks for your reply! I'll look in to this. And I'll be looking forward to the codegen update.

Best,
Zhanhao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants