-
Notifications
You must be signed in to change notification settings - Fork 486
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
Error using uninitialized mutable Param as constraint bound #13
Comments
It looks like we are testing for this case (I commented out the code that checks this and noticed that some unit tests for constraint fail). Perhaps I'll just change things so that the check is only performed if the constraint bound is constant. This would seem like the easiest way to bypass this in the short term. However, it is still debatable whether the the constant, infinite bound case is worthy of an error. |
I also want to document here that this did not fully fix the issue in Python3. There is another spot in _ConstraintData.set_value(...) that compares the upper and lower bound (self._lower != self._upper) resulting in
I'm not sure why this does not happen in Python2. |
…param in a constraint rhs (references #13)
When I do something like the following:
I immediately run into the following error message:
The error message goes away if I initialize the mutable Param to some finite value.
I don't think this kind of logic really belongs here. It would also be very easy to change the mutable Param value to "infinity" later on anyway. This case probably needs to be handled by the solver plugins at run time by either skipping unbounded constraints, throwing an error, or passing the constraint on to the solver as is (which some input formats support).
The text was updated successfully, but these errors were encountered: