Introduction to Constraint Programming in Python


Constraint Programming is a technique to find every solution that respects a set of predefined constraints.

It is an invaluable tool for data scientists to solve a huge variety of problems, such as scheduling, timetabling, sequencing, etc. In this article, we’ll see how to use CP in two different ways:

  1. Satisfiability: the goal is to find one or multiple feasible solutions (i.e., solutions that respect our constraints) by narrowing down a large set of potential solutions;
  2. Optimization: the goal is to find the best feasible solution according to an objective function, just like Linear Programming (LP).

We’ll use CP-SAT from Google OR-Tools, an excellent free and open source CP solver. Note that it is different

 

 

 

To finish reading, please visit source site