Skip to content

writeBestSol do not save on file #936

@adover134

Description

@adover134

Describe the bug
I used this code.
m.writeBestSol(filename="block_e_i_piperack.mps")

I optimized the model after using redirectOutput().

The result was written on redirected page; for me, it was Jupyter Notebook output.
The file was blank.

To Reproduce
Optimize the model with redirectOutput() then try writeBestSol.

Expected behavior
The solution should be wrote on the file with filename.

Screenshots
This is the output from Jupyter with very simple example.
image

As you can see, it was saved on the output, not on the file which expected.

System

  • OS: Ubuntu
  • Version 24 lts
  • SCIP version: 10.0.0
  • How did you install pyscipopt? Using Git repo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions