Overview
The CP Paradigm in One Sentence
Constraint Programming = Model + Search.
You declare variables (the decisions you want to make) and constraints (the rules they must respect). The solver then searches for assignments that satisfy all constraints, pruning large portions of the search space by propagating the constraints at every step.
Constraint Programming focuses on search and propagation for rich logical constraints. In the map of OR, it connects Domains, Propagation, Global constraints to decisions that must be modeled, solved, explained, and revised as evidence changes.
CP models scheduling, timetabling, routing, packing, and feasibility-heavy problems using domains, global constraints, propagation, and search. The practical use case is clearest in Timetabling, Scheduling, Routing, Packing, where the method helps turn constraints and tradeoffs into a decision artifact someone can inspect.
Core ideas
Domains
Domains is a core checkpoint for Constraint Programming: define it concretely, attach units or rules where possible, and test whether stakeholders interpret it the same way.
Propagation
Propagation is a core checkpoint for Constraint Programming: define it concretely, attach units or rules where possible, and test whether stakeholders interpret it the same way.
Global constraints
Global constraints is a core checkpoint for Constraint Programming: define it concretely, attach units or rules where possible, and test whether stakeholders interpret it the same way.
CP-SAT
CP-SAT is a core checkpoint for Constraint Programming: define it concretely, attach units or rules where possible, and test whether stakeholders interpret it the same way.
Search
Search is a core checkpoint for Constraint Programming: define it concretely, attach units or rules where possible, and test whether stakeholders interpret it the same way.
How to use it
- 1Start with Timetabling: write the decision, time horizon, actors, and objective in operational language.
- 2Translate the problem into Domains, Propagation, and Global constraints; define units and data sources for each one.
- 3Build a small instance of Constraint Programming that can be solved or simulated by hand inspection before using full production data.
- 4Compare the recommendation against a baseline policy, not just against mathematical optimality.
- 5Document assumptions, sensitivity results, and the conditions under which the recommendation should be revisited.
Applications
- Timetabling: compare feasible policies, quantify the operating tradeoffs, and make the assumptions behind the recommendation visible.
- Scheduling: compare feasible policies, quantify the operating tradeoffs, and make the assumptions behind the recommendation visible.
- Routing: compare feasible policies, quantify the operating tradeoffs, and make the assumptions behind the recommendation visible.
- Packing: compare feasible policies, quantify the operating tradeoffs, and make the assumptions behind the recommendation visible.
Common pitfalls
- Applying Constraint Programming because the label sounds appropriate while leaving the actual decision boundary vague.
- Treating Domains as a technical detail instead of a modeling choice that affects the recommendation.
- Reporting one answer without showing sensitivity to demand, capacity, costs, or behavioral assumptions.
- Ignoring implementation details such as data quality, explainability, ownership, and how users will override bad recommendations.
Resources
- OR-Tools CP-SAT Solver
Topic-specific source curated for Constraint Programming.
- MiniZinc Handbook
Topic-specific source curated for Constraint Programming.
- MaxiCP
Source of the Constraint Programming paradigm framing used in this guide.
- Google OR-Tools
Practical toolkit for routing, assignment, CP-SAT, scheduling, flows, LP, and MIP.
- SCIP Optimization Suite
Open-source solver suite for MIP, MINLP, and constraint integer programming.