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

[Utilities] fix adding unsupported constraints to AbstractModel #2572

Merged
merged 4 commits into from
Oct 30, 2024

Conversation

odow
Copy link
Member

@odow odow commented Oct 30, 2024

Closes #2570
Closes #2571

This PR is an alternative to #2571

src/Utilities/model.jl Outdated Show resolved Hide resolved
Co-authored-by: Benoît Legat <[email protected]>
@blegat
Copy link
Member

blegat commented Oct 30, 2024

Ah, I understand better your other PR now, it's not such a nasty bug. But I wouldn't say it was expected behavior that we were permissive by letting add_constraint work even when supports_constraint was defined. I think this PR gives the expected behavior.

@odow
Copy link
Member Author

odow commented Oct 30, 2024

Yeah it's a case of "things worked when they shouldn't have." It also never came up in practice at the JuMP level, because we always copy to a file format with bridges, and they checked appropriately.

src/Utilities/model.jl Outdated Show resolved Hide resolved
@odow odow merged commit 95e16c4 into master Oct 30, 2024
15 of 16 checks passed
@odow odow deleted the od/model-copy branch October 30, 2024 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[FileFormats.CBF] bug copying unsupported variable bounds to CBF
2 participants