Throughput
To ensure that vehicles arrive at the order location or depot at different times, restrict their throughput capacity and assign penalties for violations.
Warning
Note: we don't recommend doing that both for orders and depots at the same time — this will help you track your set restrictions and penalties more accurately.
-
On the Options sheet, in the
points_throughputs.N.point.lat(options.points_throughputs.point.latin the API) andpoints_throughputs.N.point.lon(options.points_throughputs.point.lon) fields, specify the coordinates of the order location whose throughput capacity you want to restrict.You can specify the coordinates of multiple orders of any type.
-
Define the restriction type and value using one of the following parameters:
points_throughputs.N.throughput.kg_per_hour(options.points_throughputs.throughput.kg_per_hourin the API): Order throughput capacity in kg/h.points_throughputs.N.throughput.units_per_hour(options.points_throughputs.throughput.units_per_hour): In cargo units per hour (pallets, boxes, kegs).points_throughputs.N.throughput.vehicle_count(options.points_throughputs.throughput.vehicle_count): In vehicles per hour.
Note
You can set only one restriction for each order.
-
Set the penalty for violating visiting conditions in
points_throughputs.N.penalty.throughput(options.points_throughputs.penalty.throughput), where:fixed: Penalty for throughput capacity violation.kg: For each additional kilogram.unit: For each additional cargo unit.vehicle: For each additional vehicle during loading or unloading.
You can set the depot throughput capacity using the depot.throughput parameter. For more information, see Depot throughput capacity.
Example 1
Two couriers deliver orders to the same customer. Both vehicles are scheduled to unload at around the same time.
API request (JSON) ⋅ API response ⋅ View on map
Example 2
The conditions are the same as in Example 1, but with a throughput capacity restriction at the customer's address — maximum one vehicle per hour.
As a result of planning, total mileage went up slightly, and the unloading time slots no longer overlap.
API request (JSON) ⋅ API response ⋅ View on map
Example 3
Two couriers are delivering 12 orders. No throughput capacity restrictions have been set for any of the orders.
As a result of planning, all orders are evenly distributed among the couriers. Penalties for violating visiting conditions are not applied.
API request (JSON) ⋅ API response ⋅ View on map
Example 4
The conditions are the same as in example 3, but:
-
Order 1 coordinates match the depot coordinates.
-
On the Options sheet, the following are specified for order 1:
-
Throughput capacity restriction:
points_throughputs.0.throughput.vehicle_count= 1. -
Penalties for violating visiting conditions:
points_throughputs.0.penalty.throughput.fixed= 10,000.points_throughputs.0.penalty.throughput.vehicle= 10,000.
-
Couriers start their routes from the depot.
As a result of planning, the throughput capacity restriction for order 1 is violated. Since its coordinates match the depot, the penalty for violating visiting conditions appears in the result.metrics._tasks_summary.metrics.total_depot_penalty field of the API response and is calculated using the formula:
points_throughputs.0.penalty.throughput.fixed + result.metrics._tasks_summary.metrics.depot_throughput_violation_vehicles * points_throughputs.0.penalty.throughput.vehicle = 10,000 + 1/2 * 10,000 = 15,000, where:
-
result.metrics._tasks_summary.metrics.depot_throughput_violation_vehiclesis the time share during which couriers who violate visiting conditions are simultaneously at the depot.In this example, Service duration at start of route on the Depot sheet (depot.service_duration_s in the API request) was 1800 seconds. The couriers started their routes from the depot and were at the depot simultaneously for 1800 seconds (30 minutes). The
result.metrics._tasks_summary.metrics.depot_throughput_violation_vehiclestime share was half an hour, or 1/2.
API request (JSON) ⋅ API response ⋅ View on map
Example 5
The conditions are the same as in example 3, but:
-
Couriers start their routes from order 1 with the type
garage. -
On the Options sheet, the following parameters are specified for it:
-
Throughput capacity restriction:
points_throughputs.0.throughput.vehicle_count= 1. -
Penalties for violating visiting conditions:
points_throughputs.0.penalty.throughput.fixed= 10,000.points_throughputs.0.penalty.throughput.vehicle= 10,000.
-
As a result of planning, the throughput capacity restriction for order 1 is violated. In the API response, the penalty for violating visiting conditions is displayed in the result.metrics._tasks_summary.metrics.total_depot_penalty field and is calculated using the same formula as in Example 4.
On the Orders sheet, the handling time for order 1 service_duration_s (locations.service_duration_s in the API request) was 1800 seconds. The couriers started their routes from order 1 and were simultaneously at its address for 1800 seconds (30 minutes). The result.metrics._tasks_summary.metrics.depot_throughput_violation_vehicles time share was half an hour, or 1/2.
Then result.metrics._tasks_summary.metrics.total_depot_penalty = 10,000 + 1/2 * 10,000 = 15,000.
API request (JSON) ⋅ API response ⋅ View on map