SEGFAULT after adding empty rows and defining coefficients later via column parameter of method add_var #184
Labels
bug
Something isn't working
cbc
All items related to cbc
reproducible
If a bug/behaviour could be reproduced
Describe the bug
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
To Reproduce
import mip
m = mip.Model("column_test", sense=mip.MAXIMIZE, solver_name=mip.CBC)
c1 = m.add_constr(mip.LinExpr(const=-10, sense=mip.LESS_OR_EQUAL), name="c1")
c2 = m.add_constr(mip.LinExpr(const=-10, sense=mip.LESS_OR_EQUAL), name="c2")
c3 = m.add_constr(mip.LinExpr(const=-10, sense=mip.LESS_OR_EQUAL), name="c3")
a1 = m.add_var(name="a1", obj=1, column=mip.Column(constrs=[c1, c2], coeffs=[1., 1.]))
a2 = m.add_var(name="a2", obj=1, column=mip.Column(constrs=[c1, c3], coeffs=[1., 1.]))
a3 = m.add_var(name="a3", obj=1, column=mip.Column(constrs=[c2, c3], coeffs=[1., 1.]))
m.write("prob.lp")
Expected behavior
The coefficients are added to the rows when the variables are created and the model is correctly written to file.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: