---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.kz/routing/doc/en/vrp/options-empty-run-before-full.md
  - https://yandex.kz/routing/doc/kk/vrp/options-empty-run-before-full.md
  - https://yandex.kz/routing/doc/ru/vrp/options-empty-run-before-full.md
  - href: en/vrp/options-empty-run-before-full.md
    type: text/markdown
    title: Markdown version
  - href: llms.txt
    type: text/markdown
    title: llms.txt
title: RouteQ — planning algorithm — penalties for underloaded runs
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.kz/routing/doc/en/llms.txt


# Penalty for underloaded runs {#empty-run-before-full}

To ensure that couriers prioritize runs with maximum load, use the penalty `options.penalty.empty_run_before_full.scaled`. This penalty is applied for each less-loaded run completed before a more heavily loaded run by the same courier. 

The penalty is calculated as follows: for each run, the maximum utilization (a value between 0 and 1) and the maximum utilization of subsequent runs are determined. The difference between these utilization rates is multiplied by the penalty amount. 

For example, the route has 3 runs. The courier delivered 10 units of cargo on the first run, 15 on the second, and 20 on the third. Vehicle capacity is 25 units. The third run has a maximum utilization of 20 units. The penalty is charged for the first and second runs.

[(20-10)/25 + (20-15)/25] * `options.penalty.empty_run_before_full.scaled`

If the same courier delivers 20 units of cargo on the first run, 10 on the second, and 15 on the third, a penalty will be charged only for the second run.

(15-10)/25 * `options.penalty.empty_run_before_full.scaled`

**Example 1**

The courier makes 3 runs. The first run has time windows before 12:00, while the second and third runs have time windows after 13:00. The cost of the courier service depends on the waiting time on the route, so after delivering early orders, the courier returns to the depot. 

Vehicle capacity is 25 units. The courier delivered 12 units of cargo on the first run, 16 on the second, and 20 on the third.

[API request (JSON)](https://courier.yandex.ru/vrs/api/v1/log/request/bd739d8b-a6acf000-55cf6fe-cb2d675f) ⋅ [API response](https://courier.yandex.ru/vrs/api/v1/result/bd739d8b-a6acf000-55cf6fe-cb2d675f) ⋅ [View on map](https://yandex.com/courier/mvrp-map#bd739d8b-a6acf000-55cf6fe-cb2d675f)

**Example 2**

The same as in Example 1, but the penalty is defined as `options.penalty.empty_run_before_full.scaled` = 10,000. On the first run, the courier continues to deliver early orders: 12 units of cargo. But on the second and third runs, the courier now delivers 18 units of cargo. The penalty `empty_run_before_full_penalty` is calculated for the first run only: 

(18−12) / 25 * 10000 = 2400

[API request (JSON)](https://courier.yandex.ru/vrs/api/v1/log/request/f8922c61-acd70bc6-a6772be8-6ee0fd35) ⋅ [API response](https://courier.yandex.ru/vrs/api/v1/result/f8922c61-acd70bc6-a6772be8-6ee0fd35) ⋅ [View on map](https://yandex.com/courier/mvrp-map#f8922c61-acd70bc6-a6772be8-6ee0fd35)

<!-- source: en/vrp/_includes/feedback.md -->
<a href="feedback">
  <span class="button">Contact support</span>
</a>


<!-- endsource: en/vrp/_includes/feedback.md -->
