Open 8ac3f0f3-bd13-47e7-baee-523ad1646342 opened 9 years ago
well, where do we start?
It looks pretty unclear to me how add_constraint
interacts with a backend. Some (almost all?) backends don't even have add_constraint
implemented...
OK, I suppose I see how to fix this. CVXOPT's LP solver needs equations to be put into a separate data structure,. but this was not done in this code.
What I need to understand is how add_linear_constraint
in a backend is supposed to know that it deals with an equation. By comparing lower_bound
and upper_bound
?
Replying to @dimpase:
OK, I suppose I see how to fix this. CVXOPT's LP solver needs equations to be put into a separate data structure,. but this was not done in this code.
What I need to understand is how
add_linear_constraint
in a backend is supposed to know that it deals with an equation. By comparinglower_bound
andupper_bound
?
this is certainly not an optimal way; in fact add_constraint
in mip.pyx
simply throws away the information on whether we have an equation, or not. In general it is not straightforward to get it back, as some loss of precision can happen.
this now appears as a testcase on #20323.
The
CVXOPT
solver doesn't seem to be able to handle equations with==
properly. For instance, the following example:The final result shouldn't be a feasible solution considering that
x_0 + x_1 == 1
should hold. However substituting the final constraint forworks fine.
CC: @dimpase @nathanncohen @ingolfured
Component: linear programming
Keywords: CVXOPT
Issue created by migration from https://trac.sagemath.org/ticket/18572