USE CASE / PALLET-LOADING

Pallet loading: stack cartons within a height limit

The same carton, stacked as high as the pallet and the carton's own crush rating allow, not the container's much taller ceiling.

WHEN YOU NEED THIS

Building a pallet of one SKU for storage or line-haul, where the limit that actually matters is how many cartons may sit on top of each other, not how tall the truck is.

max_stacked_items caps how many units may rest on top of one instance of an item, independent of how much vertical room the container still has - so a stack stops at the carton's own limit, not at the ceiling.

SHOWN IN PHP
use Packvium\Config\PackingConfig;
use Packvium\Domain\{Container, Dimensions, Item};
use Packvium\Explain\Explain;
use Packvium\Packer;

$items = [
    Item::create('carton', Dimensions::mm('400', '300', '200'),
        weight: '8 kg', quantity: 6, maxStackedItems: 2, keepUpright: true),
];
$containers = [
    Container::create('pallet', Dimensions::mm('400', '300', '1200'),
        maxPayload: '200 kg', quantity: 1),
];

$result = (new Packer(PackingConfig::balanced()))->pack($items, $containers);

foreach ($result->unpacked as $unpacked) {
    printf("%s: %s\n", $unpacked->instance->item->id, Explain::unpackedItem($unpacked));
}
WHAT COMES BACK

The pallet is 1200 mm tall - room for six 200 mm cartons - but only three ever place, one on top of the next. The cartons are kept upright, so none can stand on end to start a second column, and maxStackedItems: 2 means at most two cartons may rest on top of another, so a column of three (one base plus two stacked) is the allowed maximum, and the other three come back unpacked.

THE PACKED RESULT, IN 3D
100×100×400 · 62.5% used
base × 1light × 4
WHAT A REFUSAL LOOKS LIKE HERE
pallet-loadingInferred

It needs another container and the inventory ran out container_inventory_exhausted

The fourth carton has nowhere to go on this pallet: its footprint holds one column, and the stack limit closes that column at three. A second pallet would take it, but the request offers one, so the engine names that limit. Empty ceiling height above the column never enters the decision.

WHAT CHANGES IN YOUR PROCESS
TODAY
  • A pallet pattern lives in a planner's head or a spreadsheet, one per SKU, and goes stale when a carton changes.
  • Stack limits are remembered rather than enforced, so a crushed bottom layer is found at the customer.
  • Pallet count per shipment is estimated, and the truck booking is made on the estimate.
WITH PACKVIUM
  • The pattern is computed from the carton's real size and its stack limit, every time the carton changes.
  • A pattern that would put too many cartons on top of each other is never produced.
  • The pallet count comes from a computed load, so the truck is booked for what will actually ship.
WHAT TO MEASURE
  • Damage claims for crushed cartons
  • Pallets per shipment, planned against actual
  • Time spent building pallet patterns by hand

Run a month of past orders through the same request and compare these numbers with what you actually shipped. That comparison, on your own data, is the only figure worth quoting.

WHY PACKVIUM

A pallet plan built from height alone assumes every layer can bear the ones above it. Packvium enforces the carton's own stacking limit during the search, so the plan it returns is one a warehouse can actually build without crushing the bottom layer.

Open this request
INSTALL
composer require packvium/packvium