The Case Study Innovations Logo
Contact Us
Packem Logo

Faster.Leaner.Smarter.

💡
Modify the input payload and click Run to send it to our live API. View the raw JSON result or see the generated visual packing layout.
The first run may be a bit slow — we're just warming up.
Quick guidance

This is a live connection to our Packem API. You can modify Request Input to test different configurations.

The Raw Request Output shows the structured JSON solution, while the Visual Request Output renders the packing layout.

1. Items and Bins

  • Items: Each item must have id, length, width, and height (double).
  • Bins: Each bin must have id, length, width, and height (double).
"items": [{"id": "I-001", "length": 5.0, "width": 4.0, "height": 3.0},{"id": "I-002", "length": 2.0, "width": 4.0, "height": 4.0}], "bins": [{"id": "B-001", "length": 10.0, "width": 10.0, "height": 10.0}]

2. Objectives

The objective (string) field controls what the packing algorithm tries to optimize. Support options:

  • minimise_bins: Use the smallest number of bins possible.
  • minimise_unused_space: Minimize empty space inside used bins.
  • maximise_items: Fit as many items as possible into limited bins.
  • minimise_bin_costs: Optimize packing to minimize total bin cost.
"objective": "maximise_items"

3. Constraints

The constraints (object) field defines the rules and restrictions the packing algorithm must follow.

3.1 Rotation

Field: rotation (boolean) determines if items are allowed to rotate. Enabling rotation allows the algorithm to turn items to better fit available space, often improving packing efficiency.

"rotation": true

3.2 Fragility

Field: fragility (array of item IDs) specifies which items are fragile. These items should not have items stacked on top of them, ensuring that delicate items are handled safely during packing.

"fragility": ["I-001", "I-003"]

3.3 Weight Distribution

Field: weight_distribution (object) controls how item weight is distributed within bins. It helps prevent overloading layers or creating unstable stacks that could affect bin stability. The subfields include: max_per_layer (double) which limits the total weight allowed per horizontal layer, footprint (double) which restricts the vertical load each cell or footprint can support, and center_of_gravity (boolean) which ensures that each item’s center of gravity is properly supported by the structure beneath it.

"weight_distribution": {
  "max_per_layer": 20.0,
  "footprint": 5.0,
  "center_of_gravity": true
}

3.4 Forbidden Adjacency

Field: forbidden_adjacency (array of item label pairs) defines which groups or categories of items cannot be placed together within the same bin. This is useful for separating incompatible or hazardous items, such as flammable materials from explosives.

"forbidden_adjacency": [["Alcohol", "Explosives"], ["Raw meat", "Fresh produce"]]

3.5 Maximum Bin Limit

Field: max_bin_limit (integer) sets an upper bound on the number of bins the algorithm is allowed to use.

"max_bin_limit": 2

3.6 Priority Items

Field: priority (array of item IDs) indicates items that should be packed first or given higher priority. This ensures that critical or high-value items are included in the final packing solution before others.

"priority": ["I-001"]

4. Extra Configuration

Additional parameters:

  • item_weights: Array of numbers representing weight of each item (used in weight_distribution).
  • bin_costs: Array of bin costs (used in minimise_bin_costs).
  • item_labels: Labels for items (used in forbidden_adjacency).
  • output: Optional object controlling PNG output (path, scale, dpi).
"extra": {
  "item_weights": [3, 1, 1],
  "bin_costs": [50, 48],
  "item_labels": ["Alcohol", "Explosives", "Other"],
  "output": {"path": "outputs/packem_result.png", "scale": 1, "dpi": 100}
}
Request Input
Request Output
// Raw output will appear here.
💡 Tap here to share feedback!

We use cookies to improve analytics, personalize content, and support ads. Choose your preferences below.

Analytics tracking
Personalized content
Targeted ads