-
Notifications
You must be signed in to change notification settings - Fork 87
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
Inconsistent "interval" constraints when reading models from file #2547
Comments
This is expected (current) behavior, but I agree it's pretty subtle:
That's a pretty reasonable argument to parse variable bounds as a separate ones for LP, MPS, and NL files, which doesn't distinguish between individual bounds and Interval. |
One further question, and maybe the reason for my initial confusion:
[...] as a `VariableIndex`-in-`MathOptInterface.Interval{Float64}` constraint was already set [...] I resorted to using this try; has_lower_bound(x) || set_lower_bound(x, value); catch; end but that felt hacky. Maybe (but that may be more of a |
It's because JuMP doesn't use or have support for Interval constraints. We assume that if you've added an Interval bound you're doing something special. |
Interval constraints in file readers seem to be handled differently when reading back a model (c.f. #2121, #2351). This happens for
LP
andMPS
files. It "works" withMOF
, and is weird withNL
. I'm not sure right now if making these consistent is even possible with the file formats (it's 05:18am at my place so this might be wrong in many ways...).MWE:
This may, e.g., lead to
Additional information:
A model looking like:
leads to:
LP
:0 <= x <= 1
in the bounds sectionMPS
:LO 0
andUP 1
in the bounds sectionNL
file (as far as I can decipher...)One that is constructed using an explicit interval:
leads to: exactly the same files for
LP
,MPS
, andNL
as with the non-interval modelThe text was updated successfully, but these errors were encountered: