Adds a task

Creates a new MVRP task. Use "GET /api/v1/vrs/result/mvrp/<task_id>" to get task status.

Request

POST

https://courier.yandex.ru/api/v1/vrs/add/mvrp

Query parameters

Name

Description

company_id

Type: integer<int64>

Task company id.

lang

Type: string

Response locale in RFC-3066 format.

parent_task_id

Type: string

Parent task id.

taxi_types

Type: string<list_of_taxi_types>

Comma-separated list of taxi types that would be used for routing (e.g. van,lcv_m). Available types are van, lcv_m, lcv_l, express, courier.

Body

application/json
{
    "depot": {
        "id": 0,
        "preset_id": "string",
        "ref": "string",
        "point": {
            "lat": 0,
            "lon": 0
        },
        "service_duration_s": 0,
        "hard_window": false,
        "title": "string",
        "description": "string",
        "address": "string",
        "time_window": "string",
        "hard_time_window": "string",
        "time_windows": [
            {
                "time_window": "string",
                "hard_time_window": "string"
            }
        ],
        "type": "depot",
        "flexible_start_time": false,
        "crossdock_safety_waiting_duration_s": 3600,
        "finish_service_duration_s": 0,
        "preliminary_service_duration_s": 0,
        "time_windows_loading": {
            "time_window": "string",
            "hard_time_window": "string",
            "time_windows": [
                {
                    "time_window": "string",
                    "hard_time_window": "string"
                }
            ]
        },
        "time_windows_refilling": {
            "time_window": "string",
            "hard_time_window": "string",
            "time_windows": [
                {
                    "time_window": "string",
                    "hard_time_window": "string"
                }
            ]
        },
        "time_windows_unloading": {
            "time_window": "string",
            "hard_time_window": "string",
            "time_windows": [
                {
                    "time_window": "string",
                    "hard_time_window": "string"
                }
            ]
        },
        "package_throughput": {
            "kg_per_hour": 0,
            "units_per_hour": 0
        },
        "throughput": {
            "kg_per_hour": 0,
            "units_per_hour": 0,
            "vehicle_count": [
                {
                    "time_window": "string",
                    "value": 0
                }
            ]
        },
        "penalty": {
            "package_throughput": {
                "fixed": 1000,
                "kg": 50,
                "unit": 100
            },
            "throughput": {
                "fixed": 1000,
                "kg": 50,
                "unit": 100,
                "vehicle": 100000
            },
            "late": {
                "fixed": 1000,
                "minute": 17
            },
            "early": {
                "fixed": 1000,
                "minute": 17
            },
            "out_of_time": {
                "fixed": 1000,
                "minute": 17
            }
        }
    },
    "locations": [
        {
            "id": 0,
            "ref": "string",
            "preset_id": "string",
            "point": {
                "lat": 0,
                "lon": 0
            },
            "service_duration_s": 0,
            "hard_window": false,
            "title": "string",
            "description": "string",
            "address": "string",
            "time_window": "string",
            "hard_time_window": "string",
            "time_windows": [
                {
                    "time_window": "string",
                    "hard_time_window": "string"
                }
            ],
            "shared_service_duration_s": 0,
            "client_service_duration_s": 0,
            "parking_service_duration_s": 0,
            "depot_duration_s": 0,
            "crossdock_service_duration_s": 0,
            "required_tags": [
                "string"
            ],
            "optional_tags": [
                {
                    "tag": "string",
                    "value": 0
                }
            ],
            "load_types": [
                "string"
            ],
            "type": "depot",
            "crossdock_mode": "deny",
            "may_drop_in_crossdock": true,
            "client_id": 0,
            "delivery_to": 0,
            "delivery_to_any": [
                0,
                "string"
            ],
            "phone": "string",
            "shared_with_company_ids": [
                0
            ],
            "depot_ready_time": "string",
            "depot_expiring_time": "string",
            "delivery_deadline": "string",
            "comments": "string",
            "use_in_proximity": true,
            "allow_trailers": false,
            "max_total_vehicles": 0,
            "sequence_order": 0,
            "in_lifo_order": false,
            "pickup_from_any": false,
            "depot_id": [
                0,
                "string"
            ],
            "custom_value": 0,
            "transit_time": {
                "limit_s": 0,
                "hard_limit_s": 0
            },
            "shipment_size": {
                "weight_kg": 0,
                "units": 0,
                "volume_cbm": 0,
                "custom": 0,
                "volume": {
                    "align": "all_axes",
                    "depth_m": 0,
                    "height_m": 0,
                    "type": "bulk",
                    "width_m": 0
                }
            },
            "penalty": {
                "transit_time": {},
                "drop": 1000000,
                "delivery_deadline": {
                    "fixed": 1000,
                    "minute": 17
                },
                "late": {
                    "fixed": 1000,
                    "minute": 17
                },
                "early": {
                    "fixed": 1000,
                    "minute": 17
                },
                "out_of_time": {
                    "fixed": 1000,
                    "minute": 17
                }
            }
        }
    ],
    "zones": [
        {
            "id": "string",
            "geometry": {
                "coordinates": [
                    [
                        [
                            0
                        ]
                    ]
                ],
                "type": "string"
            }
        }
    ],
    "options": {
        "preset_id": "string",
        "quality": "low",
        "date": "string",
        "time_zone": 0,
        "absolute_time": false,
        "routing_mode": "driving",
        "weighted_drop_penalty": false,
        "restart_on_drop": false,
        "minimize_lateness_risk": false,
        "penalize_late_service": false,
        "ignore_min_stops_for_unused": false,
        "ignore_zones": false,
        "post_optimization": false,
        "load_when_ready": false,
        "critical_lateness_risk_probability": 20,
        "matrix_router": "main",
        "incompatible_load_types": [
            [
                "string"
            ]
        ],
        "incompatible_zones": [
            [
                "string"
            ]
        ],
        "proximity_factor": 0,
        "global_proximity_factor": 0,
        "max_drop_penalty_percentage": 100,
        "merge_multiorders": false,
        "wait_in_multiorders": true,
        "balanced_groups": [
            {
                "id": "string",
                "penalty": {
                    "hour": 200,
                    "stop": 100
                }
            }
        ],
        "points_throughputs": [
            {
                "throughput": {
                    "kg_per_hour": 0,
                    "units_per_hour": 0,
                    "vehicle_count": [
                        {
                            "time_window": "string",
                            "value": 0
                        }
                    ]
                },
                "penalty": {
                    "throughput": {
                        "fixed": 1000,
                        "kg": 50,
                        "unit": 100,
                        "vehicle": 100000
                    }
                },
                "point": {
                    "lat": 0,
                    "lon": 0
                }
            }
        ],
        "location_groups": [
            {
                "location_ids": [
                    0,
                    "string"
                ],
                "title": "string",
                "solid": false,
                "dependent": false
            }
        ],
        "avoid_tolls": false,
        "fix_planned_shifts": false,
        "template_rest_schedules": [
            {
                "breaks": [
                    {
                        "work_time_range_till_rest": "string",
                        "work_time_range_from_start": "string",
                        "continuous_travel_time_range": "string",
                        "travel_time_range": "string",
                        "rest_duration_s": 0,
                        "route_duration_s": 0,
                        "necessary_route_duration_s": 0,
                        "type": "string",
                        "before_first_location": false,
                        "after_last_location": false,
                        "merge_with_types": [
                            "string"
                        ],
                        "repeatable": false,
                        "penalty": {
                            "early": {
                                "fixed": 1000,
                                "minute": 17
                            },
                            "late": {
                                "fixed": 1000,
                                "minute": 17
                            }
                        }
                    }
                ],
                "id": "string"
            }
        ],
        "enable_vehicle_classes": true,
        "close_locations_during_post_optimization_only": false,
        "penalty": {
            "multiorders": {
                "per_extra_point": 0,
                "per_extra_vehicle": 0,
                "per_extra_visit": 0
            },
            "drop_penalty_percentage": {
                "fixed": 1000,
                "per_percent": 50
            }
        }
    },
    "vehicles": [
        {
            "id": 0,
            "preset_id": "string",
            "depot_id": [
                0,
                "string"
            ],
            "starting_depot_id": [
                0,
                "string"
            ],
            "ending_depot_id": [
                0,
                "string"
            ],
            "middle_depot_id": [
                0,
                "string"
            ],
            "cost": {
                "fixed": 3000,
                "run": 0,
                "hour": 100,
                "km": 8,
                "tonne_km": 0,
                "location": 0
            },
            "ref": "string",
            "visited_locations": [
                {
                    "id": 0,
                    "shift_id": "string",
                    "wait_if_early": true,
                    "delivered_orders": [
                        0,
                        "string"
                    ],
                    "picked_orders": [
                        0,
                        "string"
                    ],
                    "is_middle_depot": false,
                    "anchor_mode": "Decoupling",
                    "time": "string"
                }
            ],
            "fixed_work_breaks": [
                {
                    "work_duration_s": 0,
                    "shift_id": "string"
                }
            ],
            "tags": [
                "string"
            ],
            "excluded_tags": [
                "string"
            ],
            "allowed_zones": [
                "string"
            ],
            "forbidden_zones": [
                "string"
            ],
            "incompatible_load_types": [
                [
                    "string"
                ]
            ],
            "crossdock_mode": "deny",
            "visit_depot_at_start": true,
            "allow_different_depots_in_route": false,
            "return_to_depot": true,
            "start_at": 0,
            "finish_at": 0,
            "global_proximity_attraction_point": 0,
            "shifts": [
                {
                    "id": "string",
                    "preset_id": "string",
                    "balanced_group_id": "string",
                    "time_window": "string",
                    "hard_time_window": "string",
                    "max_duration_s": 172800,
                    "hard_max_duration_s": 2592000,
                    "max_mileage_km": 0,
                    "hard_window": false,
                    "service_duration_s": 0,
                    "minimal_stops": 0,
                    "minimal_unique_stops": 0,
                    "maximal_stops": 0,
                    "max_runs": 1,
                    "penalty": {
                        "max_mileage": {
                            "fixed": 1000,
                            "km": 100
                        },
                        "stop_excess": {
                            "fixed": 0,
                            "per_stop": 0
                        },
                        "unique_stop_lack": {
                            "fixed": 0,
                            "per_stop": 0
                        },
                        "stop_lack": {
                            "fixed": 0,
                            "per_stop": 0
                        },
                        "late": {
                            "fixed": 1000,
                            "minute": 17
                        },
                        "early": {
                            "fixed": 1000,
                            "minute": 17
                        },
                        "out_of_time": {
                            "fixed": 1000,
                            "minute": 17
                        }
                    }
                }
            ],
            "travel_time_multiplier": 1,
            "service_duration_multiplier": 1,
            "shared_service_duration_multiplier": 1,
            "depot_extra_service_duration_s": 0,
            "max_runs": 1,
            "max_middle_depots": 1,
            "routing_mode": "driving",
            "imei": 0,
            "phone": "string",
            "rest_schedule_id": "string",
            "fixed_planned_route": false,
            "min_stop_weight": 0,
            "close_locations": [
                {
                    "routing_mode": "driving",
                    "search_radius_m": 0,
                    "soft_search_radius_m": 0,
                    "duration_till_service_s": {
                        "value": 1000000000,
                        "penalty": 0
                    },
                    "distance_till_service_m": {
                        "value": 1000000000,
                        "penalty": 0
                    }
                }
            ],
            "walking_courier": {
                "restrictions": {
                    "max_walking_edge_distance_m": {
                        "value": 1000000000,
                        "penalty": 0
                    }
                },
                "cost": {
                    "hour": 0,
                    "km": 0
                },
                "capacity": {
                    "units": 1000000000
                }
            },
            "penalty": {
                "arrival_after_start": {
                    "average_h": 0,
                    "as_soon_as_possible": false
                },
                "min_stop_weight": {
                    "fixed": 1000,
                    "kg": 50
                }
            },
            "trailer": {
                "decoupling_time_s": 0,
                "coupling_time_s": 0,
                "rolling_cost": 0,
                "rolling_time": {
                    "fixed_time_s": 0,
                    "s_per_kg": 0,
                    "s_per_m3": 0,
                    "s_per_unit": 0
                },
                "cost": {
                    "fixed": 3000,
                    "run": 0,
                    "hour": 100,
                    "km": 8,
                    "tonne_km": 0,
                    "location": 0
                },
                "max_capacity_difference": {
                    "volume_cbm": 0,
                    "weight_kg": 0,
                    "units": 0,
                    "custom": 0
                },
                "capacity": {
                    "weight_kg": 1000000000,
                    "units": 1000000000,
                    "custom": 0,
                    "volume": {
                        "depth_m": 1000,
                        "height_m": 1000,
                        "width_m": 1000
                    },
                    "limits": {
                        "units_perc": 100,
                        "volume_perc": 100,
                        "weight_perc": 100
                    }
                }
            },
            "rest_schedule": {
                "breaks": [
                    {
                        "work_time_range_till_rest": "string",
                        "work_time_range_from_start": "string",
                        "continuous_travel_time_range": "string",
                        "travel_time_range": "string",
                        "rest_duration_s": 0,
                        "route_duration_s": 0,
                        "necessary_route_duration_s": 0,
                        "type": "string",
                        "before_first_location": false,
                        "after_last_location": false,
                        "merge_with_types": [
                            "string"
                        ],
                        "repeatable": false,
                        "penalty": {
                            "early": {
                                "fixed": 1000,
                                "minute": 17
                            },
                            "late": {
                                "fixed": 1000,
                                "minute": 17
                            }
                        }
                    }
                ]
            },
            "specs": {
                "height": 0,
                "width": 0,
                "length": 0,
                "max_weight": 0,
                "max_weight_kg": 0
            },
            "planned_route": {
                "start_time": "string",
                "locations": [
                    {
                        "id": 0,
                        "shift_id": "string",
                        "wait_if_early": true,
                        "loaded_orders": [
                            0,
                            "string"
                        ],
                        "delivered_orders": [
                            0,
                            "string"
                        ],
                        "picked_orders": [
                            0,
                            "string"
                        ],
                        "delivery_in_current_run": false,
                        "is_middle_depot": false,
                        "anchor_mode": "Decoupling"
                    }
                ],
                "work_breaks": [
                    {
                        "work_duration_s": 0,
                        "shift_id": "string"
                    }
                ],
                "planned_runs_first": false
            },
            "capacity": {
                "weight_kg": 1000000000,
                "units": 1000000000,
                "custom": 0,
                "volume": {
                    "width_m": 1000,
                    "depth_m": 1000,
                    "height_m": 1000
                },
                "limits": {
                    "volume_perc": 100,
                    "weight_perc": 100,
                    "units_perc": 100
                }
            }
        }
    ],
    "depots": [
        {
            "id": 0,
            "preset_id": "string",
            "ref": "string",
            "point": {
                "lat": 0,
                "lon": 0
            },
            "service_duration_s": 0,
            "hard_window": false,
            "title": "string",
            "description": "string",
            "address": "string",
            "time_window": "string",
            "hard_time_window": "string",
            "time_windows": [
                {
                    "time_window": "string",
                    "hard_time_window": "string"
                }
            ],
            "type": "depot",
            "flexible_start_time": false,
            "crossdock_safety_waiting_duration_s": 3600,
            "finish_service_duration_s": 0,
            "preliminary_service_duration_s": 0,
            "time_windows_loading": {
                "time_window": "string",
                "hard_time_window": "string",
                "time_windows": [
                    {
                        "hard_time_window": "string",
                        "time_window": "string"
                    }
                ]
            },
            "time_windows_refilling": {
                "time_window": "string",
                "hard_time_window": "string",
                "time_windows": [
                    {
                        "hard_time_window": "string",
                        "time_window": "string"
                    }
                ]
            },
            "time_windows_unloading": {
                "time_window": "string",
                "hard_time_window": "string",
                "time_windows": [
                    {
                        "hard_time_window": "string",
                        "time_window": "string"
                    }
                ]
            },
            "package_throughput": {
                "kg_per_hour": 0,
                "units_per_hour": 0
            },
            "throughput": {
                "kg_per_hour": 0,
                "units_per_hour": 0,
                "vehicle_count": [
                    {
                        "time_window": "string",
                        "value": 0
                    }
                ]
            },
            "penalty": {
                "package_throughput": {
                    "fixed": 1000,
                    "kg": 50,
                    "unit": 100
                },
                "throughput": {
                    "fixed": 1000,
                    "kg": 50,
                    "unit": 100,
                    "vehicle": 100000
                },
                "late": {
                    "fixed": 1000,
                    "minute": 17
                },
                "early": {
                    "fixed": 1000,
                    "minute": 17
                },
                "out_of_time": {
                    "fixed": 1000,
                    "minute": 17
                }
            }
        }
    ]
}

Name

Description

locations*

Type: mvrp_request_locations_item[]

List of locations.
Location of order to deliver from depot.

Min items: 1

options*

Type: solver_options_mvrp

Solver options. It is forbidden to specify options that are not present in the list below.

vehicles*

Type: mvrp_request_vehicles_item[]

List of vehicles, available for route planning.
Vehicle specification.

Min items: 1

depot

Type: depot_location

A depot, by default start and finish point for a vehicle on route.

depots

Type: mvrp_request_depots_item[]

List of depots. Fields depot and depots are mutually exclusive.More information
A depot, by default start and finish point for a vehicle on route.

zones

Type: mvrp_request_zones_item[]

mvrp_request_locations_item

Location of order to deliver from depot.

Name

Description

point*

Type: coordinate

WGS84 coordinate of a location. More information

address

Type: string

Address of the location.

allow_trailers

Type: boolean

When true, vehicles with trailers can arrive at this location. Otherwise, they will have to leave the trailer at an anchor location beforehand. [More information](https://routeq.com/doc/vrp/concepts/properties-of-vehicles.html?lang=en#coupling

Default:

client_id

Type: integer or string

Defines id of a client corresponding to the location.

client_service_duration_s

Type: number

Duration of service at a location, which can be shared among the other orders of the same client (by client_id) at exactly the same location.

Default: 0

Min value: 0

Max value: 3153600000

comments

Type: string

Comments.

crossdock_mode

Type: string

Defines whether it is allowed to deliver this order through a cross-dock depot. * deny — prohibited, can only be delivered from a regular depot; * allow — allowed, can be delivered either directly from a regular depot or through a cross-dock depot; * mandatory — required, can only be delivered through a cross-dock depot.

Default: allow

Enum: deny, allow, mandatory

crossdock_service_duration_s

Type: number

Time spent at a crossdock location during the unloading of this order. More information

Default: 0

Min value: 0

Max value: 3153600000

custom_value

Type: number

A custom numeric value, associated with location (E.g. the reward for the courier for visiting this location). May be used as a component in vehicle cost function.

delivery_deadline

Type: string

Time by which the pickup order without specified delivery_to field should be delivered to any depot, in [D.]HH[:MM[:SS]] format or ISO 8601 2018-09-06T10:15:00+03:00, 2018-09-06T10:15:00Z. More information

delivery_to

Type: integer or string

Defines id of a location where to deliver the shipment.More information

delivery_to_any

Type: (integer or string)[]

A list of drop_off location ID's, the pickup location must be delivered to any of these locations. More information
Reference to a location specified in locations. More information

depot_duration_s

Type: number

Time spent at a depot during handling of this location (goods loading, document collection, etc.). More information

Default: 0

Min value: 0

Max value: 3153600000

depot_expiring_time

Type: string

Time by which the order must be taken from the depot, in [D.]HH[:MM[:SS]] format or ISO 8601 2018-09-06T10:15:00+03:00, 2018-09-06T10:15:00Z

depot_id

Type: integer or string or array

depot_ready_time

Type: string

Time when the order is ready to be taken from any depot, in [D.]HH[:MM[:SS]] format or ISO 8601 2018-09-06T10:15:00+03:00, 2018-09-06T10:15:00Z. More information

description

Type: string

Location description.

hard_time_window

Type: string

Allowed hard time window to visit location, in [D.]HH[:MM[:SS]] - [D.]HH[:MM[:SS]] format or ISO 8601 2018-09-06T10:15:00+03:00/2018-09-06T12:45:00+03:00, 2018-09-06T10:15:00Z/2018-09-06T12:45:00Z. Hard time window must include time range defined in corresponding time_window field. Fields hard_time_window and hard_window are mutually exclusive. More information

hard_window

Type: boolean

Restricts time window relaxation during route planning. If location cannot be visited within a specified time window, it will be excluded from the route and added to dropped_orders field in the response. This field is useful to model orders that cannot be completed within the time window, (e.g. due to conflicts with other orders). More information

Default:

id

Type: integer or string

Location ID. All locations IDs in task must be unique and have the same type: integer or string. More information

in_lifo_order

Type: boolean

Orders with this field set to true are not allowed to move inside the vehicle and should be delivered in the reversed order of their pickups. Locations with this field set to false can appear anywhere in the route. This field only matters if both pickups and deliveries are present in route. More information

Default:

load_types

Type: string[]

Defines types of location load. mustnt be defined only for garage` location type.
Type of load.

max_total_vehicles

Type: integer

Maximal number of vehicles that can be served by an anchor location. Unlimited by default. More information

may_drop_in_crossdock

Type: boolean

May drop pickup order in crossdock location

Default:

optional_tags

Type: mvrp_request_locations_optional_tags_item[]

List of tags which are not required for a vehicle to serve the location, but they can decrease or increase the route cost if satisfied. More information
An optional tag with bonus or penalty.

parking_service_duration_s

Type: number

Duration of parking at location. If the order is delivered using routing_mode walking or transit, this time will not be spent. If the location was chosen as a parking for the walking part, then the time will be spent once before the start of the part.

Default: 0

Min value: 0

Max value: 3153600000

penalty

Type: mvrp_request_locations_penalty

Penalties for non-completion and time window failure. More information

phone

Type: string

Phone number of delivery receiver.

pickup_from_any

Type: boolean

Delivery-orders that have this field set to true must have multiple pickup orders associated with it. Any one of these pickup orders can be selected for delivery, and the rest will be ignored. The choice among the options is based on optimizing the cost of the route. More information

Default:

preset_id

Type: string

Preset ID (preset.number from reference-book) for location properties.

ref

Type: string

Location reference.

required_tags

Type: string[]

List of tags a vehicle must have to arrive at the location. More information
An arbitrary tag.

sequence_order

Type: integer

All locations in vehicle route with specified sequence_order option have to be visited in non-decreasing order of its values. More information

service_duration_s

Type: number

Duration of service at location. Service duration can include any operations at location, such as loading or unloading items from a vehicle, or any other time associated with a location (apart from waiting, which is time after arrival and before service).More information

Default: 0

Min value: 0

Max value: 3153600000

shared_service_duration_s

Type: number

Duration of service at a location, which can be shared among the other orders at exactly the same location. Shared service duration can include such operations as parking of a car, delivering documents, etc. More information

Default: 0

Min value: 0

Max value: 3153600000

shared_with_company_ids

Type: integer[]

IDs of the companies that can access the order information.

Min value: 0

shipment_size

Type: mvrp_request_locations_shipment_size

Shipment size (dimensions and/or weight). More information

time_window

Type: string

Allowed time window to visit location, in [D.]HH[:MM[:SS]] - [D.]HH[:MM[:SS]] format or ISO 8601 2018-09-06T10:15:00+03:00/2018-09-06T12:45:00+03:00, 2018-09-06T10:15:00Z/2018-09-06T12:45:00Z. More information

time_windows

Type: mvrp_request_locations_time_windows_item[]

List of allowed time windows. Time windows can not overlap. Fields time_window and time_windows are mutually exclusive. Either none or all of time_window must have corresponding hard_time_window. More information

title

Type: string

Location title.

transit_time

Type: mvrp_request_locations_transit_time

Restrictions on the time the order spends inside a vehicle

type

Type: string

Defines a type of service at the location: delivery, pickup, drop_off or garage. * delivery — the load is picked up at the depot or at another location, and delivered to this location; * pickup — the load is picked up at this location, and delivered to another location (if delivery_to is specified), or to the depot; * drop_off — a pickup location may be delivered to any of related drop_off locations (see delivery_to_any); * garage— a location which can be used as the first or the last vehicle location viastart_atorfinish_atvehicle option; *anchor— a location where trailers can be dropped and unloaded; *parking` — a location where trailers can be dropped to serve a single other location. Trailers can not be unloaded there. More information

Default: delivery

Enum: depot, crossdock, delivery, pickup, drop_off, garage, anchor, parking

use_in_proximity

Type: boolean

When false, this location will be ignored in computation of proximity and global proximity. More information

Default:

solver_options_mvrp

Solver options. It is forbidden to specify options that are not present in the list below.

Name

Description

time_zone*

Type: number or string

absolute_time

Type: boolean

Use ISO 8601 format (YYYY-MM-DDTHH:MM:SS+HH:MM) for time_window in the result.

Default:

avoid_tolls

Type: boolean

Do not use toll roads if possible (only for driving and truck routing modes). More information

Default:

balanced_groups

Type: solver_options_mvrp_balanced_groups_item[]

Each item in this array defines a balanced group of routes. Each route in a group corresponds to a single vehicle shift. Shifts are linked with groups by balanced_group_id field. Routes are balanced by metrics total_duration_s and/or total_stops depending on specified penalties. More information
A group of balanced routes.

close_locations_during_post_optimization_only

Type: boolean

Apply penalties defined in close_locations only during post_optimization stage. If the field is true, post-optimization must be turned on.

Default:

critical_lateness_risk_probability

Type: number

If a probability of being late on a location is greater or equal than a specified value, than the location is accounted in lateness_risk_locations_count. The probability is defined in percent.

Default: 20

Min value: 1

Max value: 50

date

Type: string

Starting date for all routes (YYYY-MM-DD format), defaults to current date. More information

Pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$

enable_vehicle_classes

Type: boolean

When true, solver will classify vehicles based on given vehicle specs to calculate more accurate distances between locations. Can be set to false to reduce size of the task and avoid "The task is too big" error.

Default:

fix_planned_shifts

Type: boolean

Fix shifts of locations from planned routes.

Default:

global_proximity_factor

Type: number

Level of location proximity influence on vehicle routes. Recommended values are from 0.0 to 1.0. Using this option makes locations closer to the last location in route. Using both proximity_factor and global_proximity_factor makes routes more tolerant to moving locations to the end of route. Note, that using proximity will decrease optimality of computed routes in terms of costs and penalties. More information

Default: 0

Min value: 0

Max value: 10

ignore_min_stops_for_unused

Type: boolean

Ignore minimal_stops option for unused vehicles. More information

Default:

ignore_zones

Type: boolean

Ignore all zone-related options in vehicles and locations. More information

Default:

incompatible_load_types

Type: string[][]

Each item in this array defines list of location load types, that should not be handled within the same vehicle run. More information
List of load types.
Type of load.

incompatible_zones

Type: string[][]

Each item in this array defines list of location zones, that should not be visited within the same vehicle run. More information
List of zones.
Zone number.

load_when_ready

Type: boolean

Start load orders in depot when they are ready (in order of depot_ready_time). More information

Default:

location_groups

Type: solver_options_mvrp_location_groups_item[]

Each item in this array defines a group of locations which should be assigned to the same vehicle shift. Some locations from the group might get dropped. Each location can be referenced by only one location group. More information
A group of locations which should be assigned to the same vehicle shift.

matrix_router

Type: string

Matrix router to be used for route planning * main — recommended for Russia, CIS and Turkey. * global — for other countries. * geodesic — distances are calculated directly without taking into account traffic jams. * auto — automatic router choice based on depot location.

Default: main

Enum: main, geodesic, global, auto

max_drop_penalty_percentage

Type: number

Maximal relation of drop penalty to the sum of drop penalties in all orders. More information

Default: 100

Min value: 0

Max value: 100

merge_multiorders

Type: boolean

If possible merge those orders which have the same coordinates, i.e. serve them by a single vehicle. More information

Default:

minimize_lateness_risk

Type: boolean

Compute and minimize the probability of being late to locations. In other words, avoid routes such that the estimated time of arrival is close to the end of a time window. More information

Default:

penalize_late_service

Type: boolean

This option determines whether to penalize for late arrivals or late service. * When false, late penalty is applied if a vehicle arrived to the location/depot or started serving the depot after the end of the time window. Note that for multi-orders the service start time of the whole multi-order is used for each suborder rather than the suborder's own service start. * When true, late penalty is applied if the location, depot or shift service was finished after the end of the time window. In most cases turning this option on is equivalent to decreasing the ends of all the time windows by service_duration_s of the corresponding locations, depots and shifts. However, it provides its own mechanics for the cases when it is not clear how much time will pass since arrival to the location till the end of service, e.g. in the cases of serving multi-orders and unloading pickups at the depot. It is recommended to set this to true if it is important to serve multi-orders in time rather than to arrive at a multi-order location in time. More information

Default:

penalty

Type: solver_options_mvrp_penalty

Penalties for global solution limitations violation.

points_throughputs

Type: solver_options_mvrp_points_throughputs_item[]

Each item in this array defines point throughput.
Point's throughput.

post_optimization

Type: boolean

Use post optimization: restart algorithm in the last 10% operations with disabled global proximity and balancing. More information

Default:

preset_id

Type: string

Preset ID (preset.number from reference-book) for task options.

proximity_factor

Type: number

Level of location proximity influence on vehicle routes. Recommended values are from 0.0 to 1.0. Using this option makes routes more tolerant to dropping locations. Note, that using proximity will decrease optimality of computed routes in terms of costs and penalties. More information

Default: 0

Min value: 0

Max value: 10

quality

Type: string

Solution quality: * low — debug mode for development and validation of constraints, shortest run time; * normal — baseline solution quality, average run time; * high — highest possible quality, longest run time. Required field.

Default: normal

Enum: low, normal, high

restart_on_drop

Type: boolean

Restart to optimize only non-dropped orders, in case we haven't find solutions without drops. Enable this option if drops are expected and acceptable for your business scenario.

Default:

routing_mode

Type: string

Transportation method. More information * driving — default mode, routing with car profile; * truck — routing with truck profile; * walking — routing with pedestrian profile, only on roads allowed for pedestrian traffic; * transit — routing with pedestrian profile combined with public transport; * bicycle - routing with bicycle profile. More information

Default: driving

Enum: driving, truck, walking, transit, bicycle

template_rest_schedules

Type: solver_options_mvrp_template_rest_schedules_item[]

List of rest schedule templates. More information
Template schedule of rest breaks.

wait_in_multiorders

Type: boolean

Allows to wait in multiorders. More information

Default:

weighted_drop_penalty

Type: boolean

Compute drop penalty according to shipment weight and volume. It helps optimization when vehicles are highly loaded. Specified location drop penalties are ignored in this case. More information

Default:

mvrp_request_vehicles_item

Vehicle specification.

Name

Description

id*

Type: integer or string

Vehicle ID. All vehicle IDs in task must be unique and have the same type: integer or string. More information

allow_different_depots_in_route

Type: boolean

Vehicle is allowed to visit depots with different ids in the same route

Default:

allowed_zones

Type: string[]

List of zones, which can be visited by vehicle. More information
Zone id.

capacity

Type: mvrp_request_vehicles_capacity

Vehicle capacity. More information

close_locations

Type: mvrp_request_vehicles_close_locations_item[]

cost

Type: vehicles_cost_0 or string

crossdock_mode

Type: string

Defines whether this machine is allowed to deliver orders to the cross-dock depot. More information * deny — prohibited, can only deliver to locations; * allow — allowed, can deliver both directly to locations and to a cross-dock depot; * mandatory — required, can only deliver to a cross-dock depot.

Default: allow

Enum: deny, allow, mandatory

depot_extra_service_duration_s

Type: number

Additional time required to load this vehicle in the depot.

Default: 0

Min value: 0

Max value: 3153600000

depot_id

Type: integer or string or array

ending_depot_id

Type: integer or string or array

excluded_tags

Type: string[]

List of excluding vehicle tags, checked for compatibility with location tags (POSIX-extended regular expression are used). More information
An arbitrary tag or POSIX-extended regular expression.

finish_at

Type: integer or string

Defines id of a location with type garage where the vehicle should finish the route.

fixed_planned_route

Type: boolean

If true, planned route of the vehicle will be used without any changes. More information

Default:

fixed_work_breaks

Type: mvrp_request_vehicles_fixed_work_breaks_item[]

This list can be used for setting the duration of work before each break for several first breaks in each shift (or the whole route, if no shifts are present). If the list of shifts (see shifts) is provided for the vehicle, you have to specify a valid shift_id for every work break. This option is primarily intended for combining with visited_locations to describe work breaks during visiting them, but they can be applied independently.

forbidden_zones

Type: string[]

List of zones, which can not be visited by vehicle. More information
Zone id.

global_proximity_attraction_point

Type: integer or string

Defines id of a location with type garage, the distance to which is calculated for the global_proximity penalty.

imei

Type: integer

The number of the GPS tracker.

incompatible_load_types

Type: string[][]

Each item in this array defines list of location load types, that should not be handled within the same vehicle run (overrides incompatible_load_types value specified in options). More information
List of load types.
Type of load.

max_middle_depots

Type: integer

Maximal number of middle depots (i.e. depots which do not break the run) in the route

Default: 1

max_runs

Type: integer

Maximal number of the vehicle runs from the depot to locations in all shifts. More information

Default: 1

middle_depot_id

Type: integer or string or array

min_stop_weight

Type: number

Minimal total weight of all orders in one point. More information

Default: 0

penalty

Type: mvrp_request_vehicles_penalty

Penalties for vehicle limitations violation.

phone

Type: string

Phone number of the courier.

planned_route

Type: mvrp_request_vehicles_planned_route

A planned vehicle route, should be used to assign already chosen locations to vehicles. These locations will not be dropped even if some strict constraint(s) is violated and will be served by the vehicle. The order of locations provided in this option can be changed for optimization of final route. By default shifts assigned to planned locations can be changed as well. They can be fixed with fix_planned_shifts solver option. More information

preset_id

Type: string

Preset ID (preset.number from reference-book) for vehicle properties.

ref

Type: string

Vehicle reference number.

rest_schedule

Type: mvrp_request_vehicles_rest_schedule

Schedule of rest breaks. More information

rest_schedule_id

Type: string

ID of a rest schedule template used in this vehicle.

return_to_depot

Type: boolean

If true, the vehicle returns to its depot after the last order. When set to false and finish_at parameter is not specified, then the last route and shift will be finished at the last order location. When set to true and finish_at parameter is specified, the last vehicle route will go through the depot in the end and then will be finished together with the shift at the garage location.

Default:

routing_mode

Type: string

Transportation method. If present, overrides routing_mode specified in solver options. More information * driving — default mode, routing with car profile; * truck — routing with truck profile; * walking — routing with pedestrian profile, only on roads allowed for pedestrian traffic; * transit - routing with pedestrian profile combined with public transport; * bicycle - routing wtih bicycle profile.

Enum: driving, truck, walking, transit, bicycle

service_duration_multiplier

Type: number

Service duration adjustment coefficient for slow or fast workers. More information

Default: 1

Min value: 0.001

shared_service_duration_multiplier

Type: number

Shared service duration adjustment coefficient for slow or fast workers. More information

Default: 1

Min value: 0.001

shifts

Type: mvrp_request_vehicles_shifts_item[]

List of vehicle shifts. More information
Vehicle shift.

specs

Type: mvrp_request_vehicles_specs

Vehicle specification. More information

start_at

Type: integer or string

Defines id of a location with type garage where the vehicle should start the route. More information

starting_depot_id

Type: integer or string or array

tags

Type: string[]

List of vehicle tags, checked for compatibility with location tags (POSIX-extended regular expression are used). More information
An arbitrary tag or POSIX-extended regular expression.

trailer

Type: mvrp_request_vehicles_trailer

Trailer specification. More information

travel_time_multiplier

Type: number

Travel duration adjustment coefficient for slow or fast vehicles. More information

Default: 1

Min value: 0.001

visit_depot_at_start

Type: boolean

If true, the first route of the vehicle will go through the depot in the beginning.More information There are four different scenarios to define the first vehicle's route beginning using options start_at and visit_depot_at_start:

  • start_at defined, visit_depot_at_start=true: garage -> depot -> location;
  • start_at defined, visit_depot_at_start=false: garage -> locations;
  • start_at undefined, visit_depot_at_start=true: depot -> locations;
  • start_at undefined, visit_depot_at_start=false: locations.

Default:

visited_locations

Type: mvrp_request_vehicles_visited_locations_item[]

List of locations to be visited by a vehicle in exact order as fixed part of the route without optimizations, with optional times of departure from some locations. If the work breaks between visited locations need to be precisely scheduled, use fixed_work_breaks vehicle's option. More information

walking_courier

Type: mvrp_request_vehicles_walking_courier

Description of a pedestrian courier.

depot_location

A depot, by default start and finish point for a vehicle on route.

Name

Description

point*

Type: coordinate

WGS84 coordinate of a location. More information

address

Type: string

Address of the location.

crossdock_safety_waiting_duration_s

Type: number

The duration of the minimum time interval between the moment the order arrives at the cross-dock depot and the moment when it can be picked up from there by a vehicle for delivery. This interval is needed so that there is a reserve of time in case the vehicle that brings the orders is late.

Default: 3600

Min value: 0

Max value: 3153600000

description

Type: string

Location description.

finish_service_duration_s

Type: number

Duration of service at a depot in the end of a route. Finish service duration can include any operations at depot, e.g. unloading items, documents collection etc. More information

Default: 0

Min value: 0

Max value: 3153600000

flexible_start_time

Type: boolean

By default vehicle start time is equal to either depot, or garage, or shift start time. When this option is set to true, vehicles can start earlier or later than the default start time. In this case the optimal start time will be computed according to cost minimization. More information Also when flexible_start_time option is used, the solver can generate routes where arrival time is very close to end of the time window. It is often undesired route plans, because there is a risk of being late on such locations. An option minimize_lateness_risk and/or penalize_late_service is recommended to be used together with flexible_start_time to avoid such routes.

Default:

hard_time_window

Type: string

Allowed hard time window to visit location, in [D.]HH[:MM[:SS]] - [D.]HH[:MM[:SS]] format or ISO 8601 2018-09-06T10:15:00+03:00/2018-09-06T12:45:00+03:00, 2018-09-06T10:15:00Z/2018-09-06T12:45:00Z. Hard time window must include time range defined in corresponding time_window field. Fields hard_time_window and hard_window are mutually exclusive. More information

hard_window

Type: boolean

Restricts time window relaxation during route planning. When true, vehicles are allowed to return to depot only within the specified time window. More information

Default:

id

Type: integer or string

Location ID. All locations IDs in task must be unique and have the same type: integer or string. More information

package_throughput

Type: depot_location_package_throughput

Restriction on packaging speed in depot.

penalty

Type: depot_location_penalty

Penalties for depot time window or throughput failure. More information

preliminary_service_duration_s

Type: number

Duration of preliminary service at depot. This duration can include any operations that can be done before loading the vehicle. These operations will be done before depot_ready_time of deliveries that are loaded at this vehicle. More information

Default: 0

Min value: 0

Max value: 3153600000

preset_id

Type: string

Preset ID (preset.number from reference-book) for depot properties.

ref

Type: string

Location reference.

service_duration_s

Type: number

Duration of service at location. Service duration can include any operations at location, such as loading or unloading items from a vehicle, or any other time associated with a location (apart from waiting, which is time after arrival and before service).More information

Default: 0

Min value: 0

Max value: 3153600000

throughput

Type: depot_location_throughput

Depot throughput limit. More information

time_window

Type: string

Allowed time window to visit location, in [D.]HH[:MM[:SS]] - [D.]HH[:MM[:SS]] format or ISO 8601 2018-09-06T10:15:00+03:00/2018-09-06T12:45:00+03:00, 2018-09-06T10:15:00Z/2018-09-06T12:45:00Z. More information

time_windows

Type: depot_location_time_windows_item[]

List of allowed time windows. Time windows can not overlap. Fields time_window and time_windows are mutually exclusive. Either none or all of time_window must have corresponding hard_time_window. More information

time_windows_loading

Type: any

Time windows when the vehicle is allowed to leave the depot on the 1st run

time_windows_refilling

Type: any

Time windows when the vehicle is allowed to visit a depot (or middle depot) for additional loading

time_windows_unloading

Type: any

Time windows when the vehicle is allowed to return to the depot on the last run

title

Type: string

Location title.

type

Type: string

Defines a type of depot: depot or crossdock. * depot — the main depot where orders are stored. * crossdock — the additional depot where there are no orders initially. To deliver orders from this depot, another vehicle must first deliver them here from the main depot where they are stored.

Default: depot

Enum: depot, crossdock

mvrp_request_depots_item

A depot, by default start and finish point for a vehicle on route.

Name

Description

point*

Type: coordinate

WGS84 coordinate of a location. More information

address

Type: string

Address of the location.

crossdock_safety_waiting_duration_s

Type: number

The duration of the minimum time interval between the moment the order arrives at the cross-dock depot and the moment when it can be picked up from there by a vehicle for delivery. This interval is needed so that there is a reserve of time in case the vehicle that brings the orders is late.

Default: 3600

Min value: 0

Max value: 3153600000

description

Type: string

Location description.

finish_service_duration_s

Type: number

Duration of service at a depot in the end of a route. Finish service duration can include any operations at depot, e.g. unloading items, documents collection etc. More information

Default: 0

Min value: 0

Max value: 3153600000

flexible_start_time

Type: boolean

By default vehicle start time is equal to either depot, or garage, or shift start time. When this option is set to true, vehicles can start earlier or later than the default start time. In this case the optimal start time will be computed according to cost minimization. More information Also when flexible_start_time option is used, the solver can generate routes where arrival time is very close to end of the time window. It is often undesired route plans, because there is a risk of being late on such locations. An option minimize_lateness_risk and/or penalize_late_service is recommended to be used together with flexible_start_time to avoid such routes.

Default:

hard_time_window

Type: string

Allowed hard time window to visit location, in [D.]HH[:MM[:SS]] - [D.]HH[:MM[:SS]] format or ISO 8601 2018-09-06T10:15:00+03:00/2018-09-06T12:45:00+03:00, 2018-09-06T10:15:00Z/2018-09-06T12:45:00Z. Hard time window must include time range defined in corresponding time_window field. Fields hard_time_window and hard_window are mutually exclusive. More information

hard_window

Type: boolean

Restricts time window relaxation during route planning. When true, vehicles are allowed to return to depot only within the specified time window. More information

Default:

id

Type: integer or string

Location ID. All locations IDs in task must be unique and have the same type: integer or string. More information

package_throughput

Type: mvrp_request_depots_package_throughput

Restriction on packaging speed in depot.

penalty

Type: mvrp_request_depots_penalty

Penalties for depot time window or throughput failure. More information

preliminary_service_duration_s

Type: number

Duration of preliminary service at depot. This duration can include any operations that can be done before loading the vehicle. These operations will be done before depot_ready_time of deliveries that are loaded at this vehicle. More information

Default: 0

Min value: 0

Max value: 3153600000

preset_id

Type: string

Preset ID (preset.number from reference-book) for depot properties.

ref

Type: string

Location reference.

service_duration_s

Type: number

Duration of service at location. Service duration can include any operations at location, such as loading or unloading items from a vehicle, or any other time associated with a location (apart from waiting, which is time after arrival and before service).More information

Default: 0

Min value: 0

Max value: 3153600000

throughput

Type: mvrp_request_depots_throughput

Depot throughput limit. More information

time_window

Type: string

Allowed time window to visit location, in [D.]HH[:MM[:SS]] - [D.]HH[:MM[:SS]] format or ISO 8601 2018-09-06T10:15:00+03:00/2018-09-06T12:45:00+03:00, 2018-09-06T10:15:00Z/2018-09-06T12:45:00Z. More information

time_windows

Type: mvrp_request_depots_time_windows_item[]

List of allowed time windows. Time windows can not overlap. Fields time_window and time_windows are mutually exclusive. Either none or all of time_window must have corresponding hard_time_window. More information

time_windows_loading

Type: any

Time windows when the vehicle is allowed to leave the depot on the 1st run

time_windows_refilling

Type: any

Time windows when the vehicle is allowed to visit a depot (or middle depot) for additional loading

time_windows_unloading

Type: any

Time windows when the vehicle is allowed to return to the depot on the last run

title

Type: string

Location title.

type

Type: string

Defines a type of depot: depot or crossdock. * depot — the main depot where orders are stored. * crossdock — the additional depot where there are no orders initially. To deliver orders from this depot, another vehicle must first deliver them here from the main depot where they are stored.

Default: depot

Enum: depot, crossdock

mvrp_request_zones_item

Name

Description

geometry*

Type: mvrp_request_zones_geometry

id*

Type: string

Zone id

coordinate

WGS84 coordinate of a location. More information

Name

Description

lat*

Type: number

Min value: -90

Max value: 90

lon*

Type: number

Min value: -180

Max value: 180

mvrp_request_locations_optional_tags_item

An optional tag with bonus or penalty.

Name

Description

tag*

Type: string

An arbitrary tag.

value*

Type: number

Value of the tag. When location is served by a vehicle with a matching tag in tags field, this value is subtracted from the route cost. When the matching tag is in excluded_tags field, this value is added to the route cost.

mvrp_request_locations_penalty

Penalties for non-completion and time window failure. More information

Name

Description

delivery_deadline

Type: locations_penalty_delivery_deadline

Penalty components for late deliveries from pickup locations to depots. Whether the start or the end of service during the visit is used to penalize for lateness is determined by the penalize_late_service option. More information

drop

Type: number

Penalty for not delivering an order. More information

Default: 1000000

early

Type: locations_penalty_early

Penalty components for early service (used instead of out_of_time penalty). More information

late

Type: locations_penalty_late

Penalty components for late visits (used instead of out_of_time penalty). Whether the start or the end of service during the visit is used to penalize for lateness is determined by the penalize_late_service option. More information

out_of_time

Type: locations_penalty_out_of_time

Penalty components for time window failure. Can be used to set the values of early and late options simultaneously, and each value is overridden if the respective option is also defined. More information

transit_time

Type: any

Penalty components for exceeding transit time

mvrp_request_locations_shipment_size

Shipment size (dimensions and/or weight). More information

Name

Description

custom

Type: number

Size of shipment in custom units. Sizes in custom units are defined in format "name": size, where name is a string denoting the name of a unit, and size is a non-negative floating-point number denoting the quantity of the corresponding unit in the shipment. If the name of a unit is present in other objects (locations/vehicles/trailers), but not this, it is assumed that the quantity of this unit in the shipment is zero. More information

Default: 0

Min value: 0

units

Type: number

Size of shipment in custom units.

Default: 0

Min value: 0

Max value: 1000000000

volume

Type: locations_shipment_size_volume

Shipment dimensions and type.

volume_cbm

Type: number

Explicit volume, cubic meters. By default, the value is taken from "volume", if nothing is specified here.

Min value: 0

weight_kg

Type: number

Weight of shipment, kilograms.

Default: 0

Min value: 0

Max value: 1000000000

mvrp_request_locations_time_windows_item

Name

Description

time_window*

Type: string

Allowed time window to visit location, in [D.]HH[:MM[:SS]] - [D.]HH[:MM[:SS]] format or ISO 8601 2018-09-06T10:15:00+03:00/2018-09-06T12:45:00+03:00, 2018-09-06T10:15:00Z/2018-09-06T12:45:00Z. More information

hard_time_window

Type: string

Allowed hard time window to visit location, in [D.]HH[:MM[:SS]] - [D.]HH[:MM[:SS]] format or ISO 8601 2018-09-06T10:15:00+03:00/2018-09-06T12:45:00+03:00, 2018-09-06T10:15:00Z/2018-09-06T12:45:00Z. Hard time window must include time range defined in corresponding time_window field. Fields hard_time_window and hard_window are mutually exclusive. More information

mvrp_request_locations_transit_time

Restrictions on the time the order spends inside a vehicle

Name

Description

hard_limit_s

Type: number

Hard time limit, values above it are unacceptable

Min value: 0

Max value: 1000000000

limit_s

Type: number

Soft time limit, values above it are acceptable but they will be penalized

Min value: 0

Max value: 1000000000

solver_options_mvrp_balanced_groups_item

A group of balanced routes.

Name

Description

id*

Type: string

A unique ID of a balanced group of routes.

penalty

Type: solver_options_mvrp_balanced_groups_penalty

Penalties for imbalanced routes.

solver_options_mvrp_location_groups_item

A group of locations which should be assigned to the same vehicle shift.

Name

Description

location_ids*

Type: (integer or string)[]

Reference to a location specified in locations. More information

dependent

Type: boolean

When true, either all or none of the locations in group will be served.

Default:

solid

Type: boolean

When true, all assigned locations in group will be served consecutively, but their order is not fixed.

Default:

title

Type: string

solver_options_mvrp_penalty

Penalties for global solution limitations violation.

Name

Description

drop_penalty_percentage

Type: solver_options_mvrp_penalty_drop_penalty_percentage

Penalty components for max_drop_penalty_percentage violation.

multiorders

Type: solver_options_mvrp_penalty_multiorders

Penalty components for extra visits to multiorder poins.

solver_options_mvrp_points_throughputs_item

Point's throughput.

Name

Description

penalty

Type: solver_options_mvrp_points_throughputs_penalty

point

Type: solver_options_mvrp_points_throughputs_point

WGS84 coordinate of a location. More information

throughput

Type: solver_options_mvrp_points_throughputs_throughput

Point throughput limit.

solver_options_mvrp_template_rest_schedules_item

Template schedule of rest breaks.

Name

Description

breaks*

Type: array

id*

Type: string

A unique ID of a template.

mvrp_request_vehicles_capacity

Vehicle capacity. More information

Name

Description

custom

Type: number

Amount of custom units a vehicle is able to carry. Capacities in custom units are defined in format "name": size, where name is a string denoting the name of a unit, and size is a non-negative floating-point number denoting the vehicle capacity with respect to this unit. If the name of a unit is present in shipments or other vehicles, but not this, it is assumed that the capacity is unlimited.

Min value: 0

limits

Type: vehicles_capacity_limits

Vehicle load limits.

units

Type: number

Amount of custom units a vehicle is able to carry.

Default: 1000000000

Min value: 0

volume

Type: vehicles_capacity_volume

Vehicle dimensions.

weight_kg

Type: number

Weight a vehicle is able to carry, kilograms.

Default: 1000000000

Min value: 0

mvrp_request_vehicles_close_locations_item

Name

Description

distance_till_service_m

Type: any

duration_till_service_s

Type: any

routing_mode

Type: string

Transportation method is used to determine close locations. This parameter can be used only if the walking_courier field is defined in the vehicle. In this case, the values walking and the value of the main transportation method of the vehicle are acceptable.

Enum: driving, truck, walking, transit, bicycle

search_radius_m

Type: number

Maximum distance between two locations in meters at which locations on which the restriction is applied.

Default: 0

Min value: 0

Max value: 1000000000

soft_search_radius_m

Type: number

If value is greater than the corresponding value of the search_radius_m for locations at distances from search_radius_m to soft_search_radius_m, the penalty is linear reduced down to 0.

Default: 0

Min value: 0

Max value: 1000000000

vehicles_cost_0

Vehicle cost. More information

Name

Description

fixed

Type: number

Cost per fact of vehicle use (cost occurred if vehicle is included in route).

Default: 3000

Min value: 0

hour

Type: number

Cost of using vehicle per hour. It should not be zero or very small, otherwise you may get routes which are not optimal in terms of time.

Default: 100

Min value: 0

km

Type: number

Cost of using vehicle per kilometer. It should not be zero or very small, otherwise you may get routes which are not optimal in terms of distance.

Default: 8

Min value: 0

location

Type: number

Cost of using vehicle per location (default 0).

Default: 0

Min value: 0

run

Type: number

Cost per single vehicle run from depot to locations.

Default: 0

Min value: 0

tonne_km

Type: number

Cost of carrying one tonne for one kilometer (default 0).

Default: 0

Min value: 0

mvrp_request_vehicles_fixed_work_breaks_item

Name

Description

work_duration_s*

Type: number

Duration of continuous work before the break, seconds.

Min value: 0

Max value: 3153600000

shift_id

Type: string

Unique identifier of a shift.

mvrp_request_vehicles_penalty

Penalties for vehicle limitations violation.

Name

Description

arrival_after_start

Type: vehicles_penalty_arrival_after_start

Penalty components for arrived after start of timewindow

min_stop_weight

Type: vehicles_penalty_min_stop_weight

Penalty components for insufficient total orders weight in point.

mvrp_request_vehicles_planned_route

A planned vehicle route, should be used to assign already chosen locations to vehicles. These locations will not be dropped even if some strict constraint(s) is violated and will be served by the vehicle. The order of locations provided in this option can be changed for optimization of final route. By default shifts assigned to planned locations can be changed as well. They can be fixed with fix_planned_shifts solver option. More information

Name

Description

locations*

Type: vehicles_planned_route_locations_item[]

A planned order of locations in a vehicle route including all shifts and multiple runs. If the list of shifts (see shifts) is provided for the vehicle, you have to specify a valid shift_id for every location in the route.

planned_runs_first

Type: boolean

It is necessary to visit all depots, listed in planned_route, before making non-planned runs.

Default:

start_time

Type: string

Route start time, in[D.]HH[:MM[:SS]] format or ISO 8601 2018-09-06T10:15:00+03:00, 2018-09-06T10:15:00Z.

work_breaks

Type: mvrp_request_vehicles_fixed_work_breaks_item[]

Planned work breaks for a vehicle route including all shifts and multiple runs. If the list of shifts (see shifts) is provided for the vehicle, you have to specify a valid shift_id for every work break. If both planned_work_breaks and fixed_work_breaks lists are provided for a vehicle, one must be a prefix of another upon restriction on any shift. Thus it is impossible to override fixed work breaks by planned work breaks.

mvrp_request_vehicles_rest_schedule

Schedule of rest breaks. More information

Name

Description

breaks*

Type: array

mvrp_request_vehicles_shifts_item

Vehicle shift.

Name

Description

id*

Type: string

Unique identifier of a shift.

time_window*

Type: string

Allowed time window to visit location, in [D.]HH[:MM[:SS]] - [D.]HH[:MM[:SS]] format or ISO 8601 2018-09-06T10:15:00+03:00/2018-09-06T12:45:00+03:00, 2018-09-06T10:15:00Z/2018-09-06T12:45:00Z. More information

balanced_group_id

Type: string

ID of a corresponding balanced group of routes (see the option balanced_groups).

hard_max_duration_s

Type: number

Hard limit on the maximum shift duration in seconds. If both max_duration_s and hard_max_duration_s are present, the value of hard_max_duration_s should be greater or equal to the value of max_duration_s.

Default: 2592000

Min value: 0

Max value: 3153600000

hard_time_window

Type: string

Allowed hard time window to visit location, in [D.]HH[:MM[:SS]] - [D.]HH[:MM[:SS]] format or ISO 8601 2018-09-06T10:15:00+03:00/2018-09-06T12:45:00+03:00, 2018-09-06T10:15:00Z/2018-09-06T12:45:00Z. Hard time window must include time range defined in corresponding time_window field. Fields hard_time_window and hard_window are mutually exclusive. More information

hard_window

Type: boolean

Restricts time window relaxation during route planning. When true, vehicles are allowed to finish a shift only within the specified time window. More information

Default:

max_duration_s

Type: number

Maximal duration of a shift in seconds. If a planned shift duration is greater than specified, the shift out of time penalties are applied.

Default: 172800

Min value: 0

Max value: 3153600000

max_mileage_km

Type: number

Maximal mileage of the vehicle during the shift in kilometers. If a planned mileage is greater than this value, the penalties from a shift parameter penalty.max_mileage are applied. More information

Min value: 0

max_runs

Type: integer

Maximal number of the vehicle runs from the depot to locations in shift.

Default: 1

maximal_stops

Type: integer

Maximal number of shift stops, if the final stop count is greater than this value, stop_excess penalties are applied.More information

Default: 0

Min value: 0

minimal_stops

Type: integer

Minimal number of shift stops, if the final stop count is less than this value, stop_lack penalties are applied. More information

Default: 0

Min value: 0

minimal_unique_stops

Type: integer

Minimal number of shift stops with unique coordinates, if the final stop count is less than this value, unique_stop_lack penalties are applied.

Default: 0

Min value: 0

penalty

Type: shifts_penalty

Penalties for shift constraints violation.

preset_id

Type: string

Preset ID (preset.number from reference-book) for vehicle shift properties.

service_duration_s

Type: number

Duration of service in between shifts (in seconds). It can include any operations needed to finish the shift, such as time to change a driver, exchange papers etc (default: 0).

Default: 0

Min value: 0

Max value: 3153600000

mvrp_request_vehicles_specs

Vehicle specification. More information

Name

Description

height

Type: number

Height of the vehicle, meters.

Min value: 0

length

Type: number

Length of the vehicle, meters.

Min value: 0

max_weight

Type: number

Maximum weight of the vehicle, tons.

Min value: 0

max_weight_kg

Type: number

Maximum weight of the vehicle, kilograms. When solving the problem, the characteristic will be rounded up to tons.If both characteristics are set max_weight and max_weight_kg, `max_weight will be used.

Min value: 0

width

Type: number

Width of the vehicle, meters.

Min value: 0

mvrp_request_vehicles_trailer

Trailer specification. More information

Name

Description

capacity

Type: vehicles_trailer_capacity

Trailer capacity.

cost

Type: vehicles_trailer_cost

Trailer cost.

coupling_time_s

Type: number

Extra time to couple the trailer, seconds.

Default: 0

Min value: 0

Max value: 3153600000

decoupling_time_s

Type: number

Extra time to decouple the trailer, seconds.

Default: 0

Min value: 0

Max value: 3153600000

max_capacity_difference

Type: vehicles_trailer_max_capacity_difference

The maximum difference between the loading of the trailer and the head.

rolling_cost

Type: number

Penalty for each rolling of goods from the trailer to the head.

Default: 0

Min value: 0

rolling_time

Type: vehicles_trailer_rolling_time

Time for loading shipments from trailer to head. In case multiple types of time are specified, the one that takes the most time is chosen. In case none of them is specified, only fixed loading time is used.

mvrp_request_vehicles_visited_locations_item

Name

Description

id*

Type: integer or string

Reference to a location specified in locations. More information

anchor_mode

Type: string

Default: Undefined

Enum: Decoupling, Rolling, Coupling, Undefined

delivered_orders

Type: (integer or string)[]

List of IDs of orders delivered to the crossdock for delivery to the destination.
Reference to a location specified in locations. More information

is_middle_depot

Type: boolean

Location is a middle depot.

Default:

picked_orders

Type: (integer or string)[]

A list of IDs of pickup orders picked up in the crossdock.
Reference to a location specified in locations. More information

shift_id

Type: string

Unique identifier of a shift.

time

Type: string

Time of departure from a location, in [D.]HH[:MM[:SS]] format or ISO 8601 2018-09-06T10:15:00+03:00, 2018-09-06T10:15:00Z.

wait_if_early

Type: boolean

This option determines what happens if a vehicle arrives to the planned location early. When true, the vehicle will wait until the start of a location's time window before serving. When false, it will serve the location immediately. Should be true in the case of hard time window(s).

Default:

mvrp_request_vehicles_walking_courier

Description of a pedestrian courier.

Name

Description

capacity

Type: vehicles_walking_courier_capacity

Capacity of a courier

cost

Type: vehicles_walking_courier_cost

Courier work cost.

restrictions

Type: any

depot_location_package_throughput

Restriction on packaging speed in depot.

Name

Description

kg_per_hour

Type: number

Depot package throughput, kilograms per hour.

Min value: 0

units_per_hour

Type: number

Depot package throughput, units per hour.

Min value: 0

depot_location_penalty

Penalties for depot time window or throughput failure. More information

Name

Description

early

Type: depot_location_penalty_early

Penalty components for early service (used instead of out_of_time penalty).

late

Type: depot_location_penalty_late

Penalty components for late visits (used instead of out_of_time penalty). Whether the start or the end of service during the visit is used to penalize for lateness is determined by the penalize_late_service option.

out_of_time

Type: depot_location_penalty_out_of_time

Penalty components for time window failure. Can be used to set the values of early and late options simultaneously, and each value is overridden if the respective option is also defined.

package_throughput

Type: depot_location_penalty_package_throughput

Penalty components for package throughput exceeding.

throughput

Type: depot_location_penalty_throughput

Penalty components for throughput exceeding.

depot_location_throughput

Depot throughput limit. More information

Name

Description

kg_per_hour

Type: number

Depot throughput, kilograms per hour.

Min value: 0

units_per_hour

Type: number

Depot throughput, custom units per hour.

Min value: 0

vehicle_count

Type: array or number

depot_location_time_windows_item

Name

Description

time_window*

Type: string

Allowed time window to visit location, in [D.]HH[:MM[:SS]] - [D.]HH[:MM[:SS]] format or ISO 8601 2018-09-06T10:15:00+03:00/2018-09-06T12:45:00+03:00, 2018-09-06T10:15:00Z/2018-09-06T12:45:00Z. More information

hard_time_window

Type: string

Allowed hard time window to visit location, in [D.]HH[:MM[:SS]] - [D.]HH[:MM[:SS]] format or ISO 8601 2018-09-06T10:15:00+03:00/2018-09-06T12:45:00+03:00, 2018-09-06T10:15:00Z/2018-09-06T12:45:00Z. Hard time window must include time range defined in corresponding time_window field. Fields hard_time_window and hard_window are mutually exclusive. More information

mvrp_request_depots_package_throughput

Restriction on packaging speed in depot.

Name

Description

kg_per_hour

Type: number

Depot package throughput, kilograms per hour.

Min value: 0

units_per_hour

Type: number

Depot package throughput, units per hour.

Min value: 0

mvrp_request_depots_penalty

Penalties for depot time window or throughput failure. More information

Name

Description

early

Type: depots_penalty_early

Penalty components for early service (used instead of out_of_time penalty). More information

late

Type: depots_penalty_late

Penalty components for late visits (used instead of out_of_time penalty). Whether the start or the end of service during the visit is used to penalize for lateness is determined by the penalize_late_service option. More information

out_of_time

Type: depots_penalty_out_of_time

Penalty components for time window failure. Can be used to set the values of early and late options simultaneously, and each value is overridden if the respective option is also defined. More information

package_throughput

Type: depots_penalty_package_throughput

Penalty components for package throughput exceeding. More information

throughput

Type: depots_penalty_throughput

Penalty components for throughput exceeding. More information

mvrp_request_depots_throughput

Depot throughput limit. More information

Name

Description

kg_per_hour

Type: number

Depot throughput, kilograms per hour.

Min value: 0

units_per_hour

Type: number

Depot throughput, custom units per hour.

Min value: 0

vehicle_count

Type: array or number

mvrp_request_depots_time_windows_item

Name

Description

time_window*

Type: string

Allowed time window to visit location, in [D.]HH[:MM[:SS]] - [D.]HH[:MM[:SS]] format or ISO 8601 2018-09-06T10:15:00+03:00/2018-09-06T12:45:00+03:00, 2018-09-06T10:15:00Z/2018-09-06T12:45:00Z. More information

hard_time_window

Type: string

Allowed hard time window to visit location, in [D.]HH[:MM[:SS]] - [D.]HH[:MM[:SS]] format or ISO 8601 2018-09-06T10:15:00+03:00/2018-09-06T12:45:00+03:00, 2018-09-06T10:15:00Z/2018-09-06T12:45:00Z. Hard time window must include time range defined in corresponding time_window field. Fields hard_time_window and hard_window are mutually exclusive. More information

mvrp_request_zones_geometry

Name

Description

coordinates

Type: number[][][]

Always consists of two elements: longitude and lattitude

type

Type: string

Always equals Polygon

locations_penalty_delivery_deadline

Penalty components for late deliveries from pickup locations to depots. Whether the start or the end of service during the visit is used to penalize for lateness is determined by the penalize_late_service option. More information

Name

Description

fixed

Type: number

Fixed penalty applied if the depot is visited after the deadline.

Default: 1000

minute

Type: number

Penalty for each minute of lateness, when the depot is visited after the deadline.

Default: 17

locations_penalty_early

Penalty components for early service (used instead of out_of_time penalty). More information

Name

Description

fixed

Type: number

Fixed penalty applied if the location starts being served before the start of the time window.

Default: 1000

minute

Type: number

Penalty for each minute of early arrival when the location starts being served before the start of the time window.

Default: 17

locations_penalty_late

Penalty components for late visits (used instead of out_of_time penalty). Whether the start or the end of service during the visit is used to penalize for lateness is determined by the penalize_late_service option. More information

Name

Description

fixed

Type: number

Fixed penalty applied if the location is visited after the end of the time window.

Default: 1000

minute

Type: number

Penalty for each minute of lateness, when the location is visited after the end of the time window.

Default: 17

locations_penalty_out_of_time

Penalty components for time window failure. Can be used to set the values of early and late options simultaneously, and each value is overridden if the respective option is also defined. More information

Name

Description

fixed

Type: number

Fixed penalty applied if the location is visited outside of the time window. See the specifications of early and late options.

Default: 1000

minute

Type: number

Penalty for each minute of lateness or early arrival when the location is visited outside of the time window. See the specifications of early and late options.

Default: 17

locations_shipment_size_volume

Shipment dimensions and type.

Name

Description

depth_m*

Type: number

Depth, meters.

Default: 0

Min value: 0

Max value: 1000000

height_m*

Type: number

Height, meters.

Default: 0

Min value: 0

Max value: 1000000

width_m*

Type: number

Width, meters.

Default: 0

Min value: 0

Max value: 1000000

align

Type: string

Defines allowed container alignment for rigid and fixed_bottom types (ignored for bulk containers):

  • all_axes — default, all axes of the box must be parallel to vehicle's axes;
  • height — the bottom of the box lies on a horizontal surface, but any rotation around the vertical axis (height) is allowed (note that any side can become a bottom for rigid containers). More information

Default: all_axes

Enum: all_axes, height

type

Type: string

Container type:

  • bulk — default type, shape can be changed arbitrary to fit the vehicle;
  • rigid — container is a box that must fit vehicle dimensions under some orientation;
  • fixed_bottom — the bottom of the box must stay the same, but the box can be rotated horizontally (height must fit vehicle's height). More information

Default: bulk

Enum: bulk, rigid, fixed_bottom

solver_options_mvrp_balanced_groups_penalty

Penalties for imbalanced routes.

Name

Description

hour*

Type: number

Penalty per hour of root-sum-square deviation of a route duration from an average duration of a balanced group of routes.

Default: 200

Min value: 0

stop*

Type: number

Penalty per each missing or extra stop of root-sum-square deviation of a route stop count from an average number of stops in a balanced group of routes.

Default: 100

Min value: 0

solver_options_mvrp_penalty_drop_penalty_percentage

Penalty components for max_drop_penalty_percentage violation.

Name

Description

fixed

Type: number

Fixed penalty applied if drop penalty ratio is too high.

Default: 1000

per_percent

Type: number

Penalty for each exceeding percent of drop penalty percentage.

Default: 50

solver_options_mvrp_penalty_multiorders

Penalty components for extra visits to multiorder poins.

Name

Description

per_extra_point

Type: number

Penalty for every point where vehicles/couriers arrive more than once.

Default: 0

Min value: 0

per_extra_vehicle

Type: number

Penalty for every extra vehicle/courier that arrives at multi-order points.

Default: 0

Min value: 0

per_extra_visit

Type: number

Penalty for each extra visit to multi-order points.

Default: 0

Min value: 0

solver_options_mvrp_points_throughputs_penalty

Name

Description

throughput

Type: points_throughputs_penalty_throughput

Penalty components for throughput exceeding. More information

solver_options_mvrp_points_throughputs_point

WGS84 coordinate of a location. More information

Name

Description

lat*

Type: number

Min value: -90

Max value: 90

lon*

Type: number

Min value: -180

Max value: 180

solver_options_mvrp_points_throughputs_throughput

Point throughput limit.

Name

Description

kg_per_hour

Type: number

Point throughput, kilograms per hour.

Min value: 0.000001

units_per_hour

Type: number

Point throughput, custom units per hour.

Min value: 0.000001

vehicle_count

Type: array or number

template_rest_schedules_breaks_0_item

Work break.

Name

Description

rest_duration_s*

Type: number

Duration of rest, seconds.

Min value: 0.001

Max value: 3153600000

after_last_location

Type: boolean

When true, work break will be put after the last location. If possible it will be merged with the first work break of type listed in merge_with_types field, otherwise it will be put immediately after serving of the last location.

Default:

before_first_location

Type: boolean

When true, work break will be put before the first location. If possible it will be merged with the last work break of type listed in merge_with_types field, otherwise it will be put immediately before serving of the first location.

Default:

continuous_travel_time_range

Type: string

Minimal and maximal duration of continuous travel time before rest, format: [D.]HH[:MM[:SS]] - [D.]HH[:MM[:SS]] ("04:00 - 05:30").

merge_with_types

Type: string[]

Types of work breaks this work break can be merged with. This field can only be used with before_first_location or after_last_location fields.

necessary_route_duration_s

Type: number

Minimal duration of route needed to make work break necessary, seconds.

Min value: 0

Max value: 3153600000

penalty

Type: _penalty

Penalties applied for violations of work break conditions.

repeatable

Type: boolean

When true, this work break will be repeated until the end of route. Can only be true for the last break in the chain.

Default:

route_duration_s

Type: number

Minimal duration of route needed to use work break, seconds.

Min value: 0

Max value: 3153600000

travel_time_range

Type: string

Minimal and maximal duration of travel before rest, format: [D.]HH[:MM[:SS]] - [D.]HH[:MM[:SS]] ("04:00 - 05:30").

type

Type: string

Type of work break. Used in merge_with_types field.

work_time_range_from_start

Type: string

Minimal and maximal duration of time from start of route until rest, format: [D.]HH[:MM[:SS]] - [D.]HH[:MM[:SS]] ("04:00 - 05:30").

work_time_range_till_rest

Type: string

Minimal and maximal duration of work before rest, format: [D.]HH[:MM[:SS]] - [D.]HH[:MM[:SS]] ("04:00 - 05:30").

vehicles_capacity_limits

Vehicle load limits.

Name

Description

units_perc

Type: number

Upper limit of total shipments size in custom units as a percentage of a vehicle capacity

Default: 100

Min value: 0

volume_perc

Type: number

Upper limit of total shipments volume as a percentage of vehicle load bay volume. For container fitting purposes it is assumed that each dimension is multiplied by the cubic root of (0.01 * volume_perc).

Default: 100

Min value: 0

weight_perc

Type: number

Upper limit of total shipments weight as a percentage of total weight the vehicle is allowed to carry.

Default: 100

Min value: 0

vehicles_capacity_volume

Vehicle dimensions.

Name

Description

depth_m*

Type: number

Depth, meters.

Default: 1000

Min value: 0

Max value: 1000000

height_m*

Type: number

Height, meters.

Default: 1000

Min value: 0

Max value: 1000000

width_m*

Type: number

Width, meters.

Default: 1000

Min value: 0

Max value: 1000000

vehicles_penalty_arrival_after_start

Penalty components for arrived after start of timewindow

Name

Description

as_soon_as_possible

Type: boolean

Option for arrive as soon as possible even it includes added wait in route

Default:

average_h

Type: number

Penalty for average arrived after start of timewindow

Default: 0

vehicles_penalty_min_stop_weight

Penalty components for insufficient total orders weight in point.

Name

Description

fixed

Type: number

Fixed penalty applied if total orders weight is too low.

Default: 1000

kg

Type: number

Penalty for each lacking kg of total orders weight.

Default: 50

vehicles_planned_route_locations_item

Name

Description

id*

Type: integer or string

Reference to a location specified in locations. More information

anchor_mode

Type: string

Default: Undefined

Enum: Decoupling, Rolling, Coupling, Undefined

delivered_orders

Type: (integer or string)[]

List of IDs of orders delivered to the crossdock for delivery to the destination.
Reference to a location specified in locations. More information

delivery_in_current_run

Type: boolean

All orders, loaded in this location, have to be delivered in current run.

Default:

is_middle_depot

Type: boolean

Location is a middle depot.

Default:

loaded_orders

Type: (integer or string)[]

Ids of delivery orders, loaded into the vehicle in garage or depot.

picked_orders

Type: (integer or string)[]

A list of IDs of pickup orders picked up in the crossdock.
Reference to a location specified in locations. More information

shift_id

Type: string

Unique identifier of a shift.

wait_if_early

Type: boolean

This option determines what happens if a vehicle arrives to the planned location early. When true, the vehicle will wait until the start of a location's time window before serving. When false, it will serve the location immediately. Should be true in the case of hard time window(s).

Default:

rest_schedule_breaks_0_item

Work break.

Name

Description

rest_duration_s*

Type: number

Duration of rest, seconds.

Min value: 0.001

Max value: 3153600000

after_last_location

Type: boolean

When true, work break will be put after the last location. If possible it will be merged with the first work break of type listed in merge_with_types field, otherwise it will be put immediately after serving of the last location.

Default:

before_first_location

Type: boolean

When true, work break will be put before the first location. If possible it will be merged with the last work break of type listed in merge_with_types field, otherwise it will be put immediately before serving of the first location.

Default:

continuous_travel_time_range

Type: string

Minimal and maximal duration of continuous travel time before rest, format: [D.]HH[:MM[:SS]] - [D.]HH[:MM[:SS]] ("04:00 - 05:30").

merge_with_types

Type: string[]

Types of work breaks this work break can be merged with. This field can only be used with before_first_location or after_last_location fields.

necessary_route_duration_s

Type: number

Minimal duration of route needed to make work break necessary, seconds.

Min value: 0

Max value: 3153600000

penalty

Type: _penalty

Penalties applied for violations of work break conditions.

repeatable

Type: boolean

When true, this work break will be repeated until the end of route. Can only be true for the last break in the chain.

Default:

route_duration_s

Type: number

Minimal duration of route needed to use work break, seconds.

Min value: 0

Max value: 3153600000

travel_time_range

Type: string

Minimal and maximal duration of travel before rest, format: [D.]HH[:MM[:SS]] - [D.]HH[:MM[:SS]] ("04:00 - 05:30").

type

Type: string

Type of work break. Used in merge_with_types field.

work_time_range_from_start

Type: string

Minimal and maximal duration of time from start of route until rest, format: [D.]HH[:MM[:SS]] - [D.]HH[:MM[:SS]] ("04:00 - 05:30").

work_time_range_till_rest

Type: string

Minimal and maximal duration of work before rest, format: [D.]HH[:MM[:SS]] - [D.]HH[:MM[:SS]] ("04:00 - 05:30").

shifts_penalty

Penalties for shift constraints violation.

Name

Description

early

Type: shifts_penalty_early

Penalty components for shifts started too early (used instead of out_of_time penalty). If the shift was also finished too early, it is applied to the shift finish too. More information

late

Type: shifts_penalty_late

Penalty components for shifts finished too late (used instead of out_of_time penalty). This penalty is applied for being late to the end of the shift's time window or violating the max_duration_s bound. If both are violated simultaneously, the penalty is applied twice and summed. If the shift was started after the end of the time window, this penalty for the start time point is also added separately. More information

max_mileage

Type: shifts_penalty_max_mileage

Penalties applied for violating shift's max_mileage_km limit. More information

out_of_time

Type: shifts_penalty_out_of_time

Penalty components for time window failure. Can be used to set the values of early and late options simultaneously, and each value is overridden if the respective option is also defined. More information

stop_excess

Type: shifts_penalty_stop_excess

Penalties applied for violating shift's maximal_stops limit. More information

stop_lack

Type: shifts_penalty_stop_lack

Penalties applied for violating shift's minimal_stops limit. More information

unique_stop_lack

Type: shifts_penalty_unique_stop_lack

Penalties applied for violating shift's minimal_stops limit. More information

vehicles_trailer_capacity

Trailer capacity.

Name

Description

custom

Type: number

Amount of custom units a trailer is able to carry. Capacities in custom units are defined in format "name": size, where name is a string denoting the name of a unit, and size is a non-negative floating-point number denoting the vehicle capacity with respect to this unit. If the name of a unit is present in objects (locations/couriers/vehicles/trailers), but not this, it is assumed that the capacity is unlimited.

Min value: 0

limits

Type: trailer_capacity_limits

Trailer load limits.

units

Type: number

Amount of custom units a trailer is able to carry.

Default: 1000000000

Min value: 0

volume

Type: trailer_capacity_volume

Trailer dimensions.

weight_kg

Type: number

Weight a trailer is able to carry, kilograms.

Default: 1000000000

Min value: 0

vehicles_trailer_cost

Trailer cost.

Name

Description

fixed

Type: number

Cost per fact of trailer use (cost occurred if trailer is used in route).

Default: 3000

Min value: 0

hour

Type: number

Cost of using trailer per hour.

Default: 100

Min value: 0

km

Type: number

Cost of using trailer per kilometer.

Default: 8

Min value: 0

location

Type: number

Cost of using trailer per location (default 0).

Default: 0

Min value: 0

run

Type: number

Cost per single vehicle run from depot to locations.

Default: 0

Min value: 0

tonne_km

Type: number

Cost of carrying one tonne for one kilometer (default 0).

Default: 0

Min value: 0

vehicles_trailer_max_capacity_difference

The maximum difference between the loading of the trailer and the head.

Name

Description

custom

Type: number

A maximum allowable difference in the loaded amount of custom units between the trailer and the head. The difference in custom units are defined in format "name": size, where name is a string denoting the name of a unit, and size is a floating-point number denoting the allowable difference with respect to this unit. If the name of a unit is present in objects (locations/couriers/vehicles/trailers), but not this, it is assumed that there is no restriction.

units

Type: number

The maximum allowable difference in the loaded amount of custom units between the trailer and the head.

volume_cbm

Type: number

The maximum allowable difference in the loaded volume between the trailer and the head, cubic meters.

weight_kg

Type: number

The maximum allowable difference in the loaded weight between the trailer and the head, kilograms.

vehicles_trailer_rolling_time

Time for loading shipments from trailer to head. In case multiple types of time are specified, the one that takes the most time is chosen. In case none of them is specified, only fixed loading time is used.

Name

Description

fixed_time_s

Type: number

Fixed time spent each time a trailer is loaded or unloaded, seconds.

Default: 0

Min value: 0

Max value: 3153600000

s_per_kg

Type: number

Loading time per kg, seconds.

Default: 0

Min value: 0

Max value: 3153600000

s_per_m3

Type: number

Loading time per cubic meter, seconds.

Default: 0

Min value: 0

Max value: 3153600000

s_per_unit

Type: number

Loading time per unit, seconds.

Default: 0

Min value: 0

Max value: 3153600000

vehicles_walking_courier_capacity

Capacity of a courier

Name

Description

units

Type: number

Amount of custom units a courier is able to carry.

Default: 1000000000

Min value: 0

vehicles_walking_courier_cost

Courier work cost.

Name

Description

hour

Type: number

Cost per hour of courier walking routes.

Default: 0

Min value: 0

km

Type: number

Cost per kilometer walked by courier.

Default: 0

Min value: 0

depot_location_penalty_early

Penalty components for early service (used instead of out_of_time penalty).

Name

Description

fixed

Type: number

Fixed penalty applied if a vehicle starts serving the depot before the start of the time window. The penalty is applied for any early service, including opening the depot, unloading or uploading the vehicle at the depot or closing the depot. It is applied once for each visit of a depot during which the depot was served early.

Default: 1000

minute

Type: number

Penalty for each minute of early service of the depot. Applied in the same cases as the fixed penalty.

Default: 17

depot_location_penalty_late

Penalty components for late visits (used instead of out_of_time penalty). Whether the start or the end of service during the visit is used to penalize for lateness is determined by the penalize_late_service option.

Name

Description

fixed

Type: number

Fixed penalty applied for each visit of the depot after the end of the time window. Starting from a depot is counted for a visit.

Default: 1000

minute

Type: number

Penalty for each minute of lateness for every visit of the depot after the end of the time window.

Default: 17

depot_location_penalty_out_of_time

Penalty components for time window failure. Can be used to set the values of early and late options simultaneously, and each value is overridden if the respective option is also defined.

Name

Description

fixed

Type: number

Fixed penalty applied if the depot is visited outside of the time window. See the specifications of early and late options for more details in each case.

Default: 1000

minute

Type: number

Penalty for each minute of being outside of the time window of the depot. See the specifications of early and late options for more details in each case.

Default: 17

depot_location_penalty_package_throughput

Penalty components for package throughput exceeding.

Name

Description

fixed

Type: number

Fixed penalty applied if throughput is exceeded.

Default: 1000

kg

Type: number

Penalty for each extra kg of throughput exceeding.

Default: 50

unit

Type: number

Penalty for each extra custom unit of throughput exceeding (units field).

Default: 100

depot_location_penalty_throughput

Penalty components for throughput exceeding.

Name

Description

fixed

Type: number

Fixed penalty applied if throughput is exceeded.

Default: 1000

kg

Type: number

Penalty for each extra kg of throughput exceeding.

Default: 50

unit

Type: number

Penalty for each extra custom unit of throughput exceeding (units field).

Default: 100

vehicle

Type: number

Penalty for each extra vehicle per hour of throughput exceeding.

Default: 100000

depot_location_throughput_vehicle_count_0_item

Name

Description

time_window

Type: string

The time window during which the specified restriction applies. The windows must not intersect with each other, and their union must contain the defined working hours of the corresponding depot. If the restriction is not defined on any time interval outside depot working hours, then it is considered equal to zero.

value

Type: number

Throughput, simultaneously vehicles.

Min value: 0

Max value: 1000000000

depots_penalty_early

Penalty components for early service (used instead of out_of_time penalty). More information

Name

Description

fixed

Type: number

Fixed penalty applied if a courier starts beeing served at the depot before the beginning of the time window. The penalty is applied for any early service, including opening the depot, unloading or uploading the courier at the depot or closing the depot. It is applied once for each visit of a depot during which the courier was served early. More information

Default: 1000

minute

Type: number

Penalty for each minute of early service of the depot. Applied in the same cases as the fixed penalty. More information

Default: 17

depots_penalty_late

Penalty components for late visits (used instead of out_of_time penalty). Whether the start or the end of service during the visit is used to penalize for lateness is determined by the penalize_late_service option. More information

Name

Description

fixed

Type: number

Fixed penalty applied for each visit of the depot after the end of the time window. Starting from a depot is counted for a visit. More information

Default: 1000

minute

Type: number

Penalty for each minute of lateness for every visit of the depot after the end of the time window. More information

Default: 17

depots_penalty_out_of_time

Penalty components for time window failure. Can be used to set the values of early and late options simultaneously, and each value is overridden if the respective option is also defined. More information

Name

Description

fixed

Type: number

Fixed penalty applied if the depot is visited outside of the time window. See the specifications of early and late options. More information

Default: 1000

minute

Type: number

Penalty for each minute of being outside of the time window of the depot. See the specifications of early and late options. More information

Default: 17

depots_penalty_package_throughput

Penalty components for package throughput exceeding. More information

Name

Description

fixed

Type: number

Fixed penalty applied if throughput is exceeded.

Default: 1000

kg

Type: number

Penalty for each extra kg of throughput exceeding.

Default: 50

unit

Type: number

Penalty for each extra custom unit of throughput exceeding (units field).

Default: 100

depots_penalty_throughput

Penalty components for throughput exceeding. More information

Name

Description

fixed

Type: number

Fixed penalty applied if throughput is exceeded.

Default: 1000

kg

Type: number

Penalty for each extra kg of throughput exceeding.

Default: 50

unit

Type: number

Penalty for each extra custom unit of throughput exceeding (units field).

Default: 100

vehicle

Type: number

Penalty for each extra vehicle per hour of throughput exceeding.

Default: 100000

throughput_vehicle_count_0_item

Name

Description

time_window

Type: string

The time window during which the specified restriction applies. The windows must not intersect with each other, and their union must contain the defined working hours of the corresponding depot. If the restriction is not defined on any time interval outside depot working hours, then it is considered equal to zero. More information

value

Type: number

Throughput, simultaneously vehicles. More information

Min value: 0

Max value: 1000000000

points_throughputs_penalty_throughput

Penalty components for throughput exceeding. More information

Name

Description

fixed

Type: number

Fixed penalty applied if throughput is exceeded.

Default: 1000

kg

Type: number

Penalty for each extra kg of throughput exceeding.

Default: 50

unit

Type: number

Penalty for each extra custom unit of throughput exceeding (units field).

Default: 100

vehicle

Type: number

Penalty for each extra vehicle per hour of throughput exceeding.

Default: 100000

_penalty

Penalties applied for violations of work break conditions.

Name

Description

early

Type: penalty_early

Penalty components for early work break.

late

Type: penalty_late

Penalty components for late work break.

shifts_penalty_early

Penalty components for shifts started too early (used instead of out_of_time penalty). If the shift was also finished too early, it is applied to the shift finish too. More information

Name

Description

fixed

Type: number

Fixed penalty applied if the vehicle starts or finishes the shift before the start of the time window.

Default: 1000

minute

Type: number

Penalty for each minute of earliness if the vehicle starts or finishes the shift before the start of the time window.

Default: 17

shifts_penalty_late

Penalty components for shifts finished too late (used instead of out_of_time penalty). This penalty is applied for being late to the end of the shift's time window or violating the max_duration_s bound. If both are violated simultaneously, the penalty is applied twice and summed. If the shift was started after the end of the time window, this penalty for the start time point is also added separately. More information

Name

Description

fixed

Type: number

Fixed penalty applied if the vehicle starts or finishes the shift after the end of the time window or shift duration exceeds the max_duration_s bound.

Default: 1000

minute

Type: number

Penalty for each minute of lateness if the vehicle starts or finishes the shift after the end of the time window or if the vehicle spends more than max_duration_s seconds at the shift.

Default: 17

shifts_penalty_max_mileage

Penalties applied for violating shift's max_mileage_km limit. More information

Name

Description

fixed

Type: number

Fixed penalty applied if a vehicle shift has mileage greater than max_mileage_km.

Default: 1000

Min value: 0

km

Type: number

Penalty applied per each extra kilometer when shift mileage is greater than max_mileage_km shift parameter.

Default: 100

Min value: 0

shifts_penalty_out_of_time

Penalty components for time window failure. Can be used to set the values of early and late options simultaneously, and each value is overridden if the respective option is also defined. More information

Name

Description

fixed

Type: number

Fixed penalty applied if the vehicle starts or finishes the shift outside of the time window. See the specifications of early and late options. More information

Default: 1000

minute

Type: number

Penalty for each minute of being outside of the time window of the shift. See the specifications of early and late options. More information

Default: 17

shifts_penalty_stop_excess

Penalties applied for violating shift's maximal_stops limit. More information

Name

Description

fixed

Type: number

Fixed penalty applied if a vehicle shift has greater than maximal_stops stops.

Default: 0

Min value: 0

per_stop

Type: number

Penalty applied per each extra stop when shift stop count is greater than maximal_stops parameter.

Default: 0

Min value: 0

shifts_penalty_stop_lack

Penalties applied for violating shift's minimal_stops limit. More information

Name

Description

fixed

Type: number

Fixed penalty applied if a vehicle shift has less than minimal_stops stops.

Default: 0

Min value: 0

per_stop

Type: number

Penalty applied per each missing stop when shift stop count is less than minimal_stops parameter.

Default: 0

Min value: 0

shifts_penalty_unique_stop_lack

Penalties applied for violating shift's minimal_stops limit. More information

Name

Description

fixed

Type: number

Fixed penalty applied if a vehicle shift has less than minimal_stops stops.

Default: 0

Min value: 0

per_stop

Type: number

Penalty applied per each missing stop when shift stop count is less than minimal_stops parameter.

Default: 0

Min value: 0

trailer_capacity_limits

Trailer load limits.

Name

Description

units_perc

Type: number

Upper limit of total shipments size in custom units as a percentage of a trailer capacity

Default: 100

Min value: 0

volume_perc

Type: number

Upper limit of total shipments volume as a percentage of trailer volume. For container fitting purposes it is assumed that each dimension is multiplied by the cubic root of (0.01 * volume_perc).

Default: 100

Min value: 0

weight_perc

Type: number

Upper limit of total shipments weight as a percentage of total weight the trailer is allowed to carry.

Default: 100

Min value: 0

trailer_capacity_volume

Trailer dimensions.

Name

Description

depth_m*

Type: number

Depth, meters.

Default: 1000

Min value: 0

Max value: 1000000

height_m*

Type: number

Height, meters.

Default: 1000

Min value: 0

Max value: 1000000

width_m*

Type: number

Width, meters.

Default: 1000

Min value: 0

Max value: 1000000

penalty_early

Penalty components for early work break.

Name

Description

fixed

Type: number

Fixed penalty applied if a courier starts a work break while they worked for a less than the specified minimal work duration since the start of work or the previous work break ending.More information

Default: 1000

minute

Type: number

Penalty for each minute of an early start of work break if a courier starts a work break while they worked for a less than the specified minimal work duration since the start of work or the previous work break ending.More information

Default: 17

penalty_late

Penalty components for late work break.

Name

Description

fixed

Type: number

Fixed penalty applied if a worker starts a work break while they worked for a more than the specified maximal work duration since the start of work or the previous work break ending.More information

Default: 1000

minute

Type: number

Penalty for each minute of a late start of work break if a worker starts a work break while they worked for a more than the specified maximal work duration since the start of work or the previous work break ending.More information

Default: 17

Responses

202 Accepted

Task has been queued for execution.

Body

application/json
{
    "id": "string",
    "message": "string",
    "status": {
        "queued": 0,
        "started": 0,
        "completed": 0,
        "cancelled": 0,
        "estimate": 0
    }
}

Name

Description

id*

Type: string

Task unique id.

status*

Type: task_info_status

Task statuses object. Keys are task statuses, values are UNIX timestamps for corresponding status.

Possible status transits: queued -> started -> (completed or cancelled)

message

Type: string

Human-readable description of task state.

task_info_status

Task statuses object. Keys are task statuses, values are UNIX timestamps for corresponding status.

Possible status transits: queued -> started -> (completed or cancelled)

Name

Description

queued*

Type: number

Task has been queued for execution.

cancelled

Type: number

Task execution has been cancelled by user or system due to timeout or error.

completed

Type: number

Task execution completed with result or error.

estimate

Type: number

Estimated time when task expected to be completed. The time estimation may change during solving process. The estimate is valid for approximately 75% of tasks (they may be ready 5-15 seconds before "estimate")Some tasks may require more time for calculation, typically this extra time is not more than 1 minute.

started

Type: number

Task execution has been started.

400 Bad Request

Invalid JSON in POST request body.

Body

application/json
{
    "error": {
        "message": "string",
        "incident_id": "string"
    }
}

Name

Description

error*

Type: error_error

Error description.

error_error

Error description.

Name

Description

message*

Type: string

Human-readable error description.

incident_id

Type: string

Unique identifier of error incident. In case of API error, this identifier can be provided to support for investigation.

Body

text/html
{}

403 Forbidden

Deprecated

You do not have permission to add MVRP tasks.

500 Internal Server Error

Server error during request processing.

Body

application/json
{
    "error": {
        "message": "string",
        "incident_id": "string"
    }
}

Name

Description

error*

Type: error_error

Error description.

Body

text/html
{}

503 Service Unavailable

Not enough resources available to run the task.

Body

application/json
{
    "error": {
        "message": "string",
        "incident_id": "string"
    }
}

Name

Description

error*

Type: error_error

Error description.

Body

text/html
{}