HERE-API FindSequence错误:“约束之前:必须引用其他航路点”

时间:2018-08-30 08:07:30

标签: here-api

我正在使用FindSequence API优化具有多个航点的路线。

START -> destination1 -> destination2 -> ... -> destination9 -> destination10 -> END

简单的优化按预期工作。但是,一旦我开始向航路点添加before:约束,它就会开始意外失败(有时可以正常运行,但大部分时间都失败),并显示以下错误:

{'errors': ['constraint before: must refer to a different waypoint Error ID: '
        '2832b49e-a19b-4703-ac8b-c1bb8dd1effd'],
 'processingTimeDesc': None,
 'requestId': None,
 'responseCode': '400',
 'results': None,
 'warnings': None}

我的有效载荷是:

{'app_code': 'REDACTED', 'app_id': 'REDACTED', 
'start': '19.23234,72.23234', 
'end': '19.23234.23234', 
'mode': 'fastest;car;traffic:disabled;', 
'departure': '2018-08-30T05:49:58+00:00'
}

具有以下航路点:

&destination0=19.0494607,72.82537809999997;before:destination10;
&destination1=19.0721489,72.83006410000007;before:destination10;
&destination2=19.087006,72.83803060000002;before:destination10;
&destination3=19.0790565,72.83579420000001;before:destination10;
&destination4=19.0947793,72.83986809999999;before:destination10;
&destination5=19.12734099999999,72.844066;before:destination10;
&destination6=19.1377862,72.82604549999996;before:destination10;
&destination7=19.1385826,72.82376950000003;before:destination10;
&destination8=19.1383236,72.82696869999995;before:destination10;
&destination9=19.1365928,72.8279202;before:destination10;
&destination10=19.0512729,72.82387169999993

这是完整的网址(只需替换APP_ID和APP_CODE的值):

https://wse.api.here.com/2/findsequence.json?app_code=REDACTED&app_id=REDACTED&start=19.23234%2C72.23234&end=19.23234%2C72.23234&mode=fastest%3Bcar%3Btraffic%3Adisabled%3B&departure=2018-08-30T05%3A49%3A58%2B00%3A00&destination0=19.0494607%2C72.82537809999997%3Bbefore%3Adestination10%3B&destination1=19.0721489%2C72.83006410000007%3Bbefore%3Adestination10%3B&destination2=19.087006%2C72.83803060000002%3Bbefore%3Adestination10%3B&destination3=19.0790565%2C72.83579420000001%3Bbefore%3Adestination10%3B&destination4=19.0947793%2C72.83986809999999%3Bbefore%3Adestination10%3B&destination5=19.12734099999999%2C72.844066%3Bbefore%3Adestination10%3B&destination6=19.1377862%2C72.82604549999996%3Bbefore%3Adestination10%3B&destination7=19.1385826%2C72.82376950000003%3Bbefore%3Adestination10%3B&destination8=19.1383236%2C72.82696869999995%3Bbefore%3Adestination10%3B&destination9=19.1365928%2C72.8279202%3Bbefore%3Adestination10%3B&destination10=19.0512729%2C72.82387169999993

我该如何解决这个问题,因为这是我们业务的主要用例。我们的交付路线绝对需要考虑航点之间的部分顺序。任何帮助将不胜感激! ^ _ ^

1 个答案:

答案 0 :(得分:1)

感谢您引起我们的注意。如果路点数超过ca 8(可能取决于实际参数设置),我们在WSE中发现了一个带有“ before:”约束的问题。问题已解决,将在本周提交给CIT,可能在下周末提交给PRD。