Skip to main content

Warehouse Slotting as a Constraint Programming Problem

Sharvari Joshi Updated May 30, 2026 2 min read

Slotting, deciding which SKU lives in which location, is the highest-leverage lever on warehouse labour, because picking travel is usually the biggest cost on the floor. Most teams slot by intuition or a simple velocity rule. Framed as a constraint programming (CP) problem, slotting becomes something you can optimize against real objectives, but only when the instance is the right size for it.

What you are optimizing

The objective is to minimize expected pick travel (and handling effort) over your real order mix. The decision variables are assignments of SKUs to slots, subject to constraints. The factors worth modeling:

Framing it in OR-Tools

A CP-SAT model expresses it directly: a binary variable for each (SKU, slot) pair, a constraint that each SKU gets one slot and each slot holds what it can, and an objective that sums travel and affinity costs.

# illustrative (CP-SAT sketch)
x[s, l] = model.NewBoolVar() # SKU s in location l
for s: model.Add(sum(x[s, l] for l) == 1) # each SKU one slot
for l: model.Add(sum(x[s, l] for s) <= cap[l])# capacity
model.Minimize(sum(travel[l] * velocity[s] * x[s, l] for s, l)
 + affinity_penalty(x))

The travel term pulls high-velocity SKUs toward low-travel slots; the affinity term pulls co-ordered SKUs together.

When CP wins, and when it does not

CP-SAT can find excellent assignments, but the SKU-by-slot space is huge, so it is tractable only up to a point. The honest rule mirrors 3D bin packing:

The takeaway

Slotting is genuinely an optimization problem, and CP-SAT lets you optimize it against travel, affinity, and constraints together rather than by feel. Reserve the solver for bounded, high-value, periodic re-slots; run a velocity-and-affinity heuristic for the rest. Either way, re-slot on a schedule, because velocity decays, and a stale slotting plan quietly gives the travel savings back. For the wider context see warehouse management.


Implementing this at your scale?

The walkthrough above comes from production work. AvanSaber’s inventory practice has implemented variations of this pattern across multiple customer engagements.

If you are building this and want expert review of your design, or would rather have the team that built this build yours, book a discovery conversation or describe your situation at [email protected].

See our Implementation engagement model

Related reading