-
Notifications
You must be signed in to change notification settings - Fork 259
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
writeBestSol do not save on file #936
Comments
Hello @adover134! I cannot reproduce this issue. When did you compile pyscipopt from the repo? Because we fixed Also, why do you put a string as the objective of the problem? It seems a bit strange :) |
@Joao-Dionisio, I did not recognize that you've already solve it. |
Yes, I checked the solution file and it contained the solution. Let me know if with the most recent changes your problem is fixed! |
Sure, but my current problem will take more than two days to solve... I will try as soon as the optimization is done. |
Hi there, I encountered the same issue, where the solution is saved to the redirected stdout file, rather then the solution output file I passed as a parameter.
And the core of function boils down to:
The pyscipopt version I am using is, so it should be the latest version:
|
Here's one of the stdout file that has the best solution attached to its end. I do not think the best solution is part of the normal model output. I hope this helps. |
I tried to dive a bit into the source code and found that
And
I couldn't find where |
Hello, @Jordan-Sun! Can you please check if your problem is reproducible with the current master branch? We fixed this (or at least we think we did) very recently, it's not in the latest PyPi version yet. |
Sorry for late reply, @Joao-Dionisio. I tried with latest scip and pyscipopt, and it was not reproduced. |
The original problem was fixed, so I'm closing the issue. If you can still reproduce your problem with the master branch, feel free to open a new issue @Jordan-Sun! |
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 trywriteBestSol
.Expected behavior
The solution should be wrote on the file with filename.
Screenshots

This is the output from Jupyter with very simple example.
As you can see, it was saved on the output, not on the file which expected.
System
pyscipopt
? Using Git repoThe text was updated successfully, but these errors were encountered: