Oscar Dowson
Oscar Dowson
We should update the documentation to reflect the new way of writing bridges with tests and `final_touch` The recent constraint programming bridges are good examples to follow.
> Users setting bounds on binaries should expect to get errors about bounds being set twice No, this is something that is explicitly allowed in JuMP, and is probably more...
If they print a model that has been bridged, anything can happen. I think it's more surprising that some solvers would throw an error if you add a binary variable...
> Why don't we just allow adding a bound when one is already set? Because that's now a pretty breaking change across MOI. > As ZeroOne sets bounds, allowing to...
It breaks any code that assumes it can set and get a bound without the user modifying it. We made a pretty conscious decision to prevent multiple bounds, so I'm...
Here's someone trying to add bounds on binary variables: https://discourse.julialang.org/t/xpress-julia-api-has-bug-with-fixing-variables/82895
I think for the short-term, this is the right bug-fix. We can have a longer discussion about whether to allow `add_constraint` to modify existing variable bounds.
The more I think about it, the more I think this PR is the right solution. Double bounds are going to become a problem if when we delete binary constraints....
Bounds aren't composable because they're treated specially by solvers. No solvers have support for multiple variable bounds, so adding that to MOI is difficult. The current behavior is a bug....
Just discussed this with @joaquimg and we agree. @blegat, I think you're on the loosing side. Final objections?