PySCIPOpt
PySCIPOpt copied to clipboard
writeBestSol method not working
from pyscipopt import Model
model = Model("Example")
x = model.addVar("x")
y = model.addVar("y", vtype="INTEGER")
model.setObjective(x + y)
model.addCons(2*x - y >= 0)
model.optimize()
model.writeBestSol(filename="origprob.sol", write_zeros=True)
This leads to the following error.
OSError: [Errno 9] Bad file descriptor
I also noticed that the solution file is created, and has the correct solution, but still the code terminates with this OSerror. (I am using MacOS). Please let me know if any other information is needed. Thanks.
i am assuming this is related to the issues in #542 / #543, @mattmilten any update on this?
I can reproduce this issue and removing fclose fixes it.