Skip to content
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

Allow writeProblem to write to stdout #926

Merged
merged 7 commits into from
Dec 2, 2024
Merged

Conversation

Joao-Dionisio
Copy link
Collaborator

@Joao-Dionisio Joao-Dionisio commented Nov 27, 2024

If writeProblem is called with filename=None, the model is printed to the standard output.

Also added verbosity option (default True), because it can be annoying to many messages when you copy many models.

EDIT: I'm defaulting it to .cip. We can add an option for the extension, though, but we'd need to change writeProblem as well.

EDIT2: Something going on with the MacOS integration tests.

@Joao-Dionisio Joao-Dionisio marked this pull request as draft November 27, 2024 13:40
@Joao-Dionisio Joao-Dionisio marked this pull request as ready for review November 27, 2024 14:09
@DominikKamp
Copy link
Contributor

DominikKamp commented Dec 2, 2024

Could this be renamed to printProblem() to make it consistent with printSol() (there are no methods starting with display yet)?

@Joao-Dionisio
Copy link
Collaborator Author

Could this be renamed to printProblem() to make it consistent with printSol() (there are no methods starting with display yet)?

It can yeah, the idea was that in the SCIP terminal one would use display problem for the same thing. I have no strong opinion either way, do you have a preference @DominikKamp ?

@DominikKamp
Copy link
Contributor

I just mean that to achieve the same as display solution we have to call printBestSol() in the presence of writeBestSol(), so it would feel more natural if we can display problem by printProblem() in the presence of writeProblem(), unless you plan to rename all print methods.

@Opt-Mucca
Copy link
Collaborator

Happy with the change!

@Opt-Mucca Opt-Mucca merged commit d3e8ed0 into master Dec 2, 2024
11 of 16 checks passed
@Joao-Dionisio Joao-Dionisio deleted the add-printOrigProblem branch December 2, 2024 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants