scipopt / PySCIPOpt

Python interface for the SCIP Optimization Suite
https://pyscipopt.readthedocs.io/en/latest/
MIT License
810 stars 252 forks source link

Stuck at ELEAVE56 ERROR! Tried to put a fixed column variable into the basis. #691

Closed cjrodriguez98 closed 1 year ago

cjrodriguez98 commented 1 year ago

I do not understand this error and I feel like the solver is stucked when this errors appear

Joao-Dionisio commented 1 year ago

Good morning, @cjrodriguez98! Can you please share a MRE for the error you're experiencing?

But from the title, if you are doing some sort of column generation, make sure you add modifiable=True to the constraints you're trying to modify.

cjrodriguez98 commented 1 year ago

Good mornig Joao, nice hearing from you again!

I do not know how minimal mi example can be, I am developing a python package to calculate genetic minimal cut sets, so the formulation is general and I have developed the interfaces of varios solvers to interpret the formulation. PySCIPOpt has been a life saver because of its indicator capabilities.

modifiable true when I am adding the constraints?

Joao-Dionisio commented 1 year ago

I am unfamiliar with what you are working on, but are you trying to add cuts to the problem? If so, can you please share the code where you are doing it? If not, I think you must still be changing the model somehow, so can you share where you are doing it?

modifiable true when I am adding the constraints?

I am working with column generation, and if I don't do model.addCons(MY CONSTRAINT, modifiable=True), I get the error ERROR: cannot add a coefficient to the locked unmodifiable row <c2>. So it's most likely not the same thing, but maybe it's its dual.

cjrodriguez98 commented 1 year ago

Thanks man! I was not sure what you where telling me because I had already debugged that part and the errors did not ocurred. But adding model.addCons(MY CONSTRAINT, modifiable=True) solved it!

And it also does not stuck!

You can close this issue

Joao-Dionisio commented 1 year ago

No worries, Carlos, I am very happy to help! :D