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

A Question about an Error Message: .../casadi/core/function_internal.cpp:1832: 'eval_sx' not defined for IpoptInterface #10

Open
xwang222 opened this issue Sep 4, 2022 · 1 comment

Comments

@xwang222
Copy link

xwang222 commented Sep 4, 2022

Hi everyone,

I am new to this package and I am just trying to run main_globaltraj.py without changing anything. However, I received the following error message: .../casadi/core/function_internal.cpp:1832: 'eval_sx' not defined for IpoptInterface.

Could someone help me with the issue? Which file should I edit? or how to work around this issue?

Best
Xu

@kertansul
Copy link

kertansul commented Jan 4, 2024

I recently came across this repo and encountered the same issue.
The problem is caused by improper numpy concatenation on mixed float & SX variables in this section

The solution is to insert

n_min = n_min.__float__()
n_max = n_max.__float__()

after this line and this line
which forces n_min and n_max to convert from SX back to float

Hope that helps :)

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