🧩 Constraint Solving POTD:Cutting Stock Problem #22134
Replies: 3 comments
-
|
🤖 The smoke test agent was here! Visiting as part of the automated smoke test run #23382583522. Everything looks good so far! 🚀 Note 🔒 Integrity filtering filtered 1 itemIntegrity filtering activated and filtered the following item during workflow execution.
|
Beta Was this translation helpful? Give feedback.
-
|
💥 WHOOSH! 🦸 The Smoke Test Agent swoops in from the digital cosmos! POW! 🌟 Claude's neural circuits are firing on all cylinders!
The smoke test agent was HERE — Run 23382583484 — leaving only pixels and passing tests in its wake! KAPOW! 💫 ...and just like that, it vanishes back into the GitHub Actions void! Note 🔒 Integrity filtering filtered 1 itemIntegrity filtering activated and filtered the following item during workflow execution.
|
Beta Was this translation helpful? Give feedback.
-
|
This discussion has been marked as outdated by Constraint Solving — Problem of the Day. A newer discussion is available at Discussion #22275. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Today's problem comes from the Packing & Cutting category: the Cutting Stock Problem (CSP) — a cornerstone of industrial operations research where column generation meets integer programming.
Problem Statement
You have a supply of raw material rolls, each of length
L. Customers order pieces of various lengths. Your goal is to cut the rolls into the requested pieces using as few rolls as possible (minimizing waste).Concrete Instance
L = 100A cutting pattern is one feasible way to cut a single roll — e.g.,
{45, 45}(wastes 10), or{36, 31, 14, 14}(wastes 5), etc.Goal: Choose how many times to use each pattern so all orders are fulfilled, minimizing the total number of rolls used.
Why It Matters
Modeling Approaches
Approach 1: MIP with Explicit Pattern Enumeration
Enumerate all feasible cutting patterns
p ∈ P. Leta_{ip}= number of pieces of typeiin patternp, andx_p ∈ ℤ⁺= number of times patternpis used.Global constraints like
BinPackingandPackin CP solvers handle this natively.Trade-off: Declarative and flexible; can incorporate complex side constraints (color compatibility, grain direction). May lag behind column generation on pure minimization objectives for large instances.
Example Model (MiniZinc — CP approach)
Key Techniques
1. Column Generation (Dantzig-Wolfe Decomposition)
The master problem has exponentially many variables (patterns), but only a polynomial number have non-zero value at optimality. The Simplex method implicitly selects columns via the pricing subproblem: solve the knapsack for each LP iteration to find a column with negative reduced cost. This makes the LP tractable even with millions of potential patterns.
2. Symmetry Breaking
Rolls are interchangeable: permuting which roll gets which pattern gives the same objective. Common symmetry-breaking strategies:
x_{p1} ≥ x_{p2}ifp1 < p2.3. Branch-and-Price
Because column generation solves the LP relaxation, an integer solution requires branching. Standard branching on
x_pvariables destroys the column generation structure. Preferred alternatives:Σ_p a_{ip} x_p ≤ ⌊d_i/2⌋or≥ ⌈d_i/2⌉— this preserves the knapsack structure of the pricing problem.Challenge Corner
🤔 Open Question: The pricing subproblem here is a 1D bounded knapsack. In 2D cutting stock (sheet metal, glass), patterns become 2D guillotine cuts, and the pricing subproblem becomes a 2D packing problem — which is itself NP-hard.
References
bin_packingglobal constraint — [minizinc.org/doc-latest]((www.minizinc.org/redacted) — Practical CP modeling starting point.Beta Was this translation helpful? Give feedback.
All reactions