Dokumentacija

Managing loads in the loading space

Multiple loads in the loading space

The example below shows a request for placing a variety of different loads inside the loading space.

Request:

    "loads": [
        {
           "quantity": 10,
           "name": "load 1",
           "length": 120,
           "width": 80,
           "height": 100,
           "weight": 100
        },
         {
           "quantity": 5,
           "name": "load 2",
           "length": 100,
           "width": 50,
           "height": 100,
           "weight": 500
        },
        {
           "quantity": 5,
           "name": "load 3",
           "length": 100,
           "width": 50,
           "height": 100,
           "weight": 500
        }
],
        "loadingSpaces": [
        {
            "quantity": 1,
            "name": "truck 2",
            "parts": [
                {
                    "length": 1300,
                    "width": 200,
                    "height": 200,
                    "limit": 24000
                }
            ]
        }
    ], 
  "options": {
            }
}

Result

Different load types

Goodloading supports 3 load types, defined by the “loadType” parameter:

  • 0 – cuboid load
  • 1 – barrel
  • 2 – pipe

For each of these load types, strictly defined rules govern how the load parameters supplied in the Request map to the parameters in the Response; these rules are tied to how the load is positioned in the space.

As already explained in the previous section, positioning loads within the loading space always refers to the coordinate system x, y, z, whose origin {x=0, y=0, z=0} is always located in the bottom left corner of the space, viewed from the rear.

integracja-rozne-typy-ladunkow

When optimizing the load plan, the algorithm may rotate loads, provided this is permitted. Load rotation is controlled by the following parameters:

  • allowToRotate – default value “true” – allows loads to be rotated about their base only, which applies to cuboids and pipes
  • rotateFreely – default value “false” – allows free rotation of cuboids only

For the parameters in the Response, the rule is always that the individual axes correspond to the following load parameters:

  • x – “width”,
  • y – “height”,
  • z – “length”,

In the Response, these parameter types apply to every load type, because even for pipes and barrels the algorithm always converts their input parameters into “width”, “height” and “length” as output parameters.

The following subsections provide detailed descriptions of all load types.

Cuboid load

Load type “loadType”: 0.
A cuboid load is defined in the Request by 3 spatial parameters:

  • “width”,
  • “height”,
  • “length”

Based on these parameters, the algorithm assigns the load its output parameters in the Response, following its own load-arranging rules – for example, that when loading from the rear, loads start from the bottom left corner next to the driver’s cab and the algorithm tries to fill the rows one after another, starting at the cab. In doing so, it takes into account the values of the parameters that permit load rotation. In the example below, in the Response the algorithm swapped “width” and “length”. It was allowed to do so because it had the default permission to rotate the load about its base.
In the example below, the space-related parameters have been highlighted in both the Request and the Response.

Request

{
  "loads": [
        {
           "quantity": 1,
           "name": "load 1",
           "length": 100,
           "width": 50,
           "height": 200,
           "weight": 500,
           "loadType": 0
        }
],
   "loadingSpaces": [
        {
           "quantity": 1,
            "name": "Bus 8 EP",
            "parts": [
                {
                    "length": 420,
                    "width": 220,
                    "height": 220,
                    "limit": 1500
                }
            ]
        }  
    ],  
  "options": {
            }
}

Response

{
    "loadingSpaces": [
        {
            "id": 1,
            "name": "Bus 8 EP",
            "parts": [
                {
                    "height": 220,
                    "length": 420,
                    "width": 220,
                    "limit": 1500,
                    "loads": [
                        {
                            "id": 1,
                            "allowToRotate": true,
                            "stacking": true,
                            "name": "load 1",
                            "loadType": 0,
                            "priority": 0,
                            "quantity": 1,
                            "width": 100,
                            "length": 50,
                            "height": 200,
                            "weight": 500,
                            "diameter": 0,
                            "origin": null,
                            "destination": null,
                            "pctSupport": 100,
                            "alongFloor": false,
                            "boxesBelowAllowed": [],
                            "color": 6989903,
                            "placement": [
                                {
                                    "height": 200,
                                    "length": 50,
                                    "width": 100,
                                    "diameter": 0,
                                    "loadsPerAxis": {
                                        "x": 1,
                                        "y": 1,
                                        "z": 1
                                    },
                                    "position": {
                                        "x": 0,
                                        "y": 0,
                                        "z": 0
                                    },
                                    "cubeId": 0
                                }
                            ]
                        }
                    ],
                    "loadingSide": "back",
                    "summary": {
                        "freeLdm": 370,
                        "occupiedLdm": 50,
                        "freeSurface": 8740000,
                        "occupiedSurface": 500000,
                        "freeVolume": 193280000000,
                        "occupiedVolume": 10000000000,
                        "percentLdmUsd": 11.904761904761903,
                        "percentVolumeUsd": 4.919323101141283,
                        "totalLoadsWeight": 500
                    },
                    "axis": []
                }
            ],
            "type": "vehicle"
        }
    ],
    "notFittedLoads": [],
    "options": {
        "allowOverweight": false,
        "unit": "cm",
        "keepLoadsTogether": false,
        "newAlgorithm": true,
        "arrangeOptimally": false,
        "loadingOrder": "default",
        "keepGroupsInGivenSpaces": false,
        "isMagnetOn": false,
        "multiStops": false,
        "includeSavedLoadingSpaces": false,
        "additionOrder": true,
        "userOrder": false,
        "volumeOrder": false,
        "weightOrder": false
    },
    "_links": [
        {
            "rel": "preview",
            "href": "https://goodloading-app.service.aws-eu-west-1.sdp.rc.goodloading.com/session?id=afeb3044-6b6a-41a7-83b3-999a45c299f8&pref=opt-names-opened"
        }
    ]
}
integracje-ladunek-szescienny

Barrel

Load type “loadType”: 1
A barrel is defined in the Request by 2 spatial parameters:

  • “diameter”
  • “height”

Based on these parameters, the algorithm assigns the load its output parameters in the Response, converting them into:

  • “width”,
  • “height”,
  • “length”

“width” and “length” represent the square bounding area enclosing the round base of the barrel.
Barrels are always placed upright only and are not subject to any rotation.
In the example below, in the Response the algorithm assigned both “width” and “length” the same value taken from “diameter”.
The space-related parameters have been highlighted in both the Request and the Response.

Request

{
  "loads": [
        {
           "quantity": 1,
           "name": "load 1",
           "height": 150,
           "diameter": 100,
           "weight": 50,
           "loadType": 1
        }
],
   "loadingSpaces": [
        {
           "quantity": 1,
            "name": "Bus 8 EP",
            "parts": [
                {
                    "length": 420,
                    "width": 220,
                    "height": 220,
                    "limit": 1500
                }
            ]
        }  
    ],  
  "options": {
            }
}

Response

{
    "loadingSpaces": [
        {
            "id": 1,
            "name": "Bus 8 EP",
            "parts": [
                {
                    "height": 220,
                    "length": 420,
                    "width": 220,
                    "limit": 1500,
                    "loads": [
                        {
                            "id": 1,
                            "allowToRotate": true,
                            "stacking": true,
                            "name": "load 1",
                            "loadType": 1,
                            "priority": 0,
                            "quantity": 1,
                            "width": 100,
                            "length": 100,
                            "height": 150,
                            "weight": 50,
                            "diameter": 100,
                            "origin": null,
                            "destination": null,
                            "pctSupport": 100,
                            "alongFloor": false,
                            "boxesBelowAllowed": [],
                            "color": 6989903,
                            "placement": [
                                {
                                    "height": 150,
                                    "length": 100,
                                    "width": 100,
                                    "diameter": 100,
                                    "loadsPerAxis": {
                                        "x": 1,
                                        "y": 1,
                                        "z": 1
                                    },
                                    "position": {
                                        "x": 0,
                                        "y": 0,
                                        "z": 0
                                    },
                                    "cubeId": 0
                                }
                            ]
                        }
                    ],
                    "loadingSide": "back",
                    "summary": {
                        "freeLdm": 320,
                        "occupiedLdm": 100,
                        "freeSurface": 8240000,
                        "occupiedSurface": 1000000,
                        "freeVolume": 188280000000,
                        "occupiedVolume": 15000000000,
                        "percentLdmUsd": 23.809523809523807,
                        "percentVolumeUsd": 7.378984651711924,
                        "totalLoadsWeight": 50
                    },
                    "axis": []
                }
            ],
            "type": "vehicle"
        }
    ],
    "notFittedLoads": [],
    "options": {
        "allowOverweight": false,
        "unit": "cm",
        "keepLoadsTogether": false,
        "newAlgorithm": true,
        "arrangeOptimally": false,
        "loadingOrder": "default",
        "keepGroupsInGivenSpaces": false,
        "isMagnetOn": false,
        "multiStops": false,
        "includeSavedLoadingSpaces": false,
        "additionOrder": true,
        "userOrder": false,
        "volumeOrder": false,
        "weightOrder": false
    },
    "_links": [
        {
            "rel": "preview",
            "href": "https://goodloading-app.service.aws-eu-west-1.sdp.rc.goodloading.com/session?id=9af9b644-027f-422e-9041-04cedc518b44&pref=opt-names-opened"
        }
    ]
}
integracje-beczka

Pipe

Load type “loadType”: 2
A pipe is defined in the Request by 2 spatial parameters:

  • “diameter”
  • “length”

Based on these parameters, the algorithm assigns the load its output parameters in the Response, converting them into:

  • “width”,
  • “height”,
  • “length”

Pipes cannot be stood upright; they can only be laid along the length or the width of the loading space. In the Response, whether a pipe is laid along the vehicle’s width or its length is distinguished by the values of the “width” and “length” parameters. The “height” parameter – always takes the value matching “diameter”.
Pipe orientation:

  • along the width of the space – “length” = 0, “width” >0
  • along the length of the space – “length” >0, “width” = 0

In the examples below, the space-related parameters have been highlighted in both the Request and the Response.

Example 1 

Pipe laid along the width of the vehicle

Request

 {
  "loads": [
        {
           "quantity": 1,
           "name": "load 1",
           "length": 150,
           "diameter": 100,
           "weight": 100,
           "loadType": 2
        }
         
],
        "loadingSpaces": [
        {
           "quantity": 1,
            "name": "Bus 8 EP",
            "parts": [
                {
                    "length": 420,
                    "width": 220,
                    "height": 220,
                    "limit": 1500
                }
            ]
        }  
    ],  
  "options": {
            }
}

Response

{
    "loadingSpaces": [
        {
            "id": 1,
            "name": "Bus 8 EP",
            "parts": [
                {
                    "height": 220,
                    "length": 420,
                    "width": 220,
                    "limit": 1500,
                    "loads": [
                        {
                            "id": 1,
                            "allowToRotate": true,
                            "stacking": true,
                            "name": "load 1",
                            "loadType": 2,
                            "priority": 0,
                            "quantity": 1,
                            "width": 150,
                            "length": 0,
                            "height": 100,
                            "weight": 100,
                            "diameter": 100,
                            "origin": null,
                            "destination": null,
                            "pctSupport": 100,
                            "alongFloor": false,
                            "boxesBelowAllowed": [],
                            "color": 6989903,
                            "placement": [
                                {
                                    "height": 100,
                                    "length": 0,
                                    "width": 150,
                                    "diameter": 100,
                                    "loadsPerAxis": {
                                        "x": 1,
                                        "y": 1,
                                        "z": 1
                                    },
                                    "position": {
                                        "x": 0,
                                        "y": 0,
                                        "z": 0
                                    },
                                    "cubeId": 0
                                }
                            ]
                        }
                    ],
                    "loadingSide": "back",
                    "summary": {
                        "freeLdm": 320,
                        "occupiedLdm": 100,
                        "freeSurface": 9240000,