type
concept
created
Tue Apr 07 2026 02:00:00 GMT+0200 (Central European Summer Time)
updated
Tue Apr 07 2026 02:00:00 GMT+0200 (Central European Summer Time)
sources
raw/articles/PRD
tags
container assembly shipping logistics bin-packing

Container Assembly

abstract
The container assembly algorithm combines multiple small surplus lots from different mills into a single shipping container using greedy bin-packing, making 5-15 MT lots economically viable by sharing freight across a full 24-26 MT container.

Overview

Container assembly is the marketplace's killer feature. No individual broker has visibility across multiple mills and multiple buyers to optimize container fills. The platform solves the "small lot problem": surplus lots are typically 5-50 MT, but a 40ft container holds 24-26 MT. Shipping 8 MT alone costs approximately 3x more per ton in freight than a full container. Without assembly, small lots are uneconomical and often recycled by the mill -- a significant loss.

The algorithm proposes containers by combining matched surplus lots from different mills into full containers, prioritizing exact spec matches and filling remaining space with close matches.

Container Specifications

See wiki/concepts/container-types-and-weights for full details.

Container Type Max Payload Paper Capacity Use Case
20ft Standard 21.7 MT 18-22 MT Small orders, intra-EU
40ft Standard 26.68 MT 24-26 MT Standard international
40ft High Cube 26.46 MT 24-28 MT Large diameter rolls

Algorithm: Greedy Bin-Packing with Constraints

The algorithm follows a greedy strategy:

  1. Sort matched surplus: exact matches first, then by score descending
  2. Iterate through sorted matches, adding items to the container:
    • Skip items that are already sold, reserved, or in another proposal
    • Check origin region constraint (all lots must ship from same region or ports within 200km)
    • Check product compatibility (see rules below)
    • Calculate quantity to load (available quantity or remaining capacity, whichever is smaller)
    • Skip very small quantities (< 1 MT) unless the container is still below minimum target
  3. Stop when target maximum weight is reached
  4. Validate minimum utilization (must be >= 70%)
  5. Calculate totals: weight, value, estimated freight per MT

Target weight ranges:

Container Target Min Target Max Hard Max
20ft 15.0 MT 21.0 MT 21.7 MT
40ft 18.0 MT 26.0 MT 26.68 MT
40ft HC 18.0 MT 26.0 MT 26.46 MT

Product Compatibility Rules

Items in the same container must be compatible:

  1. Food contact: If the buyer requires food contact, all items must be food-contact certified
  2. Paper group compatibility: Papers are grouped into compatible categories. Items from different groups cannot share a container:
  3. Grade proximity: A-grade and C-grade cannot share a container (grade gap must be <= 1). A+B is fine, B+C is fine, A+C is rejected.

Roll Loading Constraints

Physical loading considerations for paper rolls in containers:

Standard roll diameters: full reel 1200-1500mm, partial 400-800mm, standard 800-1500mm.

Container Proposal Output

A proposal includes:

Example from PRD: A 40ft container for Carlos (Valencia, Spain) combining 8 MT Kraftliner 150g from Germany (EUR450/MT, exact match), 9 MT Kraftliner 170g from Poland (EUR430/MT, close), 5 MT Kraftliner 135g from Germany (EUR465/MT, close), and 4 MT Testliner 160g from Czech Republic (EUR395/MT, partial). Total: 26.0 MT, EUR11,375, 97.4% utilization. Freight: ~EUR46/MT vs EUR150/MT for 8 MT alone -- 69% freight savings.

Business Rules

Rule Value
Minimum utilization 70% (do not propose near-empty containers)
Origin constraint All lots from same region or ports within 200km
Proposal expiration 72 hours
Multiple containers If matched surplus exceeds one container, propose multiple
Buyer actions Accept full proposal, remove items, or decline entirely
Priority Exact spec matches first, fill remaining with close matches

Sources

Related