我想使用 findsequence 或 findsequence2 创建交货计划。用例是在我的司机交付时间(班次)期间为给定数量的交付点提供服务,并遵守交付时间框架(客户承诺)。
例如,我需要从下午 2:45 到下午 5:00 进行一次轮班,在此期间我需要交付 4 位客户(其中 2 位在下午 3 点到 4 点之间,另外 2 位在下午 3:45 到 4:45 之间)。前后 15 分钟开车返回仓库(如果需要)。
然后我像这样准备我的 JSON 正文:
{
"configuration": {
"optimizations": {
"traffic": "automatic",
"waitingTime": {
"bufferTime": 0,
"reduce": true
}
}
},
"fleet": {
"profiles": [
{
"type":"truck",
"name":"truck1",
"avoid":["dirtRoad","tunnel","tollRoad","motorway","ferry"],
"grossWeight":"1500",
"height":"270",
"length":"500",
"width":"200"
}
],
"types": [
{
"amount": 1,
"capacity": [48],
"costs": {
"distance": 0.0001,
"fixed": 22,
"time": 0.0048
},
"id": "trucktour",
"limits": {
"maxDistance": 90000,
"shiftTime": 10800
},
"profile": "truck1",
"shifts": [
{
"breaks": [],
"end": {
"location": {
"lat": 50.641637553647136,
"lng": 3.1477106404827118
},
"time": "2021-08-27T17:00:00.000+00:00"
},
"start": {
"location": {
"lat": 50.641637553647136,
"lng": 3.1477106404827118
},
"time": "2021-08-27T14:45:00.000+00:00"
}
}
],
"skills": []
}
]
},
"id": "slot-15h",
"plan": {
"jobs": [
{
"id": "truck1",
"places": {
"deliveries": [
{
"demand": [4],
"duration": 300,
"location": {
"lat": 50.6595992042328,
"lng": 3.1470162269920223
},
"tag": "customer1",
"times": [["2021-08-27T15:00:00.000+00:00","2021-08-27T16:00:00.000+00:00"]]
},
{
"demand": [4],
"duration": 300,
"location": {
"lat": 50.65862409934626,
"lng": 3.1391219088675673
},
"tag": "customer2",
"times": [["2021-08-27T15:00:00.000+00:00","2021-08-27T16:00:00.000+00:00"]]
},
{
"demand": [4],
"duration": 300,
"location": {
"lat": 50.60789339043843,
"lng": 3.162205326990276
},
"tag": "customer3",
"times": [["2021-08-27T15:45:00.000+00:00","2021-08-27T16:45:00.000+00:00"]]
},
{
"demand": [4],
"duration": 300,
"location": {
"lat": 50.67137277026562,
"lng": 3.091246340483741
},
"tag": "customer4",
"times": [["2021-08-27T15:45:00.000+00:00","2021-08-27T16:45:00.000+00:00"]]
}
],
"pickups": []
},
"skills": []
}
],
"relations": [
]
}
}
我使用这个端点:https ://wps.hereapi.com/v8/findsequence
=> 尽管这个块:
"waitingTime": {
"bufferTime": 0,
"reduce": true
}
没有减少应用的交付框架,也没有优化(减少轮班时间):第一个客户在窗口集之外交付(在 14:50 而不是 15:00)。
{
"problemId": "slot-15h",
"statistic": {
"cost": null,
"distance": 30934,
"duration": 5709,
"times": {
"break": 0,
"driving": 4509,
"serving": 1200,
"waiting": 0
}
},
"tours": [
{
"vehicleId": "truck1",
"typeId": null,
"stops": [
{
"location": {
"lat": 50.641637553647136,
"lng": 3.1477106404827118
},
"time": {
"arrival": null,
"departure": "2021-08-27T14:45:00.000+0000"
},
"load": [],
"activities": [
{
"jobId": "departure",
"jobTag": "departure",
"type": null,
"location": null,
"time": null
}
]
},
{
"location": {
"lat": 50.65862409934626,
"lng": 3.1391219088675673
},
"time": {
"arrival": "2021-08-27T14:54:06.000+0000",
"departure": "2021-08-27T14:59:06.000+0000"
},
"load": [],
"activities": [
{
"jobId": "customer2",
"jobTag": "customer2",
"type": null,
"location": null,
"time": null
}
]
},
{
"location": {
"lat": 50.6595992042328,
"lng": 3.1470162269920223
},
"time": {
"arrival": "2021-08-27T15:03:49.000+0000",
"departure": "2021-08-27T15:08:49.000+0000"
},
"load": [],
"activities": [
{
"jobId": "customer1",
"jobTag": "customer1",
"type": null,
"location": null,
"time": null
}
]
},
{
"location": {
"lat": 50.67137277026562,
"lng": 3.091246340483741
},
"time": {
"arrival": "2021-08-27T15:24:23.000+0000",
"departure": "2021-08-27T15:29:23.000+0000"
},
"load": [],
"activities": [
{
"jobId": "customer4",
"jobTag": "customer4",
"type": null,
"location": null,
"time": null
}
]
},
{
"location": {
"lat": 50.60789339043843,
"lng": 3.162205326990276
},
"time": {
"arrival": "2021-08-27T15:58:16.000+0000",
"departure": "2021-08-27T16:03:16.000+0000"
},
"load": [],
"activities": [
{
"jobId": "customer3",
"jobTag": "customer3",
"type": null,
"location": null,
"time": null
}
]
},
{
"location": {
"lat": 50.641637553647136,
"lng": 3.1477106404827118
},
"time": {
"arrival": "2021-08-27T16:20:09.000+0000",
"departure": null
},
"load": [],
"activities": [
{
"jobId": "arrival",
"jobTag": "arrival",
"type": null,
"location": null,
"time": null
}
]
}
],
"statistic": {
"cost": null,
"distance": 30934,
"duration": 5709,
"times": {
"break": 0,
"driving": 4509,
"serving": 1200,
"waiting": 0
}
}
}
],
"unassigned": null
}
正如我在这里看到的另一个具有相同描述的问题:Waypoint Sequencing API Don't Honor Delivery Windows (试图支持它但被删除了,所以我想我必须自己打开一个问题?)
我假设这个 API 是否存在问题(可能因为它似乎是一个预览版),我们是否犯了同样的错误。请问可以支持吗?
我尝试了第二个 API: https ://wps.hereapi.com/v8/findsequence2
这一次,考虑到我的时间范围,并在轮班中增加了一些等待时间。好消息!我希望这次可以优化我的日程安排并延迟我的卡车的出发时间,就像在之前的 API 中提出的“waitingTime”/“reduce”参数一样。findsequence2 是否存在此类参数?
我找到了这个(未记录):timingCompatibility(字符串)
请问这个怎么用?参数的目的是什么?
相同的计算问题(字符串)。
谢谢,
问候