MiniZinc

MiniZinc

Constraint programming with MiniZinc

MiniZinc#

This collection focuses on constraint programming using the MiniZinc modeling language. MiniZinc is a high-level modeling language for constraint satisfaction and optimization problems that is solver-agnostic and designed for expressing models clearly and naturally.

About MiniZinc#

MiniZinc is a constraint modeling language that allows you to express combinatorial optimization problems in a high-level, readable format. It’s designed to be solver-agnostic, meaning you can use the same model with different types of solvers including:

  • Constraint programming solvers (Gecode, Chuffed)
  • SAT solvers
  • Mixed Integer Programming solvers (HiGHS, CBC)
  • Lazy Clause Generation solvers (OR-Tools CP-SAT)

Content in This Collection#

The posts in this collection cover:

  • Tutorials and introductions to MiniZinc
  • Case studies and problem-solving examples
  • Benchmarking and performance analysis
  • Advanced modeling techniques
  • Solver comparisons and recommendations

Each post provides practical examples, code snippets, and insights into effective constraint programming practices using MiniZinc.

Posts in this collection (1)

Solving LinkedIn Queens using MiniZinc

14 min read
Constraint programming MiniZinc models games

Hillel Wayne wrote about solving the LinkedIn Queens problem with SMT in his Computer Things newsletter. This was in turn inspired by Ryan Berger's post Using SAT to Get the World Record on LinkedIn's Queens that solves the same problem using a SAT solver.

Not to be outdone, this post describes how to use MiniZinc to solve the problem in what I think is a more readable and natural expression of the model than either SAT or SMT. As always, YMMV and what is natural and clear to one person is opaque and weird to someone else.