---
metadata:
  - name: generator
    content: Diplodoc Platform v5.19.6
alternate:
  - https://docs.routeq.com/doc/en/vrp/planned-route.md
  - https://docs.routeq.com/doc/tr/vrp/planned-route.md
title: RouteQ — Possible logistics scenarios — additional planning (outdated version)
---
> **Documentation Index:** Fetch the complete configuration index at https://docs.routeq.com/doc/en/llms.txt


# Additional planning (outdated version)

Used for working with Excel templates or for getting familiarized with how additional planning works. This method is supported but no longer developed. If you want to automate additional planning tasks (when working via the API), we recommend using [regular additional planning](https://docs.routeq.com/doc/en/vrp/additional-planning.md).

## Fixed order sequence {#visited_locations}

To keep the order sequence, use the `vehicles.visited_locations` field. If new orders can get mixed with the existing ones randomly, use the `vehicles.planned_route` field. In `planned_route`, you can specify both orders and [depots for reloading](https://docs.routeq.com/doc/en/vrp/properties-of-vehicles-depot.md#visit-additional-depot) that the courier needs to visit when following the route. Set `is_middle_depot` = `true` for them.

The `planned_route` doesn't support [adding breaks](https://docs.routeq.com/doc/en/vrp/properties-of-vehicles-rest-schedule.md#rest-schedule). If you need to take into account the courier's work and rest schedule during additional planning, use the [regular additional planning](https://docs.routeq.com/doc/en/vrp/additional-planning.md) (`initial_routes`).

## Courier's current location {#courier-position}

If the courier is at the depot, you need to know the following to generate a request:

- What orders were already assigned to each vehicle.
- What new orders have been received since the last planning.

In the new request for additional planning per each vehicle, use the `planned_route` field (`visited_locations`) to specify the IDs (`locations` or `id`) for already assigned orders (from the previous planning iteration).

If the courier is en route, you need to know the following to generate a request:

- What orders were already assigned to each vehicle.
- Location of each vehicle at the time of additional planning (this may also be the last delivered or the next order in the sequence).
- List of already completed orders.
- What new orders have been received since the last planning.

In the new request for additional planning:

1. For each vehicle, use the `planned_route` field (`visited_locations`) to specify the IDs (`locations` or `id`) of already assigned orders (from the previous planning iteration), but **not completed at the time of additional planning**.

2. Add dummy orders to the list: these orders should correspond to the current location points for each vehicle. You can skip this step if the current location is the last order delivered or the next order in the sequence.

3. For each vehicle, specify the ID of its current location and the time of departure from it in the first element in the `visited_locations` field.

    To set the time of departure from the location, use the `planned_route.start_time` parameter (or `visited_locations.N.time`).

    Possible time formats:

    - Relative: [D.]HH[:MM[:SS]], where D is the date shift relative to the start date of the route.
    - absolute: ISO 8601 format (for example, `2018-09-06T10:15:00+03:00`).

    [Learn more about time formats](https://docs.routeq.com/doc/en/vrp/properties-of-time-window.md) 

    {% cut "Example" %}

    Here, departure from route location 1001 will be scheduled for 10:20.

    ```json
    "visited_locations": [
        {
            "id": "1001",
            "shift_id": "1",
            "time": "10:20"
        },
    ...
    ]
    ```

    {% endcut %}

    {% note info %}

    For previously unused vehicles, set the correct departure parameters: either shift the start time of the shift or specify the current depot location in `visited_locations`.

    {% endnote %}

4. From the list of orders, delete the already completed ones (consider item 2: if the last delivered order is used as the current location, don't delete it).

## Examples {#examples}

**Basic task**

The task includes 70 orders and 9 available couriers, the balanced groups option is used `balanced_groups`.

Get 5 couriers in the solution.

Planning result:

#|
||   **Courier** | **Number of orders** | **Order sequence**    ||
||   Courier 3 | 15 | 27, 70, 53, 64, 65, 40, 60, 4, 43, 28, 29, 49, 33, 56, 48   ||
||   Courier 4 | 13 | 45, 31, 58, 52, 24, 54, 39, 47, 19, 30, 44, 16, 63  ||
||   Courier 5 | 10 | 14, 41, 8, 10, 1, 12, 13, 22, 9, 46 ||
||   Courier 6 | 15 | 11, 3, 23, 51, 42, 55, 36, 68, 66, 61, 25, 7, 67, 57, 62    ||
||   Courier 7 | 17 | 18, 37, 38, 17, 2, 59, 35, 34, 32, 26, 20, 69, 5, 50, 15, 21, 6 ||
|#

[API request (JSON)](https://courier.yandex.ru/vrs/api/v1/log/request/25cdf71b-f0709b5e-151f2b11-977c81f2) ⋅ [API response](https://courier.yandex.ru/vrs/api/v1/result/25cdf71b-f0709b5e-151f2b11-977c81f2) ⋅ [View on map](https://yandex.com/courier/mvrp-map#25cdf71b-f0709b5e-151f2b11-977c81f2)

Now let's look at the methods of additional planning for the basic task.

**Example 1**

Additional planning at the depot, **changing** the order sequence in  the routes.

In the request, enter 110 orders (40 of them are new compared to the basic task) and 9 available couriers. For 5 couriers, specify the allocation from the basic task in `planned_route`. Also, use the balanced group option `balanced_groups`.

Get 7 couriers in the solution.

Planning result:

#|
||   **Courier** | **Number of orders** | **Sequence of orders relative to the basic task**    ||
||   Courier 1 | 14 | New route   ||
||   Courier 3 | 19 | 4 orders added:
27, 70, 53, 64, 65, 40, **99**, 60, 4, 43, 28, **95**, 29, 49, 33, 56, **88**, 48, **84** ||
||   Courier 4 | 16 | 3 orders added:
45, 31, 58, 52, **87**, 24, 54, 39, **100**, 47, 19, 30, 44, 16, **102**, 63  ||
||   Courier 5 | 13 | 3 orders added, sequence significantly changed:
_46_, **80**, **71**, _12_, 1, _10_, _8_, _41_, **83**, _14_, 13, 22, 9    ||
||   Courier 6 | 17 | 2 orders added:
11, 3, 23, **79**, 51, 42, 55, 36, 68, 66, 61, 25, 7, **108**, 67, 57, 62 ||
||   Courier 7 | 18 | 1 order added:
18, 37, 38, 17, 2, 59, 35, 34, 32, 26, 20, 69, **104**, 5, 50, 15, 21, 6 ||
||   Courier 9 | 13 | New route   ||
|#

{% note info %}

Orders planned in the basic task are still assigned to the same couriers, but:

- For the couriers from the basic solution, new orders are added **among other points on the route**.

- For the couriers from the basic solution, the order sequence planned earlier is changed.

- 2 new routes are added.

{% endnote %}


[API request (JSON)](https://courier.yandex.ru/vrs/api/v1/log/request/645e497-d6f41786-e08a69e7-6ed7b3ce) ⋅ [API response](https://courier.yandex.ru/vrs/api/v1/result/645e497-d6f41786-e08a69e7-6ed7b3ce) ⋅ [View on map](https://yandex.com/courier/mvrp-map#645e497-d6f41786-e08a69e7-6ed7b3ce)

**Example 2**

Additional planning at the depot, **without changing** the order sequence in the routes.

In the request, enter 110 orders (40 of them are new compared to the basic task) and 9 available couriers. For 5 couriers, specify the assignment from the basic task in `visited_locations`. Also, use the balanced group option `balanced_groups`.

Get 7 couriers in the solution.

Planning result:

#|
||   **Courier** | **Number of orders** | **Sequence of orders relative to the basic task**    ||
||   Courier 3 | 19 | 4 orders added:
27, 70, 53, 64, 65, 40, 60, 4, 43, 28, 29, 49, 33, 56, 48, **84**, **88**, **96**, **85**  ||
||   Courier 4 | 15 | 2 orders added:
45, 31, 58, 52, 24, 54, 39, 47, 19, 30, 44, 16, 63, **102**, **89**    ||
||   Courier 5 | 14 | 4 orders added:
14, 41, 8, 10, 1, 12, 13, 22, 9, 46, **80**, **71**, **79**, **108**  ||
||   Courier 6 | 15 | Route without changes:
11, 3, 23, 51, 42, 55, 36, 68, 66, 61, 25, 7, 67, 57, 62 ||
||   Courier 7 | 17 | Route without changes:
18, 37, 38, 17, 2, 59, 35, 34, 32, 26, 20, 69, 5, 50, 15, 21, 6 ||
||   Courier 8 | 14 | New route   ||
||   Courier 9 | 16 | New route   ||
|#

{% note info %}

Orders planned in the basic task are still assigned to the same couriers, but:

- For the couriers from the basic solution, new orders were added **to the end of the route**.

- 2 new routes are added.

{% endnote %}


[API request (JSON)](https://courier.yandex.ru/vrs/api/v1/log/request/bc499a50-30a9cb8-d12cd951-c06d6e39) ⋅ [API response](https://courier.yandex.ru/vrs/api/v1/result/bc499a50-30a9cb8-d12cd951-c06d6e39) ⋅ [View on map](https://yandex.com/courier/mvrp-map#bc499a50-30a9cb8-d12cd951-c06d6e39)

**Example 3**

Additional planning when couriers have already departed from the depot (**without changing** the sequence of orders in the routes).

At the time of planning, assume that 15 orders were delivered (3 orders for each of the 5 couriers from the basic task), and delete them from the additional planning task.

In total, enter 100 orders in the request (40 new orders, 55 non-delivered orders from the basic task, and 5 courier start points), and 9 available couriers. For 5 couriers, specify the assignment from the basic task in `visited_locations`. Also, use the balanced group option `balanced_groups`.

Get 8 couriers in the solution (3 of them are new couriers who start from the depot).

Planning result:

#|
||   **Courier** | **Number of orders*** | **Sequence of orders relative to the basic task**   ||
||   Courier 2 | 9 | New route    ||
||   Courier 3 | 13 | Route without changes:
_27, 70, 53 (completed orders)_, 1003 (start point), 64, 65, 40, 60, 4, 43, 28, 29, 49, 33, 56, 48   ||
||   Courier 4 | 11 | 1 order added:
_45, 31, 58 (completed orders)_, 1004 (start point), 52, 24, 54, 39, 47, 19, 30, 44, 16, 63, **101**  ||
||   Courier 5 | 10 | 3 order added:
_14, 41, 8 (completed orders)_, 1005 (start point), 10, 1, 12, 13, 22, 9, 46, **80**, **71**, **79**    ||
||   Courier 6 | 13 | 1 order added:
_11, 3, 23 (completed orders)_, 1006 (start point), 51, 42, 55, 36, 68, 66, 61, 25, 7, 67, 57, 62, **108**    ||
||   Courier 7 | 14 | Route without changes:
_18, 37, 38 (completed orders)_, 1007 (start point), 17, 2, 59, 35, 34, 32, 26, 20, 69, 5, 50, 15, 21, 6 ||
||   Courier 8 | 12 | New route   ||
||   Courier 9 | 13 | New route   ||
|#

\*: without the delivered orders and start point.

{% note info %}

In this solution, all the couriers start at 11:00, and new orders are added to the end of the route.

{% endnote %}

[API request (JSON)](https://courier.yandex.ru/vrs/api/v1/log/request/c1917443-8971f40a-35df0fac-e3541fa3) ⋅ [API response](https://courier.yandex.ru/vrs/api/v1/result/c1917443-8971f40a-35df0fac-e3541fa3) ⋅ [View on map](https://yandex.com/courier/mvrp-map#c1917443-8971f40a-35df0fac-e3541fa3)

{% include [warehouse-feedback](_includes/feedback-81845556eeea.md) %}
