Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Declarative Modeling with CP-SAT

Declarative Modeling with CP-SAT is a standalone companion manuscript to this primer, available as a typeset PDF.

Declarative Modeling with CP-SAT — title page
Click the cover to read the typeset PDF

The primer is the broader, more extensive resource: it covers CP-SAT in depth, including much of the modeling material and a great deal more. The companion manuscript is deliberately narrower and approaches the material from a different angle: the discipline of modeling itself, the path from an informal problem to a formulation that is correct before it is ever handed to the solver. It overlaps with the primer on purpose, so that it can be read on its own.

It walks through the modeling workflow end to end: mathematical notation as a working tool rather than a gatekeeping ritual; the five-part decomposition of a model into entities, parameters, decision variables, constraints, and an objective; an optional Python verifier that judges the feasibility and quality of candidate solutions independently of any solver; and the translation of a paper model into a working CP-SAT encoding, with a compact reference to CP-SAT’s variable and constraint vocabulary. The focus is on getting a formulation correct; performance engineering is left to the primer.

The source and build instructions live alongside this primer in the manuscripts/ directory.


The CP-SAT Primer is maintained by Dominik Krupke at the Algorithms Division, TU Braunschweig, and is licensed under the CC BY 4.0 license. Contributions are welcome.

If you find the primer helpful, consider leaving a ⭐ on GitHub (750⭐) or sharing your feedback/experience. Your support helps improve and sustain this free resource.