0

我正在使用https://wse.api.here.com/2/findsequence.json

这是我的请求参数:

mode=fastest;car;traffic:disabled&departure=2019-10-10T15:39:28+03:00

这是身体:

destination4=4;38.792417,-77.30097;acc:th00:00:00+03:00|fr00:00:00+03:00;st:180
&destination5=5;38.792344,-77.299805;before:destination4;acc:th00:00:00+03:00|th19:00:00+03:00;st:180&start=user;38.776573,-77.275411&destination7=7;38.804577,-77.279514;before:destination5;acc:th00:00:00+03:00|fr00:00:00+03:00;st:180

这就是我在回复中的内容:

距离":191.0,"时间":37.0,"休息":0.0,"等待":0.0},{"fromWaypoint":"4","toWaypoint":"7","distance":3731.0,"time" :358.0,"rest":0.0,"waiting":0.0}],"description":"目标最佳距离;没有交通","timeBreakdown":{"driving":750,"service":540,"rest":0,"waiting":0}}],"errors":[],"processingTimeDesc":"78ms" ,"responseCode":"200","warnings":null,"requestId":null}

如您所见,我在destination7destination5before中有约束,但它被忽略了。我做错了吗?

4

1 回答 1

1

您有这些航路点:startdestination4和 带有约束:beforedestination5和before 。现在您没有指定航路点,因此算法选择其中一个航路点作为最佳结果的航路点(在这种情况下,选择作为结束航路点,然后覆盖约束)。请指定一个航路点,将满足其他约束。来自文档的参考:destination7destination5destination4destination7destination5endenddestination7end

destinationN:中间目的地,至少一个。如果未提供 end 参数,则选择这些值之一作为序列的结尾。

https://developer.here.com/documentation/mobility-on-demand-toolkit/topics/determining-optimal-delivery-sequence.html

于 2019-10-11T12:25:01.867 回答