Skip to content
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

SEGFAULT after adding empty rows and defining coefficients later via column parameter of method add_var #184

Open
peterlietz opened this issue Mar 11, 2021 · 0 comments
Labels
bug Something isn't working cbc All items related to cbc reproducible If a bug/behaviour could be reproduced

Comments

@peterlietz
Copy link
Contributor

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):

  • Operating System, version: OS X
  • Python version: 3.9.1
  • Python-MIP version (we recommend you to test with the latest version): 1.13.0
@sebheger sebheger added cbc All items related to cbc bug Something isn't working reproducible If a bug/behaviour could be reproduced labels Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cbc All items related to cbc reproducible If a bug/behaviour could be reproduced
Projects
None yet
Development

No branches or pull requests

2 participants