Unassigned jobs
This example demonstrates one job which is unassigned due to unreachable location.
Problem
{
"plan": {
"jobs": [
{
"id": "job1",
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.52599,
"lng": 13.45413
},
"duration": 300.0,
"times": [
[
"2019-07-04T09:00:00Z",
"2019-07-04T18:00:00Z"
],
[
"2019-07-05T09:00:00Z",
"2019-07-05T18:00:00Z"
]
]
}
],
"demand": [
1
]
}
]
},
{
"id": "job2",
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.4576,
"lng": 13.1778
},
"duration": 240.0,
"times": [
[
"2019-07-04T10:00:00Z",
"2019-07-04T16:00:00Z"
]
]
}
],
"demand": [
1
]
}
]
},
{
"id": "job3",
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.5165,
"lng": 13.3808
},
"duration": 300.0
}
],
"demand": [
1
]
}
]
}
]
},
"fleet": {
"vehicles": [
{
"typeId": "vehicle",
"vehicleIds": [
"vehicle_1"
],
"profile": "normal_car",
"costs": {
"fixed": 22.0,
"distance": 0.0002,
"time": 0.004806
},
"shifts": [
{
"start": {
"earliest": "2019-07-04T09:00:00Z",
"location": {
"lat": 52.5316,
"lng": 13.3884
}
},
"latest": {
"time": "2019-07-04T18:00:00Z",
"location": {
"lat": 52.5316,
"lng": 13.3884
}
}
}
],
"capacity": [
10
]
}
],
"profiles": [
{
"name": "normal_car",
"type": "car"
}
]
}
}
Solution
{
"statistic": {
"cost": 43.091514000000004,
"distance": 13687,
"duration": 3819,
"times": {
"driving": 3219,
"serving": 600,
"waiting": 0,
"break": 0
}
},
"tours": [
{
"vehicleId": "vehicle_1",
"typeId": "vehicle",
"shiftIndex": 0,
"stops": [
{
"location": {
"lat": 52.5316,
"lng": 13.3884
},
"time": {
"arrival": "2019-07-04T09:00:00Z",
"departure": "2019-07-04T09:00:00Z"
},
"distance": 0,
"load": [
2
],
"activities": [
{
"jobId": "departure",
"type": "departure"
}
]
},
{
"location": {
"lat": 52.5165,
"lng": 13.3808
},
"time": {
"arrival": "2019-07-04T09:12:41Z",
"departure": "2019-07-04T09:17:41Z"
},
"distance": 2641,
"load": [
1
],
"activities": [
{
"jobId": "job3",
"type": "delivery"
}
]
},
{
"location": {
"lat": 52.52599,
"lng": 13.45413
},
"time": {
"arrival": "2019-07-04T09:38:22Z",
"departure": "2019-07-04T09:43:22Z"
},
"distance": 8404,
"load": [
0
],
"activities": [
{
"jobId": "job1",
"type": "delivery"
}
]
},
{
"location": {
"lat": 52.5316,
"lng": 13.3884
},
"time": {
"arrival": "2019-07-04T10:03:39Z",
"departure": "2019-07-04T10:03:39Z"
},
"distance": 13687,
"load": [
0
],
"activities": [
{
"jobId": "arrival",
"type": "arrival"
}
]
}
],
"statistic": {
"cost": 43.091514000000004,
"distance": 13687,
"duration": 3819,
"times": {
"driving": 3219,
"serving": 600,
"waiting": 0,
"break": 0
}
}
}
],
"unassigned": [
{
"jobId": "job2",
"reasons": [
{
"code": "REACHABLE_CONSTRAINT",
"description": "location unreachable"
}
]
}
]
}