News for hackers. Stuff that matters.
Re:MiniZinc by sinuhe69 on Saturday July 22, 2023 @03:54AM (#36824310)
How is MiniZinc in this aspect compared to Picat or other constraints solving languages?

I find the outputs command of MiniZinc particularly counter-intuitive and hard to use.

Re:MiniZinc by hakank on Saturday July 22, 2023 @04:35AM (#36824520)
I really like MiniZinc, especially that one can test a lot of different type of solvers for a problem.

But one of its drawbacks is its limitation of handling input and output (including preprocessing and postprocessing). In some cases - for example when the output is rather simple - I use for example Picat/Python to transform input to MiniZinc format (.dzn format or JSON) and then run MiniZinc.

But for more fancy output I tend to use Picat or Python + (OR-tools CP/SAT or CPMpy or minizinc-python).

That being said, one can do fancier output in MiniZinc, though it requires some work. Here is a model for certain scheduling problems which exemplifies this: http://hakank.org/minizinc/scheduling_with_assignments.mzn . But the output was a little easier to do in Picat: http://hakank.org/picat/scheduling_with_assignments.pi