RSJ 3D Packer 3D bin packing, palletising and load optimisation

← All posts

2026-10-23

The 3D Bin Packing Problem, Explained Without the Math

The 3D Bin Packing Problem, Explained Without the Math
RSJ 3D Packer packing optimization item packer

The 3D Bin Packing Problem, Explained Without the Math

You have a container. You have a list of things that need to go inside it. You want to use as few containers as possible and waste as little space as possible. That is the whole problem — and it is one of those problems that sounds trivial until you try it.

This article is the 3D bin packing problem explained without formulas: what the problem actually is, why it is genuinely hard, what “solved” means in practice, and what a packing solver has to consider that a human with a tape measure usually forgets. No linear programming, no notation with subscripts. Just the concepts, plus the JSON you would send to a solver if you want to stop doing it by hand.

What Is the 3D Bin Packing Problem?

The 3D bin packing problem is the task of fitting a set of three-dimensional items into one or more three-dimensional containers, minimising either the wasted space or the number of containers used.

Both parts of that sentence matter:

  • The items are 3D. A box is not a rectangle on a floor plan. It has a width, a height and a depth, and so does the space it goes into.
  • There is more than one container. Usually you have a fixed fleet of pallets, a set of shipping containers, or a rack of totes, and you want to know how few of them you can get away with.

In RSJ 3D Packer the mapping is direct: width, height and depth map to the x, y and z axes, and every item and every container carries its own three numbers. A 40-foot container and a shoe box are the same kind of object to the solver, just with different dimensions.

Why it is hard. With one item, there is one place to put it. With two items, there are already several — beside each other, on top, rotated one way or another. Every item you add multiplies the number of arrangements that could exist, and the growth is not gentle. This is why there is no tidy formula you can plug numbers into. You can verify a given plan quickly (“does anything overlap? does anything float?”), but finding the best plan means searching an enormous space of possibilities. That gap — easy to check, hard to find — is what makes packing a classic optimisation problem.

What “solved” means. When a packing tool says it solved your problem, it does not mean it proved that no better plan exists. It means it found a good, valid plan within its time budget. RSJ 3D Packer works with a 240-second budget per request: the solver spends that budget searching and returns the best plan it found. For real logistics work, a good plan in four minutes beats a theoretically perfect plan in four weeks.

Where you already meet this problem. Shipping containers, pallets, parcel lockers, the boot of a car before a holiday, and the moving van in the next section. Same problem, different vocabulary.

A Real-World Analogy: Packing a Moving Van

Imagine you are packing a van for a house move. You have forty boxes of different sizes, one sofa, three bikes and a lamp you refuse to lose. You have one van. You would very much like to avoid paying for a second trip.

Watch the decisions you make, because they are the same ones the algorithm makes:

  1. Which box goes first? Large flat boxes on the floor create a base; putting the sofa in last may not work at all. Order and placement are entangled.
  2. Can it be turned? That tall bookcase can lie down. The lamp absolutely cannot.
  3. What can be stacked on what? Boxes on the sofa cushions, yes. The mirror on top of the toolbox, no. This is a stacking hierarchy, not just a height limit.
  4. How much weight can the floor take? The van has a payload limit, and so does every layer you build.
  5. What must not travel next to what? Paint tins and anything you care about. In freight, this becomes dangerous goods segregation.

Here is the same van, translated into solver terms:

In the van In the solver
Boxes with different sizes Items with width, height, depth
The cargo space Containers
Turning a box on its side Rotation (or "vertical": false to forbid it)
“Nothing heavy on the mirror” Stacking classes (itemClass)
The van’s payload limit Container weight
Paint tins away from everything Risk types and allowedRiskPoints

The important observation: a good packer — human or software — considers all of these at the same time. A packer who first fills the floor, then worries about weight, then discovers the lamp has nowhere safe to go, has to start over. That simultaneity is exactly what makes the problem hard and what makes an automated solver useful.

The Rules That Make Packing Realistic

Geometry alone produces plans that no warehouse would accept — boxes floating in mid-air, a fragile item under an anvil. Real packing adds rules. Here are the ones RSJ 3D Packer models.

Dimensions. Every item and every container has its own width, height and depth. Items do not have to be identical; a request can contain as many different item types as you like. Containers can differ too (that capability starts on the Standard plan).

Rotation. Some items may be turned any way you like. Others must stay upright — a fridge, a liquid drum, a monitor. You express the upright requirement per item with "vertical": false. Rotation control is available on the Standard and Pro plans.

Stacking classes. Each item can carry an itemClass. An item is only ever placed on items of a lower or equal class. Class 0 is your heavy pallet base; class 3 might be the light cartons that go on top. And the plan contains no floating items: every packed item is supported by the item below it.

Weight. A container can declare a maximum load with weight, and items can declare their own weight. Once you add weight, the problem is no longer purely geometric — a plan that fits perfectly in volume can still be illegal.

Dangerous goods. Items carry riskTypes and riskPoints; containers carry a maximum allowedRiskPoints; and a risks list declares pairs of risk types that must never travel together. This is a segregation rule expressed numerically rather than as a wall chart. It is available on the Pro plan.

Put those together and you have a constrained optimisation problem: many valid-looking arrangements, very few that satisfy every rule and also use the space well.

How a Solver Finds a Packing Plan (Without the Math)

You do not need to know how the sausage is made, but a rough mental model helps you interpret the result.

RSJ 3D Packer’s core is a neural network optimised through neuro-evolution. In plain terms: the solver has a decision-making component that proposes placements, and instead of being hand-programmed with packing rules, it is improved by generating variations, testing how well each one packs, and keeping what works. Over many attempts it learns heuristics that humans describe as “instinct” — put the big flat things down first, don’t leave narrow gaps, keep heavy items low.

Three consequences follow from that design:

  • It is a black box, and that is the point. You give it items, containers and rules; you get back a plan. You are not expected to tune the search.
  • There is a time budget. The solver works within 240 seconds per request on every plan. Simple problems come back faster; gnarly ones use the budget and return the best plan they found.
  • It solves the static problem. Items may be packed in any order — the solver decides the sequence. Dynamic variants, where a fixed packing order or a required unpacking order must be respected, are a different problem; the algorithm can be adapted for those.

The result is concrete. For every packed item you get the container index and the x/y/z position, plus fill percentage per container, the number of containers used, and the items that did not fit. That last list is not a failure — it is the answer to “what if I only have one container?”

Why It Matters and Common Misconceptions

Better packing is not an abstract win. Fewer containers on the same order means lower freight cost. Higher fill percentage means fewer air shipments. A plan that respects stacking classes and weight limits means fewer crushed cartons and fewer unsafe loads. All of that comes from a plan you can hand to a warehouse rather than a guess.

Three misconceptions come up again and again.

“A simple greedy algorithm is enough.” Greedy packing — put each item in the first spot that fits — is easy to write and often leaves large parts of a container unusable, because early decisions close off space that later items needed. Worse, greedy rules tend to satisfy one constraint at a time: it will fit the box and ignore the weight limit, or respect the weight and stack a class-0 item on a class-1 item.

“The solver always finds the perfect answer.” It does not, and no honest solver claims to. It finds a good plan within the time budget. Optimality proofs are not what you want at 6 a.m. when the truck is waiting; a valid, well-filled plan is.

“You need a math degree to use it.” You need a JSON object with some numbers in it. Modern tools — RSJ 3D Packer among them — hide the search behind an API or a browser UI.

How RSJ 3D Packer Puts This Into Practice

RSJ 3D Packer is a managed service that computes optimised packing plans. You describe the problem; it returns the plan. There is nothing to install to try it, no solver to compile, and no search parameters to tune.

The one-step way is POST /solve on https://3dpacker.rsj.de. A minimal request with three item types and one container looks like this:

{
  "containers": [
    { "width": 48, "height": 47, "depth": 46, "count": 1, "weight": 2000, "allowedRiskPoints": 1000 }
  ],
  "items": [
    { "width": 11, "height": 6, "depth": 6, "count": 51 },
    { "width": 7, "height": 8, "depth": 9, "count": 53, "vertical": false, "itemClass": 1, "weight": 12 },
    { "width": 8, "height": 9, "depth": 10, "count": 57, "riskTypes": [1, 2], "riskPoints": 10 }
  ],
  "risks": [{ "type1": 1, "type2": 2 }]
}

Send it with a session token:

curl -X POST https://3dpacker.rsj.de/solve \
  -H "Authorization: Bearer $SESSION" \
  -H "Content-Type: application/json" \
  -d @problem.json

The response is abbreviated here, but the shape is what you will get:

{
  "containers": [
    { "width": 48, "height": 47, "depth": 46, "count": 1, "used": 1, "filled": 76.77, "first": 0 }
  ],
  "packedItems": [
    { "id": 0, "c": 0, "width": 11, "height": 6, "depth": 6, "x": 0, "y": 0, "z": 0 }
  ],
  "unpackedItems": [
    { "id": 2, "width": 8, "height": 9, "depth": 10, "weight": 0, "itemClass": 0, "count": 17 }
  ]
}

Reading the result in a script is straightforward — here is the part most people care about first:

import requests

resp = requests.post(
    "https://3dpacker.rsj.de/solve",
    headers={"Authorization": f"Bearer {session}"},
    json=problem,
    timeout=300,
)
plan = resp.json()

print(f"containers used: {len(plan['usedContainers'])}")
for item in plan["unpackedItems"]:
    print(f"did not fit: {item['count']} x {item['width']}x{item['height']}x{item['depth']}")

From there you can feed packedItems straight into your own labelling or loading process — each entry tells you which container (c) and where (x, y, z).

For humans, the browser application shows the same result as an interactive 3D view, and the solution can be downloaded as a GLB 3D model, so you can drop it into a viewer or a slide deck. The viewer is embeddable in an IFRAME if you want it inside your own tooling. The API sandbox lets you fire live requests and see the preview without writing any code, and the full field-by-field reference is published as OpenAPI.

Delivery is flexible: cloud subscription, an on-premises server (Windows 10/11 64-bit or Ubuntu 64-bit, 16 GB RAM, 4 GB disk), or a stand-alone program. The cloud version also has a Google Sheets add-on.

The hard way exists, of course: write your own search, your own constraint handling and your own rotation logic, then maintain it. That is a project, not an afternoon. The product exists so you do not have to.

FAQ

What is the difference between 3D bin packing and 3D knapsack problems?

In bin packing, you want to use as few containers as possible to pack all items. In knapsack, you want to maximise the value of items packed into a fixed set of containers. RSJ 3D Packer focuses on bin packing with multiple bins.

Can the solver handle items that must not be rotated?

Yes. You can set "vertical": false for an item to prevent it from being rotated out of its upright position. This is available on Standard and Pro plans.

How long does it take to get a packing plan?

The solver works with a 240-second time budget per request. The actual time depends on the complexity of the problem, but the solver will return the best plan it finds within that budget.

What happens if some items cannot be packed?

The response includes an unpackedItems list with the counts and dimensions of items that did not fit, so you can adjust your container sizes or item quantities and try again.

Conclusion

The 3D bin packing problem is hard for one reason: placement decisions interact. Rotation, stacking order, weight and segregation all constrain each other, and you cannot solve them one at a time without paying for it in wasted space. Understanding that is most of the education — you do not need the math to reason about it, you need to know which rules exist and what “solved” honestly means.

RSJ 3D Packer takes it from there: send a JSON request, get back positions, fill rates and a list of what did not fit, all within a 240-second budget.

Every plan can be tested free for 30 days, and the free test exposes the Pro feature set — including dangerous goods constraints. Compare the plans and start your free test, or try a request in the API sandbox first.

Related posts

  • 3D Bin Packing Software Pricing: What Plans Actually Include
  • How to Pack Different Sized Boxes Into a Container Efficiently
  • Automate Container Loading Plans from Google Sheets
EU label: AI-generated content