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

IO Names not checked for uniqueness #2604

Closed
jgillis opened this issue Apr 29, 2020 · 9 comments
Closed

IO Names not checked for uniqueness #2604

jgillis opened this issue Apr 29, 2020 · 9 comments
Milestone

Comments

@jgillis
Copy link
Member

jgillis commented Apr 29, 2020

from casadi import *

x = MX.sym("x")
f = Function("f",[x],[x**2,x-2],["x"],["y","y"])
print(f)
@jgillis jgillis assigned jgillis and unassigned jgillis Apr 29, 2020
@jgillis
Copy link
Member Author

jgillis commented Apr 29, 2020

@tmmsartor

@jgillis
Copy link
Member Author

jgillis commented Jul 15, 2020

Seems to be violated often internally

@jgillis
Copy link
Member Author

jgillis commented Jul 15, 2020

@jaeandersson can you comment please?

@jaeandersson
Copy link
Member

Sorry for late answer. You say that it's violated internally. Do you have an example? I thought that was resolved.

@jgillis
Copy link
Member Author

jgillis commented Nov 17, 2020

Just add a quick assertion internally and run the unittests..

@jaeandersson
Copy link
Member

Oh, I misunderstood. I meant that I thought that the issue of getting duplicate names because of differentiation had been resolved, but this is a different issue.

@jaeandersson
Copy link
Member

Added an implementation of the check using hashes (should be faster than string comparison, but probably overkill): a426fa3
Didn't push to develop as it breaks unit tests.

@jaeandersson
Copy link
Member

I believe that this is a breaking change. Currently, you'll get duplicate names internally as part of the derivative generation, cf. #2040. Don't think we should disallow duplicate names before we've resolved that issue

@jaeandersson jaeandersson reopened this Mar 29, 2023
@jaeandersson
Copy link
Member

#2040 has now been resolved

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