π§© Constraint Solving POTD:Product Configuration β Constraint Solving POTD 2026-03-17 #21405
Closed
Replies: 1 comment
-
|
This discussion has been marked as outdated by Constraint Solving β Problem of the Day. A newer discussion is available at Discussion #21603. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Category: Configuration | Difficulty: Intermediate
Product configuration is one of the oldest and most commercially successful applications of constraint solving. Every time you build a custom PC on a retailer's website, spec out a car at a dealership, or configure a software subscription, there's a constraint engine working quietly in the background to ensure what you select is valid and complete.
Problem Statement
A product configuration problem asks: given a set of components with attributes and a set of compatibility/requirement rules, find a complete, valid configuration satisfying all customer requirements.
Concrete Instance β Configure a Laptop
Suppose we have these components and options:
i5,i7,i98GB,16GB,32GBSSD-256,SSD-512,SSD-1TBintegrated,dedicatedstandard,extendedWith rules:
CPU = i9βRAM β₯ 16GB(high-end CPU needs adequate memory)GPU = dedicatedβRAM β₯ 16GB(discrete GPU needs memory)GPU = dedicatedβBattery = standard(power constraint)CPU = i5βGPU β dedicated(low-tier CPU, no discrete GPU)Storage = SSD-1TBβCPU β i5(high-capacity only on mid/high tier)Input: A (possibly partial) customer selection, e.g.,
{CPU=i7, GPU=dedicated}.Output: A complete valid assignment for all components, or a proof that no completion exists.
Why It Matters
Modeling Approaches
Approach 1 β Constraint Programming (CP)
Decision variables: One finite-domain variable per component.
Trade-offs: SAT solvers can handle millions of variables; compilation to CNF enables caching compiled knowledge (prime implicants, BDDs). Knowledge compilation is ideal for interactive configurators querying consistency thousands of times per second.
Approach 3 β Multi-Valued Decision Diagrams (MDDs)
Rules are compiled into a layered MDD where each layer corresponds to one component and edges represent values. A path from root to sink is a valid configuration.
Trade-offs: Enables
O(1)consistency checking after compilation; perfect for read-heavy, write-rarely scenarios. Compilation is expensive but pays off with many repeated queries.Example Model (MiniZinc)
Key Techniques
1. Arc Consistency (AC-3) for Interactive Configuration
In an interactive configurator, after each user selection, the solver propagates that choice to eliminate inconsistent values from all remaining components. Arc consistency ensures every remaining value in every domain has at least one supporting assignment β so anything still shown to the user is guaranteed completable. This is sometimes called "intelligent backtracking" in configurator literature.
2. Knowledge Compilation
For large product catalogs, re-running a CSP solver on every user click is too slow. Instead, the constraint model is compiled offline into a canonical form (BDD, d-DNNF, prime implicants) that supports:
This pre-computation trades space for blazing-fast query response.
3. Symmetry Breaking & Dominance
Many configuration problems have default hierarchies β e.g., higher-tier options subsume lower ones. Adding dominance constraints (prefer the cheapest valid option unless the user specifies otherwise) both prunes the search space and returns user-friendly defaults.
Challenge Corner
Bonus: Can you identify all "dead" component values β options that can never appear in any valid configuration? What technique finds them efficiently?
References
Beta Was this translation helpful? Give feedback.
All reactions