PLAYGROUND / REQUEST → RESULT

Run a real packing request before you write any code.

This page executes @packvium/engine on the server and draws the placements it returns. Change the objective or a quantity and the answer, the score vector and the refusals all come from the engine. Nothing on this page is a mock-up.

Each scenario is a complete request the site already checks against the engine. Picking one opens it in Advanced mode and runs it: edit it, run it again, and take the code below the result.

Opens as few containers as it can, then packs them as tightly as it can.

Up to 40 per item.

crate · 400×300×200
case · 300×200×150
carton · 200×150×150

18 of 200 units

small · 600×400×400×4120
large · 1200×800×600×2260
Runs server-side through the published JavaScript engine. Native, WebAssembly and JavaScript builds all accept the same request contract; their cross-runtime guarantees differ — see the package contract on /packages.

Everything fittedNot proven to be the best possible@packvium/engine@1.11.0 · javascript_fallback
TURN0°
large#1 · 1200×800×600 · 32.3% used
18/18units placed
1containers opened
58 mstime in the engine
SCORE
  1. Units left over0
  2. Containers opened1
  3. Container costin minor currency units260
  4. Unused volumeparts per million, added up over the containers677 083
  5. Stack heightparts per million of container height, added up500 000

Compared in this order: the lower number wins, and only a tie hands the decision to the next line.

Lower bound

Container cost: the best possible answer has at least 120, this one has 260 - at most 140 above the best. That excess is 117% of the bound.

Independent check

The reference validator found no issues with this result.

@packvium/browser 1.11.0, which shares no code with the engine that packed it.
WORK ORDER

The same result as one document a warehouse system can use with no engine and no network. The server builds it from the result above; the three views below are made in your browser from that document alone.

Building the work order…

GENERATE CODE
import json

from packvium import pack_from_dict

request = json.loads(r"""
{
  "units": {
    "length": "mm"
  },
  "configuration": {
    "objective": "default",
    "seed": 42,
    "solver_profile": "balanced",
    "time_limit_ms": 250,
    "require_placement_coordinates": true
  },
  "items": [
    {
      "id": "crate",
      "quantity": 4,
      "dimensions": {
        "length": 400,
        "width": 300,
        "height": 200
      },
      "weight": {
        "value": "6",
        "unit": "kg"
      },
      "keep_upright": false
    },
    {
      "id": "case",
      "quantity": 6,
      "dimensions": {
        "length": 300,
        "width": 200,
        "height": 150
      },
      "weight": {
        "value": "3",
        "unit": "kg"
      },
      "keep_upright": true
    },
    {
      "id": "carton",
      "quantity": 8,
      "dimensions": {
        "length": 200,
        "width": 150,
        "height": 150
      },
      "weight": {
        "value": "1.5",
        "unit": "kg"
      },
      "keep_upright": false
    }
  ],
  "containers": [
    {
      "id": "small",
      "inner_dimensions": {
        "length": 600,
        "width": 400,
        "height": 400
      },
      "cost_minor": 120,
      "quantity": 4,
      "max_payload": {
        "value": "80",
        "unit": "kg"
      }
    },
    {
      "id": "large",
      "inner_dimensions": {
        "length": 1200,
        "width": 800,
        "height": 600
      },
      "cost_minor": 260,
      "quantity": 2,
      "max_payload": {
        "value": "300",
        "unit": "kg"
      }
    }
  ]
}
""")

result = pack_from_dict(request)
print(result["status"])
for unpacked in result["unpacked_items"]:
    print(unpacked["item_id"], unpacked["reason"])