'How is pywraplp SAT different from CP-SAT?

In ortools if you have only 0-1 variables you can either use CP-SAT from

from ortools.sat.python import cp_model

or you can use

from ortools.linear_solver import pywraplp
solver = pywraplp.Solver.CreateSolver('SAT')

Are these solvers the same and if not, what is the difference?



Solution 1:[1]

Pywraplp supports linear equations/inequations with floating point coefficients.

CP-SAT is integral only, but support much more constraints (quadratic scheduling, routing...) in addition to linear constraints.

pywraplp with the SAT backend scales all coefficients to achieve linear constraints that only have integral coefficients, then calls the CP-SAT solver.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1