-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Motivation
PRODUCTION PLANNING from Garey & Johnson, SS21. A classical NP-complete lot-sizing problem: given a multi-period planning horizon with per-period demands, production capacities, set-up costs, production costs, and inventory holding costs, can all demands be met within a total cost budget? Shown NP-complete by Florian, Lenstra, and Rinnooy Kan (1980) via reduction from PARTITION. The problem is solvable in pseudo-polynomial time but remains NP-complete even with equal demands, equal set-up costs, and zero inventory costs. A foundational hardness result for operations research, supply chain management, and manufacturing planning.
Associated rules:
- [Rule] Partition to Production Planning #488: Partition -> Production Planning (incoming, [Florian, Lenstra, and Rinnooy Kan, 1980])
Definition
Name: ProductionPlanning
Reference: Garey & Johnson, Computers and Intractability, SS21
Mathematical definition:
INSTANCE: Number n ∈ Z+ of periods, for each period i, 1 ≤ i ≤ n, a demand ri ∈ Z0+, a production capacity ci ∈ Z0+, a production set-up cost bi ∈ Z0+, an incremental production cost coefficient pi ∈ Z0+, and an inventory cost coefficient hi ∈ Z0+, and an overall bound B ∈ Z+.
QUESTION: Do there exist production amounts xi ∈ Z0+ and associated inventory levels Ii = ∑_{j=1}^{i}(xj−rj), 1 ≤ i ≤ n, such that all xi ≤ ci, all Ii ≥ 0, and
∑_{i=1}^{n}(pi·xi + hi·Ii) + ∑_{xi>0} bi ≤ B ?
Variables
- Count: n (one integer variable per period, representing production amount)
- Per-variable domain: {0, 1, ..., c_i} — production amount in period i, bounded by capacity
- Meaning: x_i is the production amount in period i. Inventory levels I_i are derived: I_i = sum_{j=1}^{i}(x_j - r_j). The constraints require all I_i >= 0 (no backlogging), all x_i <= c_i (capacity), and total cost (production + inventory + set-up) <= B.
Schema (data type)
Type name: ProductionPlanning
Variants: none (no type parameters; all values are non-negative integers)
| Field | Type | Description |
|---|---|---|
num_periods |
usize |
Number of planning periods n |
demands |
Vec<u64> |
Demand r_i for each period i |
capacities |
Vec<u64> |
Production capacity c_i for each period i |
setup_costs |
Vec<u64> |
Set-up cost b_i for each period i (incurred if x_i > 0) |
production_costs |
Vec<u64> |
Incremental production cost coefficient p_i per unit |
inventory_costs |
Vec<u64> |
Inventory holding cost coefficient h_i per unit per period |
cost_bound |
u64 |
Overall cost bound B |
Complexity
- Best known exact algorithm: The problem is NP-complete in general (Florian, Lenstra, and Rinnooy Kan, 1980), but solvable in pseudo-polynomial time via dynamic programming. When all capacities are equal, the problem can be solved in polynomial time (Florian and Klein, 1971). For the general capacitated lot-sizing problem with piecewise concave costs and a fixed number of breakpoints p, Koca, Yaman, and Akturk (2014) gave an O(n^(2p+3)) algorithm, later improved to O(n^(p+2) log n) by Ou (2017). In the worst case with arbitrary concave costs, no algorithm significantly improves upon pseudo-polynomial dynamic programming in O(n * B) or brute-force O*(product c_i) enumeration.
- Complexity string:
(max_capacity + 1)^num_periods(brute-force enumeration over all production vectors)
Extra Remark
Full book text:
INSTANCE: Number n ∈ Z+ of periods, for each period i, 1 ≤ i ≤ n, a demand ri ∈ Z0+, a production capacity ci ∈ Z0+, a production set-up cost bi ∈ Z0+, an incremental production cost coefficient pi ∈ Z0+, and an inventory cost coefficient hi ∈ Z0+, and an overall bound B ∈ Z+.
QUESTION: Do there exist production amounts xi ∈ Z0+ and associated inventory levels Ii = ∑'_{j=1}(xj−rj), 1 ≤ i ≤ n, such that all xi ≤ ci, all Ii ≥ 0, and
∑_{i=1}^{n}(pi·xi + hi·Ii) + ∑_{xi>0} bi ≤ B ?
Reference: [Florian, Lenstra, and Rinnooy Kan, 1980]. Transformation from PARTITION.
Comment: Solvable in pseudo-polynomial time, but remains NP-complete even if all demands are equal, all set-up costs are equal, and all inventory costs are 0. If all capacities are equal, the problem can be solved in polynomial time [Florian and Klein, 1971]. The cited algorithms can be generalized to allow for arbitrary monotone non-decreasing concave cost functions, if these can be computed in polynomial time.
How to solve
- It can be solved by (existing) bruteforce. (Enumerate all production vectors (x_1,...,x_n) with 0 <= x_i <= c_i; compute inventory levels and total cost; check feasibility.)
- It can be solved by reducing to integer programming. (ILP: integer variables x_i, binary variables y_i (y_i=1 iff x_i>0), constraints I_i >= 0, x_i <= c_i, x_i <= c_i * y_i, and sum(p_ix_i + h_iI_i + b_i*y_i) <= B.)
- Other: Dynamic programming (pseudo-polynomial time) for fixed or bounded capacities.
Example Instance
Input:
n = 6 periods
| Period i | Demand r_i | Capacity c_i | Setup cost b_i | Prod. cost p_i | Inv. cost h_i |
|---|---|---|---|---|---|
| 1 | 5 | 12 | 10 | 1 | 1 |
| 2 | 3 | 12 | 10 | 1 | 1 |
| 3 | 7 | 12 | 10 | 1 | 1 |
| 4 | 2 | 12 | 10 | 1 | 1 |
| 5 | 8 | 12 | 10 | 1 | 1 |
| 6 | 5 | 12 | 10 | 1 | 1 |
Total demand = 5+3+7+2+8+5 = 30
Cost bound B = 80
Feasible production plan:
Produce in 3 batches: x = [8, 0, 10, 0, 12, 0].
Inventory levels (I_i = cumulative production − cumulative demand):
- I_1 = 8 − 5 = 3
- I_2 = 3 + 0 − 3 = 0
- I_3 = 0 + 10 − 7 = 3
- I_4 = 3 + 0 − 2 = 1
- I_5 = 1 + 12 − 8 = 5
- I_6 = 5 + 0 − 5 = 0
All x_i ≤ 12 ✓, all I_i ≥ 0 ✓
Cost breakdown:
- Production cost: ∑ p_i · x_i = 1·(8+10+12) = 30
- Inventory cost: ∑ h_i · I_i = 1·(3+0+3+1+5+0) = 12
- Setup cost: 3 setups × 10 = 30
- Total cost: 30 + 12 + 30 = 72 ≤ 80 ✓
Expected Outcome
Answer: YES — a feasible production plan exists with total cost 72 ≤ B = 80.
Brute-force validation (4,826,809 configurations): 52 feasible plans with 8 distinct cost values (72–80). The plan x = [8, 0, 10, 0, 12, 0] achieves the minimum cost of 72 among all feasible plans.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status