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

Unsafe use of MOI #100

Open
mlubin opened this issue Jul 21, 2024 · 0 comments
Open

Unsafe use of MOI #100

mlubin opened this issue Jul 21, 2024 · 0 comments

Comments

@mlubin
Copy link

mlubin commented Jul 21, 2024

The code below is accessing fields in a way that assumes jm_cache is a MOI.Utilities.UniversalFallback. This doesn't match the type of the argument (MOI.ModelLike) and could break in multiple ways. You should use the MOI API instead to query properties like variable bounds and starts.

https://github.com/exanauts/ExaModels.jl/blob/0ac40c25602229ecf8c65f5cf1ae70a13f1348bd/ext/ExaModelsMOI.jl#L58C10-L78

CC @blegat

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

1 participant