Documentation

Last update: June 16, 2024

cylinderPack

Efficiently pack cylindrical items using multiple bin sizes.

cylinderPack provides detailed information per item in each bin, such as where to place it. In contrast to packToMixedBins, cylinderPack only accepts cylindrical items. The cylinders will be packed using a combination of different bin sizes, aiming to reduce the total packing volume or the total required bins.


Connectivity

URL https://www.packing-optimizer.com/api/cylinderPack
Method POST

Headers

Authorization Basic-Auth
API credentials as found on your Account Settings page.
Content-Type application/json

Query string options

Optional
includeBins If false, the individual bins will not be included in the response and only header information will be transmitted.
Default: true
Options: true or false
Example: api/cylinderPack?includeBins=false
includeItems If false, the individual item information per bin will not be included in the response.
Default: true
Options: true or false
Example: api/cylinderPack?includeItems=false
responsePrecision Sets the decimal precision of the response body.
Default: 3
Example: api/cylinderPack?responsePrecision=5

Request body

Bins

Information about the bin that will be used for packing.

Information: A bin can either be a cylinder, or a cube. If your bin is a cube, the diameter should be omitted. If your bin is a cylinder, the width and depth should be omitted.
Field Type Description
bins[].type string Type of bin that is used for packing.
Example: pallet
bins[].width numeric Width of the bin.
Example: 1.2
bins[].depth numeric Depth of the bin.
Example: 0.80
bins[].height numeric Height of the bin.
Example: 1.65
bins[].diameter numeric The diameter of the bin.
Example: 1.5
bins[].maxWeight numeric Max weight that a single bin can carry.
Example: 1500
bins[].nrOfAvailableBins numeric Optional The number of times this bin can be used.
Default: unlimited
Example: 3
bins[].itemLimit numeric Optional Maximum number of items that a bin is allowed to fit.
Default: unlimited
Example: 5
bins[].maxValue numeric Optional Maximum value that a bin is allowed to contain.
Default: unlimited
Example: 1000
bins[].packingPattern string Optional The pattern that will be used to place items onto the bin.
Default: optimized
Options: optimized, spiral, bottomUp, insideOut
bins[].cost numeric Optional The cost of using this bin.
Default: 0
Example: 1000
Distributor
Optional

Provide guidance on how items should be distributed among bins.

Field Type Description
bins[].distributor.attribute string Indicate based on which attribute the items should be distributed.
Default: none
Example: itemCount
Options:
itemCount The bin aims to meet or exceed the desired number of items as set by the threshold.
bins[].distributor.threshold numeric The threshold that is desired to be reached.
Default: none
Example: 10
bins[].distributor.strict bool If true, the threshold is not just desired, but it is strictly enforced. Meaning that bins that do not meet the threshold will be considered invalid.
Default: false
Example: true

Items

Information about the items that have to be packed.

Field Type Description
items[].id string id to identify individual items.
Example: ITEM001
items[].height numeric Height of the item.
Example: 0.65
items[].diameter numeric The diameter of the item.
Example: 0.20
items[].margin numeric A margin that must be between this item and another item.
This can be used if items are not allowed to be too tightly packed.
Example: 0.05
items[].weight numeric Weight of the item.
Example: 10
items[].value numeric Optional The value of the item.
Default: 0
Example: 10
items[].consolidationKey string Optional Items with the same consolidation key will be separated from the other items and grouped in their own bin. Items with different consolidation key values will never be grouped in the same bin. Items with no key will group together by default.
Default:  None
Example: customerX
items[].stackingKey string Optional Only items with the same stacking key are allowed to be stacked on top of each other.
Default:  None
Example: productTypeA

Config

Optional

Additional parameters that influence packing behaviour.

Field Type Description
config.minimizationStrategy string Determines which value should be minimized during packing.
If bins, the number of required bins will be minimized.
If cost, the total cost of the bins used will be minimized.
If volume, the total bin volume will be minimized.
Default: volume
Options: volume, bins, or cost

{
    "bins": [{
            "type": "pallet-small",
            "width": 1,
            "depth": 1,
            "height": 0.3,
            "maxWeight": 1500
        },
        {
            "type": "cylinder-small",
            "diameter": 1,
            "height": 0.4,
            "maxWeight": 1500
        }
    ],
    "items": [{
            "id": "cylinder-XL",
            "diameter": 0.9,
            "height": 0.2,
            "weight": 10,
            "stackingKey": "productTypeA"
        },
        {
            "id": "cylinder-L",
            "diameter": 0.6,
            "height": 0.2,
            "weight": 10
        },
        {
            "id": "cylinder-M",
            "diameter": 0.4,
            "height": 0.2,
            "weight": 10,
            "stackingKey": "productTypeA"
        },
        {
            "id": "cylinder-S",
            "diameter": 0.2,
            "height": 0.2,
            "weight": 10
        }
    ],
    "config": {
        "minimizationStrategy": "volume"
    }
}

Response body

The packing response body follows a certain hierarchy, this hierarchy can be categorized in 3 sections.

  1. Header information - These details reason across all the bins that have been packed.
  2. Bin information - These details are about a particular bin that has been packed.
  3. Item information - These are details about a particular item. Items are nested inside bins.

Header

Contains header information about the complete packing request.

Field Type Description
requiredNrOfBins numeric The total number of bins it requires to pack all items.
totalVolumeUtil numeric The total volume utilization in percentage points.
totalWeightUtil numeric The total weight utilization in percentage points.
totalCost numeric The total cost of the packed bins, only relevant if cost is used.
unfittedItems[] array Array of items that did not fit. Items in this array have the same attributes as items in packedBins[].fittedItems[].

PackedBins

Contains information about each bin that has been packed.

Field Type Description
packedBins[] array Contains the bins that have been packed.
packedBins[].id numeric Incrementing counter starting from 1. Generated by Packing Optimizer.
packedBins[].type string The type of bin as provided by the caller in the request body.
packedBins[].width numeric The maximum width of the bin as provided by the caller in the request body.
packedBins[].depth numeric The maximum depth of the bin as provided by the caller in the request body.
packedBins[].height numeric The maximum height of the bin as provided by the caller in the request body.
packedBins[].diameter numeric The diameter of the bin as provided by the caller in the request body.
packedBins[].maxVolume numeric The maximum volume of the bin.
packedBins[].actualVolume numeric Total volume of the items packed in the bin.
packedBins[].actualVolumeUtil numeric actualVolume expressed in percentage points relative to the maxVolume attribute.
packedBins[].maxWeight numeric The maximum weight of the bin as provided by the caller in the request body.
packedBins[].actualWeight numeric Total weight of the items packed in the bin.
packedBins[].actualWeightUtil numeric actualWeight expressed in percentage points relative to the maxWeight attribute.
packedBins[].value numeric Total value of the items packed in the bin.
packedBins[].maxValue numeric The maximum value of the bin as provided by the caller in the request body.
packedBins[].cost numeric The cost of this bin as provided by the caller in the request body.
packedBins[].costPerPackedVolumeUnit numeric The cost it takes to pack one volume unit.
This is equal to cost divided by actualVolume.
packedBins[].nrOfItems numeric The total number of items packed inside the bin.

FittedItems

Contains information about each item that has been packed in the bin.

Field Type Description
packedBins[].fittedItems[] array Contains the items inside the bin.
packedBins[].fittedItems[].id string Item identifier as provided by the caller in the request body.
packedBins[].fittedItems[].diameter numeric The diameter of the item.
packedBins[].fittedItems[].height numeric Height of the item.
packedBins[].fittedItems[].weight numeric Weight of the item.
packedBins[].fittedItems[].volume numeric Volume of the item.
packedBins[].fittedItems[].value numeric Value of the item.
packedBins[].fittedItems[].consolidationKey string Item consolidation key used during packing.
packedBins[].fittedItems[].stackingKey string The stacking key used during packing.
packedBins[].fittedItems[].xCoordinate numeric X coordinate of the item inside the bin.
packedBins[].fittedItems[].yCoordinate numeric Y coordinate of the item inside the bin.
packedBins[].fittedItems[].zCoordinate numeric Z coordinate of the item inside the bin.
packedBins[].fittedItems[].margin numeric The margin that was taken into account while placing the item.

{
    "packedBins": [
        {
            "actualVolume": 0.1523672,
            "actualVolumeUtil": 48.5,
            "actualWeight": 20.0,
            "actualWeightUtil": 1.333333,
            "diameter": 1,
            "fittedItems": [
                {
                    "diameter": 0.9,
                    "height": 0.2,
                    "id": "cylinder-XL",
                    "margin": 0.0,
                    "stackingKey": "productTypeA",
                    "volume": 0.1272345,
                    "weight": 10.0,
                    "xCoordinate": 0.5,
                    "yCoordinate": 0.45,
                    "zCoordinate": 0.0
                },
                {
                    "diameter": 0.4,
                    "height": 0.2,
                    "id": "cylinder-M",
                    "margin": 0.0,
                    "stackingKey": "productTypeA",
                    "volume": 0.02513274,
                    "weight": 10.0,
                    "xCoordinate": 0.5,
                    "yCoordinate": 0.45,
                    "zCoordinate": 0.2
                }
            ],
            "height": 0.4,
            "id": 1,
            "maxVolume": 0.3141593,
            "maxWeight": 1500.0,
            "nrOfItems": 2,
            "type": "cylinder-small"
        },
        {
            "actualVolume": 0.06283185,
            "actualVolumeUtil": 20.94395,
            "actualWeight": 20.0,
            "actualWeightUtil": 1.333333,
            "depth": 1.0,
            "fittedItems": [
                {
                    "diameter": 0.6,
                    "height": 0.2,
                    "id": "cylinder-L",
                    "margin": 0.0,
                    "volume": 0.05654867,
                    "weight": 10.0,
                    "xCoordinate": 0.3,
                    "yCoordinate": 0.3,
                    "zCoordinate": 0.0
                },
                {
                    "diameter": 0.2,
                    "height": 0.2,
                    "id": "cylinder-S",
                    "margin": 0.0,
                    "volume": 0.006283185,
                    "weight": 10.0,
                    "xCoordinate": 0.6498479,
                    "yCoordinate": 0.1060762,
                    "zCoordinate": 0.0
                }
            ],
            "height": 0.3,
            "id": 2,
            "maxVolume": 0.3,
            "maxWeight": 1500.0,
            "nrOfItems": 2,
            "type": "pallet-small",
            "width": 1.0
        }
    ],
    "requiredNrOfBins": 2,
    "totalVolumeUtil": 35.03962,
    "totalWeightUtil": 1.333333
}