Hi,
We use the optimisation api with shipments using time windows. These are persons transported with different waiting times (expressed in the time windows). The objective is to have a minimum completion time of the whole trip.
The parameter sent to the api is the following:
{
“vehicles”: [
{
“vehicle_id”: “vehicle_21”,
“type_id”: “vehicle_type_21”
}
],
“vehicle_types”: [
{
“type_id”: “vehicle_type_21”,
“capacity”: [
5,
2
],
“profile”: “car”,
“speed_factor”: 1
}
],
“shipments”: [
{
“id”: “person_101”,
“pickup”: {
“address”: {
“location_id”: “address_23”,
“lon”: 12.9243038,
“lat”: 50.8275202
},
“duration”: 180,
“time_windows”: [
{
“earliest”: 0,
“latest”: 86400
}
]
},
“delivery”: {
“address”: {
“location_id”: “address_22”,
“lon”: 12.981500001,
“lat”: 50.9857286
},
“time_windows”: [
{
“earliest”: 25200,
“latest”: 27000
}
],
“preparation_time”: 600
},
“size”: [
0,
1
]
},
{
“id”: “person_104”,
“pickup”: {
“address”: {
“location_id”: “address_21”,
“lon”: 12.922956,
“lat”: 50.832833
},
“duration”: 600,
“time_windows”: [
{
“earliest”: 0,
“latest”: 86400
}
]
},
“delivery”: {
“address”: {
“location_id”: “address_22”,
“lon”: 12.981500001,
“lat”: 50.9857286
},
“time_windows”: [
{
“earliest”: 25200,
“latest”: 27000
}
],
“preparation_time”: 600
},
“size”: [
2,
0
]
},
{
“id”: “person_107”,
“pickup”: {
“address”: {
“location_id”: “address_25”,
“lon”: 12.9688128,
“lat”: 50.8739834
},
“duration”: 60,
“time_windows”: [
{
“earliest”: 0,
“latest”: 86400
}
]
},
“delivery”: {
“address”: {
“location_id”: “address_22”,
“lon”: 12.981500001,
“lat”: 50.9857286
},
“time_windows”: [
{
“earliest”: 26100,
“latest”: 27900
}
],
“preparation_time”: 600
},
“size”: [
1,
0
]
}
],
“objectives”: [
{
“type”: “min”,
“value”: “completion_time”
}
],
“configuration”: {
“routing”: {
“calc_points”: false
}
}
}
The algorithm drops the persons as early as possible (based on the earliest time) exactly on 25200. However, due to all shipments are delivered at the same address, we witnessed a strange waiting time of 900 seconds on the shipment delivery where it has to be delivered at earliest on 26100.
We are wondering why does the algorithm produces this strange waiting time especially that it could be possible to avoid it when not targeting basically the earliest time window, but a time within that delivery time window with considering the waiting times ?