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
Allowing non-negative integer variables #1446
Comments
The reason we forbid this is because we project the optimal value of variables returned by the solver onto the constraints encoded in the variable attributes, and in the fully general case of arbitrary attributes this becomes another convex optimization problem (e.g., PSD + nonneg). Whereas if we restrict things to a single attribute then we have closed form solutions. This particular combination of attributes is of course simple and could in theory be supported. But I'm not super comfortable permitting multiple attributes in some cases but not others. |
Alright. Fair enough. |
@Midnighter if you need |
Is your feature request related to a problem? Please describe.
I don't understand why it should not be possible to create non-negative integer variables. At the moment, this is forbidden due to the following exception being raised:
Describe the solution you'd like
I don't see why this should pose a problem and it would just require some special casing for the logic that raises the
ValueError
.Describe alternatives you've considered
I know that I can add a constraint
counts >= 0
butcounts.sign
is'UNKNOWN'
when it should really be'NONNEGATIVE'
.The text was updated successfully, but these errors were encountered: