capacity_metric
capacity_metric
objects define how quantities of goods are measured. They allow work to be planned using the measure of quantity that best fits your business.
Name | Type | Description |
---|---|---|
id | id | A unique capacity metric ID. |
load_time | timespan | Optional. The time required to load goods that constitute one unit of this metric. Default is 00:00. |
name | string | Optional. The display name for the capacity metric. |
unload_time | timespan | Optional. The time required to unload goods that constitute one unit of this metric. Default is 00:00. |
For example, if your goods are packed onto standard sized pallets you could define a "pallet" capacity_metric
to specify load requirements. When a "pallet" capacity_metric
is defined
the optimizer can use the value to account for unloading time, and to ensure the goods will fit into the delivery vehicle. If a weight metric is defined, the optimizer
can ensure the maximum weight of the vehicle is not exceeded.
Example
{
"capacity_metrics": [
{ "id": "pallet", "name": "Pallets", "unload_time": "00:10" },
{ "id": "weight", "name": "Weight (kg)" }
],
"jobs": [
{ "id": "job0", "location": "39.635928, -105.049219", "loads": [{ "metric": "weight", "amount": 20 }, { "metric": "pallet", "amount": 1 }] },
{ "id": "job1", "location": "39.635928, -105.049219", "loads": [{ "metric": "weight", "amount": 80 }, { "metric": "pallet", "amount": 2 }] },
{ "id": "job2", "location": "39.708990, -105.026954", "loads": [{ "metric": "weight", "amount": 60 }, { "metric": "pallet", "amount": 2 }] }
],
"routes": [
{
"id": "route0",
"location": "39.718005, -104.969531",
"load_capacities": [
{ "metric": "weight", "amount": 100 },
{ "metric": "pallet", "amount": 5 }
]
}
]
}
In this example the optimizer will assign job0
and job2
to route0
. job1
is not assigned to route0
, as this would exceed the vehicle's maximum weight. The unloading time corresponding to
each pallet will be added to the planned time on site for each stop.
Download the problem here. Click here to open it in the UI.
See Also
- Routing with Capacities.
- The load_amount.metric field.