id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
19523 Raise an error when constraints are added to the wrong MILP jdemeyer "{{{
sage: p = MixedIntegerLinearProgram(solver=""glpk"")
sage: q = MixedIntegerLinearProgram(solver=""glpk"")
sage: q.add_constraint(p[0] <= 1)
---------------------------------------------------------------------------
GLPKError Traceback (most recent call last)
...
GLPKError: glp_set_mat_row: i = 1; len = 1; invalid row length
Error detected in file glpapi01.c at line 760
}}}
Before #19525, this would instead crash Sage. A crash still happens with COIN (#20360).
This ticket is to actually fix the error completely or give a better error message.
And low-level error message with the PPL and InteractiveLP (#20296 ) backends.
The CVX backend silently adds a new variable that is accessible only to the backend:.
{{{
sage: sage: default_mip_solver(""cvxopt"")
sage: sage: p = MixedIntegerLinearProgram()
sage: sage: q = MixedIntegerLinearProgram()
sage: sage: q.add_constraint(p[0] <= 1)
sage: q.number_of_variables()
1
}}}" defect new major sage-7.3 linear programming N/A