-
Notifications
You must be signed in to change notification settings - Fork 255
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
"write" methods don't work after redirectOutput()
#243
Comments
interseting my search didn't tell me about this |
I assume this is still relevant so i will leave this open. |
Is this still relevant, @mattmilten @fserra? |
Still not solved. Here is a minimal example: import pyscipopt
m = pyscipopt.Model("test")
m.redirectOutput()
m.optimize()
# writes out the usual log files
m.writeProblem("test.mps")
# writes the model description (in mps format) to the python console but not to file
# test.mps is created but is empty PySCIPOpt 4.3.0 |
A possible related issue happens when calling import pyscipopt
m = pyscipopt.Model("test2")
x = m.addVar("x", vtype="B")
m.addCons(x >= 1, name="C1")
m.setLogfile('file.log')
m.optimize()
m.writeProblem("test.lp")
# file.log is created with the output from the solver, but it also contains the problem description in the lp format
# test.lp is correctly created with the problem description in the lp format |
I guess |
After calling
redirectOutput()
, e.g.writeProblem()
does not produce a file but prints the problem description to the outstream.Apparently, we redirect everything to the new messagehandler.
The text was updated successfully, but these errors were encountered: