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

Support for Generating Flatzinc-JSON Format in MiniZinc Compiler #868

Open
Yuliang795 opened this issue Nov 15, 2024 · 3 comments
Open

Support for Generating Flatzinc-JSON Format in MiniZinc Compiler #868

Yuliang795 opened this issue Nov 15, 2024 · 3 comments
Labels
enhancement resolved Issue is resolved and the feature or fix will be part of next release

Comments

@Yuliang795
Copy link

Hi, According to the documentation, the MiniZinc compiler can flatten a model file into the Flatzinc format using the command minizinc -c model.mzn data.dzn. But it seems there is no direct option to output the Flatzinc-JSON format, except by modifying the inputType in the solver configuration.
Would it be possible to add support for generating the Flatzinc-JSON format as an explicit output option during compilation?

Thank you.

@Dekker1
Copy link
Member

Dekker1 commented Nov 15, 2024

Being able to switch between the traditional and JSON format does seem quite helpful when doing analysis or doing some manual work, so this sounds like a good suggestion to me.

However, the other side of this is that it is important to realize that individual FlatZinc files are solver-dependent and cannot be used between different solvers. In that sense, it is odd to avoid the usage of solver configuration files, and I think that switching should be made dependent on the use of the --compile flag.

@Yuliang795
Copy link
Author

Sounds great. Thank you for considering this.

@Dekker1
Copy link
Member

Dekker1 commented Dec 2, 2024

I forgot to add it in the commit message, but this feature has been added on the develop branch.

Resolved by 550e169

@Dekker1 Dekker1 added the resolved Issue is resolved and the feature or fix will be part of next release label Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement resolved Issue is resolved and the feature or fix will be part of next release
Projects
None yet
Development

No branches or pull requests

2 participants