Reading a CP-SAT Solver Log
Learn to interpret the four sections of a CP-SAT solver log: the model summary, the presolve report, the search-progress stream, and the final response. Read incumbent and bound values, compute the relative optimality gap, and tell OPTIMAL apart from FEASIBLE.
Tutorial
Anatomy of a CP-SAT Log
When CP-SAT solves a model, it prints a structured log with four sections: a model summary, a presolve report, a stream of search-progress lines, and a final response. Reading each section tells us how the solver transformed the problem and how close to optimal the returned solution is.
The model summary enumerates variables and constraints. A typical block reads:
- counts decision variables. are variables; are integer variables with a finite domain.
- Lines beginning with count constraints by kind. is a linear constraint with two terms, is an all-different constraint, is an interval variable used in scheduling.
The presolve report follows, listing the simplified model:
The number of variables (or constraints of each kind) eliminated by presolve is the initial count minus the presolved count. Here, presolve removed variables and linear-2 constraints. Smaller presolved models generally search faster.