Here api 如何在Here Maps routing FindSequence API中为目的地使用时间框架

Here api 如何在Here Maps routing FindSequence API中为目的地使用时间框架,here-api,Here Api,我需要计算出为一家公司发货的最佳订单。我在这里使用Maps路由FindSequence API(如中所述)。某些点需要在特定时间段内(在本例中为上午11:00之前)访问。因此,我对这些目的地使用约束acc。我希望算法能对这些位置进行优先级排序,但恰恰相反,答案很早就给出了,不过是第二天 这是我的要求: https://wse.ls.hereapi.com/2/findsequence.json?start=Origin;4.668216,-74.0663873&destination1=

我需要计算出为一家公司发货的最佳订单。我在这里使用Maps路由FindSequence API(如中所述)。某些点需要在特定时间段内(在本例中为上午11:00之前)访问。因此,我对这些目的地使用约束acc。我希望算法能对这些位置进行优先级排序,但恰恰相反,答案很早就给出了,不过是第二天

这是我的要求:

https://wse.ls.hereapi.com/2/findsequence.json?start=Origin;4.668216,-74.0663873&destination1=1;4.65656493,-74.04665622;st:600&destination2=2;4.7462899,-74.0562663;st:600&destination3=3;4.6721945,-74.0496587;st:600&destination4=4;4.6638526,-74.0515201;st:600&destination5=5;4.6802897,-74.0599083;st:600&destination6=6;4.68673,-74.05051;st:600&destination7=7;4.7556504,-74.0788032;st:600&destination8=8;4.6518,-74.05605;st:600;acc:mo07:00:00-05:00|mo11:00:00-05:00&destination9=9;4.69521875,-74.03189087;st:600;acc:mo07:00:00-05:00|mo11:00:00-05:00&destination10=10;4.70111260,-74.04937187;st:600;acc:mo07:00:00-05:00|mo11:00:00-05:00&destination11=11;4.6647333,-74.0623414;st:600&destination12=12;4.67798040,-74.04984117;st:600&destination13=13;4.6958095,-74.0277338;st:600&destination14=14;4.7538976,-74.0471541;st:600&destination15=15;4.72231908,-74.02900595;st:600&mode=fastest;car;traffic:enabled&departure=2020-09-30T07:00:00-05:00&apiKey=XXXXXXXXX
答案如下:

{"results": [
{
"waypoints": [
{
"id": "Origin",
"lat": 4.668216,
"lng": -74.0663873,
"sequence": 0,
"estimatedArrival": null,
"estimatedDeparture": "2020-09-30T07:00:00-05:00",
"fulfilledConstraints": []
},
{
"id": "15",
"lat": 4.72231908,
"lng": -74.02900595,
"sequence": 1,
"estimatedArrival": "2020-09-30T07:16:50-05:00",
"estimatedDeparture": "2020-09-30T07:26:50-05:00",
"fulfilledConstraints": [
    "st:600"
]
},
{
"id": "14",
"lat": 4.7538976,
"lng": -74.0471541,
"sequence": 2,
"estimatedArrival": "2020-09-30T07:37:55-05:00",
"estimatedDeparture": "2020-09-30T07:47:55-05:00",
"fulfilledConstraints": [
    "st:600"
]
},
{
"id": "13",
"lat": 4.6958095,
"lng": -74.0277338,
"sequence": 3,
"estimatedArrival": "2020-09-30T08:06:38-05:00",
"estimatedDeparture": "2020-09-30T08:16:38-05:00",
"fulfilledConstraints": [
    "st:600"
]
},
{
"id": "12",
"lat": 4.6779804,
"lng": -74.04984117,
"sequence": 4,
"estimatedArrival": "2020-09-30T08:26:05-05:00",
"estimatedDeparture": "2020-09-30T08:36:05-05:00",
"fulfilledConstraints": [
    "st:600"
]
},
{
"id": "11",
"lat": 4.6647333,
"lng": -74.0623414,
"sequence": 5,
"estimatedArrival": "2020-09-30T08:44:23-05:00",
"estimatedDeparture": "2020-09-30T08:54:23-05:00",
"fulfilledConstraints": [
    "st:600"
]
},
{
"id": "7",
"lat": 4.7556504,
"lng": -74.0788032,
"sequence": 6,
"estimatedArrival": "2020-09-30T09:23:04-05:00",
"estimatedDeparture": "2020-09-30T09:33:04-05:00",
"fulfilledConstraints": [
    "st:600"
]
},
{
"id": "6",
"lat": 4.68673,
"lng": -74.05051,
"sequence": 7,
"estimatedArrival": "2020-09-30T10:01:51-05:00",
"estimatedDeparture": "2020-09-30T10:11:51-05:00",
"fulfilledConstraints": [
    "st:600"
]
},
{
"id": "5",
"lat": 4.6802897,
"lng": -74.0599083,
"sequence": 8,
"estimatedArrival": "2020-09-30T10:18:34-05:00",
"estimatedDeparture": "2020-09-30T10:28:34-05:00",
"fulfilledConstraints": [
    "st:600"
]
},
{
"id": "4",
"lat": 4.6638526,
"lng": -74.0515201,
"sequence": 9,
"estimatedArrival": "2020-09-30T10:39:38-05:00",
"estimatedDeparture": "2020-09-30T10:49:38-05:00",
"fulfilledConstraints": [
    "st:600"
]
},
{
"id": "3",
"lat": 4.6721945,
"lng": -74.0496587,
"sequence": 10,
"estimatedArrival": "2020-09-30T10:55:34-05:00",
"estimatedDeparture": "2020-09-30T11:05:34-05:00",
"fulfilledConstraints": [
    "st:600"
]
},
{
"id": "2",
"lat": 4.7462899,
"lng": -74.0562663,
"sequence": 11,
"estimatedArrival": "2020-09-30T11:25:12-05:00",
"estimatedDeparture": "2020-09-30T11:35:12-05:00",
"fulfilledConstraints": [
    "st:600"
]
},
{
"id": "1",
"lat": 4.65656493,
"lng": -74.04665622,
"sequence": 12,
"estimatedArrival": "2020-09-30T11:59:45-05:00",
"estimatedDeparture": "2020-09-30T12:09:45-05:00",
"fulfilledConstraints": [
    "st:600"
]
},
{
"id": "10",
"lat": 4.7011126,
"lng": -74.04937187,
"sequence": 13,
"estimatedArrival": "2020-09-30T12:27:22-05:00",
"estimatedDeparture": "2020-10-05T07:10:00-05:00",
"fulfilledConstraints": [
    "acc:mo07:00:00-05:00|mo11:00:00-05:00;st:600"
]
},
{
"id": "9",
"lat": 4.69521875,
"lng": -74.03189087,
"sequence": 14,
"estimatedArrival": "2020-10-05T07:16:08-05:00",
"estimatedDeparture": "2020-10-05T07:26:08-05:00",
"fulfilledConstraints": [
    "acc:mo07:00:00-05:00|mo11:00:00-05:00;st:600"
]
},
{
"id": "8",
"lat": 4.6518,
"lng": -74.05605,
"sequence": 15,
"estimatedArrival": "2020-10-05T07:37:33-05:00",
"estimatedDeparture": null,
"fulfilledConstraints": [
    "acc:mo07:00:00-05:00|mo11:00:00-05:00;st:600"
]
}
],
"distance": "109141",
"time": "434853",
"interconnections": [
{
"fromWaypoint": "Origin",
"toWaypoint": "15",
"distance": 8753.0,
"time": 1010.0,
"rest": 0.0,
"waiting": 0.0
},
{
"fromWaypoint": "15",
"toWaypoint": "14",
"distance": 5943.0,
"time": 665.0,
"rest": 0.0,
"waiting": 0.0
},
{
"fromWaypoint": "14",
"toWaypoint": "13",
"distance": 10043.0,
"time": 1123.0,
"rest": 0.0,
"waiting": 0.0
},
{
"fromWaypoint": "13",
"toWaypoint": "12",
"distance": 4369.0,
"time": 567.0,
"rest": 0.0,
"waiting": 0.0
},
{
"fromWaypoint": "12",
"toWaypoint": "11",
"distance": 3201.0,
"time": 498.0,
"rest": 0.0,
"waiting": 0.0
},
{
"fromWaypoint": "11",
"toWaypoint": "7",
"distance": 14941.0,
"time": 1721.0,
"rest": 0.0,
"waiting": 0.0
},
{
"fromWaypoint": "7",
"toWaypoint": "6",
"distance": 13582.0,
"time": 1727.0,
"rest": 0.0,
"waiting": 0.0
},
{
"fromWaypoint": "6",
"toWaypoint": "5",
"distance": 2466.0,
"time": 403.0,
"rest": 0.0,
"waiting": 0.0
},
{
"fromWaypoint": "5",
"toWaypoint": "4",
"distance": 3945.0,
"time": 664.0,
"rest": 0.0,
"waiting": 0.0
},
{
"fromWaypoint": "4",
"toWaypoint": "3",
"distance": 2131.0,
"time": 356.0,
"rest": 0.0,
"waiting": 0.0
},
{
"fromWaypoint": "3",
"toWaypoint": "2",
"distance": 10962.0,
"time": 1178.0,
"rest": 0.0,
"waiting": 0.0
},
{
"fromWaypoint": "2",
"toWaypoint": "1",
"distance": 12803.0,
"time": 1473.0,
"rest": 0.0,
"waiting": 0.0
},
{
"fromWaypoint": "1",
"toWaypoint": "10",
"distance": 6721.0,
"time": 1057.0,
"rest": 0.0,
"waiting": 412358.0
},
{
"fromWaypoint": "10",
"toWaypoint": "9",
"distance": 2564.0,
"time": 368.0,
"rest": 0.0,
"waiting": 0.0
},
{
"fromWaypoint": "9",
"toWaypoint": "8",
"distance": 6717.0,
"time": 685.0,
"rest": 0.0,
"waiting": 0.0
}
],
"description": "Targeted best time; with , improvement for traffic",
"timeBreakdown": {
"driving": 13495,
"service": 9000,
"rest": 0,
"waiting": 412358
}
}
],
"errors": [],
"processingTimeDesc": "1490ms",
"responseCode": "200",
"warnings": null,
"requestId": null
}
`


请注意请求中第8、9和10点的acc:约束。应在2020年9月30日上午7点至11点之间访问它们。但是,返回的解决方案确定将在2020-10-05年访问它们,这是不可接受的。我怎样才能在不设置具体预约时间的情况下强制系统满足要求呢?

在查看本论坛的其他帖子后,我发现一些文档中没有提到的信息: 航路点id后面可以是分号分隔的约束列表。支持的约束:之前、acc、at、st

该值由两个时间戳组成,带有日期、时间和时区信息,格式如下:

acc:DDhh:mm:ss[Z |(+|-)hh:mm]| DDhh:mm:ss[Z |(+|-)hh:mm]

访问时数-天(DD)缩写为两个小写字符:mo表示星期一,tu表示星期二,we、th、fr、sa、su。小时数(hh)必须为0..23范围内的整数值。分钟和秒必须介于0到59之间。第一个时间戳定义访问时间的开始,第二个时间戳定义访问时间的结束

我的错误是让这两个字母固定为mo,但请求的星期日是星期三。因此,编制时间框架的正确方法是: 附件:we07:00:00-05:00