1. Introduction
In metaheuristic benchmarking, the choice of placement decoder—the deterministic rule that translates a candidate solution into a concrete packing—has received far less scrutiny than the choice of search algorithm. This paper presents evidence that this asymmetry is consequential: under the DBLF decoder, the choice of metaheuristic has limited impact on packing quality for the problem class studied.
The three-dimensional bin packing problem (3D-BPP) is a canonical NP-hard combinatorial optimization problem central to logistics, warehousing, manufacturing, and transportation [
1,
2]. The single-bin variant (3D-SBPP) asks for the maximum-volume subset of rectangular items that can be orthogonally packed into a single container. The problem is both theoretically challenging and practically consequential [
3]. Population-based metaheuristics—genetic algorithms (GA), particle swarm optimization (PSO), ant colony optimization (ACO), and differential evolution (DE)—have been widely applied to the 3D-BPP under the permutation-plus-decoder paradigm [
4].
Two observations emerge from this literature. First, the literature has focused predominantly on geometric and stability constraints [
5], whereas categorical incompatibility constraints—pairwise rules that prohibit certain categories of items from co-occurring in the same container—have received minimal attention. Second, such constraints arise naturally in hazardous materials logistics, where the UN Model Regulations [
6] define compatibility matrices. The joint problem of 3D geometric packing with categorical incompatibility constraints, which we term the 3D-SBPP-CC, has therefore remained largely unstudied: the one-dimensional bin packing problem with conflicts (BPPC) [
7,
8] provides the closest analogue, but the entire BPPC literature operates under a one-dimensional capacity model without three-dimensional geometry, and the single study that addresses both 3D geometry and compatibility [
9] tested only one hybrid algorithm.
Collectively, the literature exposes a three-part gap. First, with respect to
RQ1 (do metaheuristics differ under matched conditions?), the BPPC literature offers guidance for the one-dimensional case—Gendreau et al. [
7] and Muritiba et al. [
8] compared heuristics and exact methods—yet no study has conducted a controlled multi-algorithm comparison in the 3D setting. The 3D-BPP literature has compared algorithms (e.g., [
4]) but without compatibility constraints, and the single study that addresses both 3D geometry and compatibility [
9] tested only one hybrid algorithm. Whether structurally distinct metaheuristics produce meaningfully different results on the same instance therefore remains an open question. Second, with respect to
RQ2 (does constraint density moderate algorithm ranking?), the BPPC literature has treated conflict-graph density primarily as a complexity parameter for exact algorithms [
7,
8]; its role as a moderator of relative algorithm performance has not been investigated. Third, with respect to
RQ3 (do constraint-handling strategies differ?), the broader constraint-handling literature [
10] advocates problem-tailored strategies, but no empirical comparison of penalty versus repair approaches exists for 3D packing with categorical constraints.
The present study targets these three gaps directly. By testing 11 configurations under matched conditions, systematically varying constraint density, and comparing two constraint-handling strategies, we provide the first controlled evidence on all three questions for the 3D-SBPP-CC.
Three research questions motivate this study. RQ1: When four structurally distinct population-based metaheuristics (GA, PSO, ACO, DE) are applied to the 3D-SBPP-CC under matched experimental conditions—an identical decoder and computational budget—do meaningful performance differences emerge, or does the shared decoder dominate? RQ2: Does constraint density, as measured by the proportion of incompatible category pairs (), moderate the relative ranking of algorithms? RQ3: Do alternative constraint-handling strategies—penalty functions versus repair operators—produce differential outcomes under varying constraint conditions?
To answer these questions, we conduct a systematic benchmark following best practices from the metaheuristics literature [
11]: equal evaluation budget, full factorial instance stratification, a non-parametric statistical pipeline with effect size reporting, and public release of all instances and code.
The main contributions of this paper are:
Complete MILP formulation. A complete mixed-integer linear programming formulation of the 3D-SBPP-CC, with all four constraint families stated as explicit equations, together with a strong NP-hardness proof (
Section 3).
Systematic multi-algorithm benchmark. A benchmark of eleven algorithm configurations, comprising four metaheuristics combined with two constraint-handling strategies plus three baselines, all evaluated under matched conditions and an equal computational budget (
Section 4).
Public benchmark instances. A public benchmark suite of 225 stratified instances with controlled constraint density, released together with the source code and complete experimental results (
Section 5).
Empirical findings. Empirical evidence that the DBLF decoder, not the metaheuristic choice, governs packing quality; that constraint density is the primary performance moderator, with Kendall’s
W declining from 0.69 to 0.08; and that decoder-embedded filtering renders explicit constraint-handling strategies redundant (
Section 5.4).
2. Related Work
This section reviews the three bodies of work most closely related to our study: metaheuristic approaches to the 3D-BPP, maritime logistics with compatibility constraints, and the one-dimensional bin packing problem with conflicts.
Surveys by Ali et al. [
12], Dahmani et al. [
13], and Zhang et al. [
14] document the breadth of metaheuristic applications to the 3D-BPP, yet all note that constraint-aware algorithm comparison remains underdeveloped. Studies addressing recent variants include multi-bin packing via dynamic feedback with spatial corner fitness [
15], multi-container 3D-BPP with industrial constraints via multi-heuristic methods [
16], and online packing under static stability constraints [
17].
Categorical incompatibility constraints arise in hazardous materials logistics, where the UN Model Regulations [
6] define compatibility matrices. Practical work on containerized dangerous goods includes stowage planning for containerships [
18,
19], mathematical models for hazardous cargo arrangement [
20], and step-wise planning for roll-on/roll-off vessels [
21]. These studies, however, address specific maritime logistics scenarios rather than providing a general problem formulation with systematic algorithm comparison.
Incompatibility constraints have also been studied in the one-dimensional bin packing problem with conflicts (BPPC) [
7,
8], with extensions to category-level conflicts [
22]. Subsequent work addressed generalized variants with compulsory and optional items via adaptive large neighborhood search [
23], and multi-bin extensions via a two-stage heuristic [
24].
Table 1 summarizes the positioning of the present work relative to the closest prior studies.
4. Solution Methodology
4.1. Algorithmic Framework
All algorithms adopt the permutation-plus-decoder paradigm [
4]: the metaheuristic searches over item permutations and orientations; a deterministic decoder translates each candidate into a concrete 3D packing; a fitness function evaluates the result. The decoder operates without awareness of the metaheuristic’s internal state, enabling any algorithm to be paired with any constraint-handling strategy.
4.2. Solution Representation and DBLF Decoder
A candidate solution is , where is a permutation of specifying placement order and specifies per-item orientation. Items that cannot be feasibly placed are simply skipped. The decoder maintains a set of corner points , initially .
For each item
i in order
, for each orientation
o, for each corner point
, the decoder checks: (1) boundary feasibility, (2) non-overlap with placed items (axis-aligned bounding-box), and (3) compatibility (
for all placed
j). Among feasible placements, the one minimizing the DBLF score
is selected (deepest first, then bottom-most, then left-most) [
4]. After placement,
is updated by generating three new corner points at the exposed faces of the placed item (at coordinates
,
, and
) and removing any corner point that is dominated (i.e., lies within or below another placed item in all three dimensions).
Worst-case complexity is , with empirical behavior –. For , a single call completes in milliseconds.
4.3. Constraint Handling Strategies
Hard filter (decoder-embedded). All 11 configurations share the same decoder-embedded compatibility check: at placement time, the DBLF decoder verifies
for all already-placed items
j and rejects any candidate placement that would create an incompatibility (
Section 3.2). This prevents infeasible solutions from being constructed, requires no parameter tuning, and incurs zero per-generation overhead beyond the decoder’s existing feasibility checks. The “penalty” and “repair” strategies described below are additional post hoc mechanisms applied on top of this shared filter, not alternative placement strategies.
Penalty function. , where
is the proportion of incompatible item pairs and
is tuned via iRace [
26] on a separate set of 30 tuning instances. The decoder operates unchanged; infeasible solutions are penalized but not prevented.
Repair operator. Three-phase post-processing: (1) all incompatible pairs are detected; (2) a conflict graph is built, the maximum compatible subset per connected component is found via greedy max-clique; (3) and removed items are re-inserted in descending volume order via DBLF, accepting only non-violating placements. This guarantees zero violations with overhead.
4.4. Metaheuristic Adaptations
Four algorithms, each in penalty (-P) and repair (-R) variants, yield eight configurations.
GA. The GA operates on the permutation representation with tournament selection (size 3), Order Crossover (OX) [
4], and elitism (the top 5 individuals are preserved). Mutation applies swap, scramble, or inversion to the permutation with probability
, and each orientation bit is independently resampled with probability
. The population size is 100. OX preserves the relative order of a subsequence from one parent and fills the remaining positions from the other parent in order. Per-generation complexity is
, where
D is the decoder cost.
PSO. Particles are vectors . The permutation is obtained via and orientations via . The velocity update uses inertia weight , cognitive coefficient , and social coefficient . Swarm size is 100. The global-best topology is used; each particle’s personal best and the swarm’s global best guide the search. Particles are reflected at the boundary.
ACO. We implement Ant Colony System [
27] with 50 ants. A pheromone matrix
τ[
i][
ℓ] encodes the preference for item
i at position
ℓ, with evaporation rate
. Pheromone is initialized to
, where
is the greedy heuristic’s utilization. The heuristic information
combines item volume density with a dynamic compatibility score. At each construction step, the pseudo-random-proportional rule (exploitation probability
) selects the next item. Global pheromone update deposits on the best-so-far permutation. A 2-opt local search of depth 10 is applied to each constructed permutation.
DE. The same encoding as PSO is used. The population size is 100, the scaling factor , and the crossover probability . The rand-to-best/1/bin mutation strategy is employed: a donor vector is generated as . Binomial crossover produces the trial vector, and one-to-one selection replaces the target if the trial has higher fitness.
Table 5 summarizes the per-generation computational complexity and parameter settings of each metaheuristic, where
N denotes the population or swarm size and
is the decoder cost.
General algorithmic structure and parameter rationale. Table 6 and Algorithm 1 define the framework shared by all four metaheuristics. All algorithms operate on the same permutation-plus-orientation representation and invoke the identical DBLF decoder as a self-contained placement procedure; any observed performance differences are therefore attributable to the search strategy rather than to decoder-level variation. Parameter values (
Table 5) were drawn from the canonical references for each algorithm: GA parameters follow Gonçalves and Resende [
4]; ACO parameters follow Dorigo and Gambardella [
26]; PSO and DE parameters follow standard settings documented in the evolutionary computation literature. Using established defaults in place of per-algorithm tuning is a deliberate fairness choice: it prevents any single algorithm from benefiting from a disproportionately large tuning budget, at the cost of potentially understating each algorithm’s peak performance. This limitation is discussed further in
Section 6.
| Algorithm 1 Unified metaheuristic framework for the 3D-SBPP-CC. All four algorithms instantiate this template; algorithm-specific variations are annotated in the right column. |
| Input: Container , items , matrix |
| Output: Best packing , utilization |
| 1 | Initialize population of size N | GA/PSO/DE: , random permutations & orientations |
| | | ACO: , |
| 2 | , , | |
| 3 | while
and
do
| |
| 4 | for each candidate c do | |
| 5 | | PSO/DE: |
| 6 | | — identical across all algorithms — |
| 7 | if penalty then | |
| 8 | else if repair then ; | |
| 9 | else // hard filter (decoder-embedded) | |
| 10 | if then ; ; | |
| 11 | | |
| 12 | end for | |
| 13 | select parents | GA: tournament (size 3), elitism top-5 |
| | PSO: personal best + global best |
| | DE: rand-to-best/1/bin |
| | ACO: pseudo-random-proportional () |
| 14 | generate offspring | GA: OX crossover + mutation () |
| | PSO: |
| | (, ); reflect at boundary |
| | DE: |
| | binomial crossover (, ) |
| | ACO: pheromone-guided construction + 2-opt (depth 10) |
| 15 | replace population | GA: elitism (top-5 preserved) |
| | PSO/DE: one-to-one if trial better than target |
| | ACO: global pheromone update on best-so-far () |
| 16 | end while | |
| 17 | return , | |
4.5. Baseline Algorithms
The Greedy Constructive Heuristic (GCH) sorts items by descending volume, assigns the minimum-height orientation to each, and executes a single DBLF pass. It is deterministic and completes in under 0.1 s. Random search (RS) generates 10,000 random permutations with random orientations and returns the best packing found. GCH + LS starts from the GCH solution and then applies 1000 iterations of local search using swap, shift, and insert moves.
4.6. Parameter Tuning and Configuration Summary
All metaheuristic parameters were set to standard values from the literature (ref. [
27] for ACO, ref. [
4] for GA population size, and conventional defaults for PSO and DE). The only exception is the penalty coefficient
, which was tuned via iRace [
26] on a separate set of 30 instances excluded from the benchmark. No further automated parameter tuning was performed. This design choice ensures that no algorithm received an unfair tuning advantage. However, it may understate the absolute performance of algorithms whose default parameters are further from optimal—a limitation discussed in
Section 6. Baselines are parameter-free.
Table 7 lists the 11 configurations. All share the identical Compatible-DBLF decoder, termination criterion (10,000 evaluations or 1000 without improvement), and instance set.
6. Discussion
6.1. The Decoder Dominance Hypothesis
Random search achieves 98.7% of the best metaheuristic’s performance and is statistically indistinguishable from it. This supports a DBLF-dominance hypothesis: the DBLF heuristic’s lexicographic priority rule produces near-optimal packings from almost any item ordering, and the metaheuristic contributes at most a 15.8% improvement over the greedy baseline. An alternative interpretation is that all four metaheuristics, when paired with the identical DBLF decoder and budget, converge to similarly valued regions of the DBLF-guided fitness landscape; the present experiment cannot distinguish between decoder dominance and fitness-landscape convergence. Testing this distinction would require varying the decoder itself—a natural direction for future work.
Our results reflect a broader pattern in the metaheuristics literature: stochastic search often derives its power from problem-specific components rather than the high-level search framework. In 3D constrained packing, the DBLF corner-point placement heuristic is that component; the choice of metaheuristic wrapper is secondary. Ali et al. (2022) [
12] identified “constraint-aware algorithm comparison” as an open problem in their survey of 3D packing papers, and our benchmark directly addresses this gap by showing that constraint awareness at the decoder level suffices.
6.2. Constraint Density as a Moderator
The monotonic decline of Kendall’s
W from 0.69 to 0.08 constitutes the paper’s central empirical finding. This metric captures inter-instance ranking consistency rather than mean differences alone, and its collapse reveals that constraint density—not algorithm design—is the primary performance moderator. At low
, the problem approximates unconstrained 3D-BPP and the literature’s established hierarchy (GA ≈ ACO > PSO ≈ DE) carries over [
4]. At high
, rankings collapse because instance-specific compatibility patterns overwhelm any algorithmic signal.
This interaction—adding constraints changes which strategies are effective, not merely how hard the problem is—has not been documented in the BPPC literature. Prior work has focused on exact algorithms and lower bounds [
7,
8] without examining how conflict-graph density interacts with solution method performance. Our results suggest that structural properties of the compatibility matrix (cluster sizes, isolates) are more predictive of algorithm success than generic algorithmic features. Future BPPC work should therefore report constraint-density-stratified results as standard practice, and the benchmark instances released with this paper provide a testbed for such investigations.
The present findings both align with and depart from the existing literature. The dominance of GA and ACO over PSO and DE at low constraint densities is consistent with Gonçalves and Resende [
4], who reported GA-based approaches to be effective for unconstrained container loading. The collapse of this hierarchy at moderate-to-high
and the statistical indistinguishability of random search from all metaheuristics are, however, novel observations not reported in prior 3D-BPP studies—a discrepancy that likely reflects the fact that earlier work did not systematically vary constraint density or report constraint-stratified rankings. The finding that decoder-embedded filtering renders repair and penalty strategies equivalent contrasts with the BPPC literature, where explicit constraint handling is essential because no geometric placement heuristic pre-filters incompatible items. This divergence carries a methodological implication: findings from one-dimensional BPPC studies do not automatically transfer to the 3D setting, where the placement decoder supplies an additional layer of constraint awareness.
6.3. Implications for Algorithm Design
Two practical recommendations follow from these results. First, for problems where categorical constraints can be checked at placement time with negligible overhead, a decoder-embedded hard filter is the optimal mechanism. It guarantees feasibility, requires no parameter tuning, and adds zero per-generation cost. By contrast, explicit repair and penalty strategies add implementation complexity without empirical benefit—consistent with Rahimi et al. (2023) [
10], who argue that constraint-handling strategies should be tailored to problem structure rather than applied generically.
Second, when the target constraint density is known in advance, algorithm selection can be guided by -stratified rankings: at low density, any metaheuristic suffices; at high density, ACO’s incremental, compatibility-aware construction provides a consistent but modest advantage. These findings underscore the value of systematic benchmarking: design choices that appear theoretically consequential may be rendered moot by problem-specific heuristics, while genuinely impactful factors such as constraint density remain invisible to single-algorithm studies.
6.4. Limitations
Internal validity. All experiments share a common codebase; any implementation bias is conservative in direction, since relative comparisons are less sensitive to shared components than absolute performance. All algorithms used default parameters without automated tuning. This ensures fairness but may understate the performance of algorithms whose defaults are further from optimal. The continuous-to-discrete mapping used by PSO and DE () introduces an additional concern: nearby points in the continuous search space may map to identical permutations, reducing effective search diversity. Additionally, the constraint-handling comparison introduced a tuning asymmetry: the penalty coefficient was calibrated via iRace, whereas the repair operator parameters (e.g., re-insertion order) were fixed. This may disadvantage the repair strategy relative to the tuned penalty. The finding that penalty and repair are statistically equivalent should therefore be interpreted as conservative: even with a tuning advantage favoring the penalty strategy, it does not outperform repair. Symmetric tuning of both strategies would be required for a fully balanced comparison.
External validity. Instances were generated synthetically under distributional assumptions that have not been calibrated against empirical logistics data. Results may not generalize to real-world loading scenarios with different item dimension distributions or compatibility structures.
Statistical power. With 10 runs per configuration and 9 instances per stratum, the design may lack power to detect small effect sizes. The critical difference (, reflecting instances) is relatively wide, so moderate differences within the metaheuristic tier may be masked. Replication with all 225 generated instances would narrow the CD and enable finer discrimination. However, the qualitative pattern—a stark gap between the metaheuristic-plus-RS tier and GCH, and the collapse of ranking consistency at high —would persist regardless of sample size.
Practical significance. Although the eight metaheuristic variants and RS are statistically indistinguishable, the observed 2.5% relative difference between the best (ACO-R: ) and worst (DE-P: ) metaheuristic may carry economic significance in high-volume logistics operations where small percentage improvements translate into substantial cost savings. We therefore distinguish between statistical indistinguishability (an artifact of the present experimental design) and practical equivalence (which would require a domain-specific cost–benefit analysis beyond the scope of this benchmark). A study with larger sample sizes or all 225 generated instances would be required to determine whether the 2.5% difference reflects a real effect or sampling noise.
Scope. This benchmark is limited to population-based metaheuristics. Single-solution methods (simulated annealing, tabu search, iterated local search) and hybrid approaches such as BRKGA remain to be evaluated. Furthermore, the absence of optimal solutions (the MILP is intractable for ) means the 15.8% improvement over GCH cannot be contextualized against a known upper bound; optimal solutions for smaller instances () would anchor the absolute performance scale.
7. Conclusions
This paper introduced the 3D-SBPP-CC, a problem that couples 3D geometric packing with categorical incompatibility constraints, and conducted a systematic benchmark of four population-based metaheuristics under a matched computational budget. The key findings are as follows.
Problem formalization. We presented a complete MILP formulation of the 3D-SBPP-CC, encoding pairwise compatibility as the linear inequality , and proved the problem strongly NP-hard via independent reductions from 3D-SBPP and BPPC.
Systematic benchmark. Under a uniform budget of 10,000 fitness evaluations, the eight metaheuristic variants and random search form a single statistically homogeneous tier (, , ). The DBLF decoder, not the metaheuristic, governs packing quality: RS achieves 98.7% of GA-R’s utilization, and GCH achieves 84.2% in under 0.1 s.
Benchmark instances. We publicly release 225 stratified instances ( factorial design) with a documented generator, providing a reproducible testbed for constrained 3D packing with categorical incompatibility rules.
Constraint-density moderation. Kendall’s W declines monotonically from 0.69 to 0.08 as increases, confirming that constraint density is the primary performance moderator. Decoder-embedded compatibility filtering renders explicit repair and penalty strategies redundant ( at all constraint levels).
Future work should pursue several directions. First, systematically varying the decoder (e.g., comparing DBLF against Bottom-Left, Best-Fit, or learning-based placement rules) would test whether the DBLF-dominance finding generalizes and distinguish decoder dominance from fitness-landscape convergence. Second, obtaining optimal solutions via MILP solvers on small instances (
) would anchor the absolute performance scale and contextualize the 15.8% improvement over GCH. Third, calibrating instance distributions against empirical logistics data would strengthen external validity and identify which constraint-density regimes are most common in practice. Additional directions include extending the benchmark to single-solution methods and BRKGA [
4], incorporating further practical constraints [
25], pursuing multi-objective formulations trading utilization against safety margins, and exploring learning-augmented construction heuristics [
30] that may surpass the hand-designed DBLF rule.