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

Blog post for CP ecosystem #53

Merged
merged 11 commits into from
Sep 19, 2021
55 changes: 55 additions & 0 deletions _posts/2021-09-18-cp-0-6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
layout: post
title: "ConstraintProgrammingExtensions 0.6 is released"
date: 2021-09-18
categories: [releases]
permalink: /blog/cpe-0.6-release/
---

JuMP and MathOptInterface are mostly oriented towards mathematical optimisation.
However, their interface is amenable to other kinds of formalism, including
constraint programming (CP). Bridging the gap between MOI and constraint programming
is the goal of the
[ConstraintProgrammingExtensions.jl](https://github.com/dourouc05/ConstraintProgrammingExtensions.jl)
package.

Discussions for support of constraint programming in the JuMP ecosystem started
[in 2019](https://github.com/jump-dev/JuMP.jl/issues/2014). The original scope
was quite limited, as it only planned to propose some modeling capabilities to
JuMP. However, quite soon, it morphed into a larger proposal of a full
[constraint programming environment](https://github.com/jump-dev/JuMP.jl/issues/2227)
accessible from the same API as JuMP. It also meant giving access to CP solvers.

Mathematical optimisation models are only based on equality and inequality constraints,
typically linear or convex, with an objective function. Constraint programming
allows more variety in the kind of constraints that are supported, with a
focus on discrete structure: the best-known constraint is probably `all_different`,
which models the fact that several integer-valued variables should take different
values (no two variables are allowed to have the same value). Extremely efficient
solvers can be written for this kind of model.

In the last few months, the CP ecosystem in JuMP made tremendous progress.

- The lowest layer,
[ConstraintProgrammingExtensions.jl](https://github.com/dourouc05/ConstraintProgrammingExtensions.jl),
has [dozens of constraint types available](http://tcuvelier.be/ConstraintProgrammingExtensions.jl/dev/reference/sets/)
and [dozens of bridges between constraints](http://tcuvelier.be/ConstraintProgrammingExtensions.jl/dev/reference/bridges_sets/).
It supports the FlatZinc file format, a standard in constraint programming to exchange
models (similar to the LP and MPS formats for linear programming), both to read and
write models, but also to communicate with solvers. It has recently been updated
to be compatible with MOI 0.10.

- Several solvers are accessible using this API: the pure-Julia
[ConstraintSolver.jl](https://github.com/Wikunia/ConstraintSolver.jl/), the industry standard
[IBM CPLEX CP Optimizer](https://github.com/dourouc05/CPLEXCP.jl/), and the open-source
[Chuffed](https://github.com/dourouc05/Chuffed.jl/).

- Other pure-Julia CP solvers have been released, but they do not yet use the same API:
[JuliaConstraints](https://github.com/JuliaConstraints) and
[SeaPerl](https://github.com/corail-research/SeaPearl.jl).

This is not the end of the journey. Although MOI and JuMP are nearing their 1.0
release, the CP ecosystem has still a long way to go. In the near term, more
modelling features should be added as extensions to JuMP and more solvers should
be made accessible. In the longer term, CP modelling will also benefit from
the new generation of nonlinear support.