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

Print output item of final solution #30

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

elKei24
Copy link
Contributor

@elKei24 elKei24 commented Jul 27, 2021

I have models with very many decision variables and use output items to bring the solution MiniZinc finds in a human-readable format. MiniBrass so far only outputs the raw DZN solution. In order to access the more beautiful output, I so far enable the --debug flag to keep the intermediate files, and manually run MiniZinc one more time on the last solvable model. This however is uncomfortable and there is no guarantee that the solution MiniBrass found is the same one as MiniZinc finds when run manually again.

MiniZinc has a --output-output-item flag that adds a _output = "…"; line to the DZN solution. This PR uses that flag, adds support for parsing String literals and identifiers starting with an underscore, handles escape sequences like \n, \t or \\ in the output item and finally prints the solution.

This includes #23.

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.

1 participant