---
title: Bin Packing Problem with Setups (BPPS)
url: https://www.emergentmind.com/topics/bin-packing-problem-with-setups-bpps
type: topic
---

# Bin Packing Problem with Setups (BPPS)

The Bin Packing Problem with Setups (BPPS) is a generalization of the classical Bin Packing Problem (BPP) that captures a diverse set of practical scenarios in production planning, logistics, and other domains where setup operations with associated capacity and cost penalties must be incurred whenever items of new types or classes are consolidated in a bin. The problem introduces setup weights and setup costs in addition to classical item weights and bin capacity constraints, resulting in a substantially richer combinatorial and polyhedral structure. BPPS is NP-hard and has motivated new integer programming formulations, polyhedral analyses, approximation algorithms, and computational studies [2509.10075] [2512.24785] [2509.01218].

## 1. Formal Definition and Problem Structure

Given a set of $n$ items $I = \{1,2,\ldots,n\}$, each item $i$ has weight $w_i \in \mathbb{Z}_{>0}$. Items are partitioned into $m$ classes $C = \{1,2,\ldots,m\}$ with $P = \{I_1, I_2, \ldots, I_m\}$, where $I_c \subseteq I$ is the set of items in class $c$. For each class $c$, there is a setup weight $s_c \in \mathbb{Z}_{\ge0}$ and a setup cost $f_c \in \mathbb{Z}_{\ge0}$, incurred once per bin if any item of class $c$ is assigned to that bin. Bins are unlimited, identical, and have capacity $d \in \mathbb{Z}_{>0}$. Each bin also incurs a fixed cost $r \in \mathbb{Z}_{>0}$ if used.

The objective is to assign all items to bins such that, for each bin $b$, the total used capacity satisfies
$$
\sum_{i\in b} w_i + \sum_{c\in A(b)} s_c \leq d,
$$
where $A(b)$ is the set of classes with at least one item in $b$; and to minimize total cost:
$$
\sum_{b \in B} \left( r + \sum_{c \in A(b)} f_c \right),
$$
where $B$ is the set of used bins. The model ensures each item is packed exactly once and bin capacity is not exceeded, with the combinatorial complication that setup weights and costs are class-dependent per bin.

Applications include production planning with family-specific setup times and costs, vehicle loading where handling equipment is class-specific, and temperature-controlled distribution with compartmental setup penalties [2509.10075].

## 2. Integer Programming Formulations and Polyhedral Strengthening

A natural integer linear programming (ILP) model uses, for an a priori upper bound $k$ on the number of bins, the decision variables:
- $x_{i,b} \in \{0,1\}$: item $i$ assigned to bin $b$,
- $y_{c,b} \in \{0,1\}$: class $c$ is active in bin $b$ (some $i \in I_c$ assigned to $b$),
- $z_b \in \{0,1\}$: bin $b$ is used.

The objective is
$$
\min \sum_{b=1}^k \left( r z_b + \sum_{c=1}^m f_c y_{c,b} \right)
$$
subject to:
- $\sum_{b=1}^k x_{i,b} = 1$ for all $i$ (item assignment),
- $\sum_{i=1}^n w_i x_{i,b} + \sum_{c=1}^m s_c y_{c,b} \leq d z_b$ for all $b$ (capacity),
- $x_{i,b} \leq y_{c,b}$ for all $i \in I_c$, $c$, $b$ (logical linking).

Relaxing integrality yields an LP whose lower bound (denoted $\zeta_0$) is arbitrarily weak as $n \to \infty$ for certain pathological instances, with $\zeta_0 / \mathrm{OPT} \to 0$ [2509.10075].

To address this, Minimum Classes Inequalities (MCIs) and Minimum Bins Inequality (MBI) are introduced:
- For each class $c$, $L_c = \left\lceil \frac{\sum_{i \in I_c} w_i}{d - s_c} \right\rceil$ is a lower bound on bins required for class $c$, leading to MCI:
  $$
  \sum_{b=1}^k y_{c,b} \geq L_c.
  $$
- $K = \left\lceil \frac{\sum_i w_i + \sum_c L_c s_c}{d} \right\rceil$ yields the MBI:
  $$
  \sum_{b=1}^k z_b \geq K.
  $$
The addition of these constraints tightens the LP relaxation to guarantee $\zeta_1/\mathrm{OPT} > 1/2$ in the worst case (matching classical BPP), and the LP with both MCIs and MBI further strengthens the bound [2509.10075].

An upper bound on the number of bins in an optimal solution is given by summing class-wise upper bounds computed by heuristics for packing $I_c$ into bins of effective capacity $d-s_c$, resulting in reduced ILP problem size and improved scalability.

## 3. Approximation Algorithms and Hardness Considerations

Straightforward adaptations of classical bin packing approximation algorithms (such as Next Fit, First Fit, and Best Fit, even with Decreasing order) fail on BPPS, exhibiting arbitrarily poor worst-case behavior due to fragmentation introduced by setup weights [2512.24785]. 

A two-phase heuristic TP$(\mathcal{A})$ is established, using a black-box $\alpha$-approximation for BPP:
- **Phase 1:** For each class $c$, independently pack $I_c$ into bins of capacity $d-s_c$ using $\mathcal{A}$; each resulting group of bins is added to the partial solution.
- **Phase 2:** Greedily merge any two bins if their union (including setup weights) does not exceed $d$; repeat until no merges are possible.

This method is a $2\alpha$-approximation: even with $\mathcal{A}$ optimal ($\alpha = 1$), the approach achieves a factor-2 guarantee. Plugging in FFD or BFD ($\alpha = 3/2$) achieves a factor-3 approximation for BPPS. It is unknown if sub-2-approximation is possible with general merge-based schemes [2512.24785].

## 4. Extensions: Multi-dimensional and Multi-criteria Variants

A two-dimensional BPPS (2D-BPPS), relevant in PCB manufacturing, involves packing rectangular items with minimum spacing into bins of fixed width and height, while minimizing both the number of bins and the number of distinct bin layouts (representing setup types). The mathematical programming formulation becomes a bi-criteria mixed-integer program (MIP) over patterns $\ell$, with key variables:
- $x_\ell \in \mathbb{N}_0$: number of bins using layout $\ell$,
- $y_\ell \in \{0,1\}$: binary indicator for whether layout $\ell$ (setup) is used.

Objective:
$$
\min_{x,y}\; c_1 \sum_{\ell} y_\ell + c_2 \sum_\ell x_\ell
$$
subject to demand coverage and linking constraints.

A branch-and-price algorithm, leveraging column generation and adapted Ryan–Foster branching, efficiently manages the vast pattern space. This framework directly controls the trade-off between bin and setup counts by varying $c_1/c_2$, and shows practical scalability for medium-sized instances [2509.01218]. Setups are indirectly managed in the pricing subproblem and node selection, as the setup-count objective only re-enters at the master problem level.

## 5. Computational Insights and Practical Performance

A comprehensive benchmark of 480 BPPS instances with varied $n$, $m$, bin capacities, item and setup weight ranges, and cost structures demonstrates the dramatic impact of model strengthening [2509.10075]:

| ILP Variant                     | Solved Instances | Avg. Gap (Unsolved) |
|----------------------------------|------------------|---------------------|
| Base Model $\mathcal{N}$         | 162              | 14.4%               |
| $\mathcal{N}$ + MCIs             | 220              | 6.7%                |
| $\mathcal{N}$ + MCIs + MBI       | 253              | 6.0%                |
| $\mathcal{N}$ + MCIs + MBI + UB  | 268              | 5.7%                |

The MCIs more than double the solve rate, with further gains from the MBI and instance-specific bin count upper bound; the average gap drops from 14.4% to 5.7%. The effect is even more pronounced on large $n$; for $n=200$, only the full-strength model solves any instances within time limits.

In two-dimensional settings, branch-and-price with heuristic node selection (minimizing pattern count) reduces setup diversity by factors of $4$--$6$ relative to depth-first, at an increased node expansion cost. For $n \approx 5$ and moderate demands, the MIP gap reaches $0\%$ within $30$ minutes, typically using $3$--$8$ layouts and $20$--$60$ bins. Larger instances with $n \geq 10$ can retain $1\%$--$7\%$ final gaps after two hours [2509.01218].

## 6. Connections, Applications, and Future Directions

BPPS subsumes classical BPP and models several practical applications:
- Production lines with family-dependent changeover times and costs,
- Vehicle loading with commodity-specific handling equipment,
- Distribution logistics with compartmentalized storage.

The key research advances include polyhedral characterizations (MCIs/MBI), provably effective ILP formulations, and the first constant-factor approximation algorithms for BPPS [2509.10075] [2512.24785]. For two-dimensional multi-criteria objectives, dedicated branch-and-price implementations provide explicit trade-off control and operational scalability [2509.01218].

Open directions include improved approximation factors for BPPS (current best is $2\alpha$ for merge-based algorithms), deeper polyhedral analyses for higher dimensions or complex objective structures, and further computational enhancement for large-scale industrial applications.

---

**References**

- "The Bin Packing Problem with Setups: Formulation, Structural Properties and Computational Insights" [2509.10075]
- "A first approximation algorithm for the Bin Packing Problem with Setups" [2512.24785]
- "Column-generation for a two-dimensional multi-criteria bin-packing problem" [2509.01218]

Source: https://www.emergentmind.com/topics/bin-packing-problem-with-setups-bpps