What does ChocoZN do?

ChocoZN is a converter from MiniZinc to FlatZinc that uses the global constraint library of Choco Solver.
This enables you to use the global constraints of Choco Solver to solve your MiniZinc problem.
The extension of the output file is .czn to emphasis that it is specialised for Choco Solver and it won't be recognised by other solvers.

How to use ChocoZN?

Use this online tool to generate a .czn file from your MiniZinc model, i.e. a FlatZinc model optimised for Choco Solver.
Then, parse and solve this file as if it was a classical .fzn file using the following code in your Java project:

Why should I use it?

Standard FlatZinc files do not allow taking the best from Choco Solver.
Without the constraint library of Choco Solver, global constraints are reformulated into heavy decompositions, leading to strong performance loss.
ChocoZN enables you to use the power of global constraints that are probably the main advantage of Choco Solver.

We have evaluated the impact of ChocoZN on mario on data mario_easy_2.fzn. As you can see on the table below,
global constraints make quite a difference!

mario.fzn

mario.czn

Time (s)

29.5

0.3

# Nodes

882,051

1,351

This tool is provided by COSLING as a free service for the Choco Solver community.