PySCIPOpt icon indicating copy to clipboard operation
PySCIPOpt copied to clipboard

"write" methods don't work after `redirectOutput()`

Open mattmilten opened this issue 6 years ago • 5 comments

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.

mattmilten avatar Feb 17 '19 17:02 mattmilten

interseting my search didn't tell me about this

fserra avatar Jun 02 '20 18:06 fserra

I assume this is still relevant so i will leave this open.

CGraczyk avatar Jun 28 '21 09:06 CGraczyk

Is this still relevant, @mattmilten @fserra?

Joao-Dionisio avatar May 02 '23 09:05 Joao-Dionisio

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 SCIPOptSuite-8.0.4-Linux

camold avatar Sep 06 '23 12:09 camold