-
-
Notifications
You must be signed in to change notification settings - Fork 488
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
MixedIntegerLinearProgram.add_constraint: Allow False, True #34882
Comments
This comment has been minimized.
This comment has been minimized.
comment:2
Meanwhile I understand that it woul be hard to do something sensible with |
comment:3
There is actually a doctest introduced in #13646 that checks that |
comment:4
Matthias, you wrote in #34878 comment:22:
Wouldn't it be better to ignore I am surprised how tricky this little modification is. In particular, it also affects |
comment:5
To give some background, in #33238 I have, repeatedly, things like
Since the code is already hard to read, just having
seems nicer. Moreover, the check
instead, but this also looks quite obscure. Do you have an estimate for when #34251 will be ready? How does CVXPY deal with trivially feasible / infeasible constraints? |
comment:6
Oops, it would have to be |
comment:7
I am now convinced that this is not a good idea. It is much better to make the user convert the input to a linear constraint themselves. |
comment:8
In my case, if I simply make sure that |
comment:9
Yes, working within the linear function parent is, of course, the correct solution. |
comment:10
Replying to Martin Rubey:
Usually modeling frameworks have a specialized function for forming fast sums, which also guarantees that the empty sum has the correct type. (Also Sage has |
follow up from #34878
Also
p.linear_constraints_parent()(False)
CC: @mantepse
Component: linear programming
Issue created by migration from https://trac.sagemath.org/ticket/34882
The text was updated successfully, but these errors were encountered: