此处 API:通行费未优化

HERE API: Toll cost is not optimized

我正在此处 API 进行探索,以评估对我们的应用程序的有用性。我的兴趣集中在估算的卡车运输成本(通行费、车辆、driver)。我在生成两点之间的优化路线时遇到问题:从 50.893017,20.615645 到 52.055324,21.010707。 Driver 成本设置为 10,车辆成本设置为 1。 当我使用 https://fleet.ls.hereapi.com/2/calculateroute.json 时,我得到的总距离为 211 公里,费用为 260.17 波兰兹罗提(包括 0 通行费) 当我使用 https://tce.cit.api.here.com/2/calculateroute.json 时,我用 221.28 波兰兹罗提(包括 38.55 波兰兹罗提的通行费)行驶了 159 公里。 正如您首先看到的 API 没有返回成本优化路线。此外,看起来第一个 API 试图省略收费站,而这比绕过要好。 我错过了什么吗?为什么会有这么大的差异?两个查询的参数看起来很相似。

前api个参数(不包括api个键):

jsonAttributes:41
waypoint0:50.893017,20.615645
waypoint1:52.055324,21.010707
detail:1
routelegattributes:li
routeattributes:gr
maneuverattributes:none
linkattributes:none,rt,fl
legattributes:none,li,sm
currency:PLN
departure:
tollVehicleType:3
trailerType:0
vehicleNumberAxles:2
trailerNumberAxles:0
hybrid:0
emissionType:3
fuelType:petrol
trailerHeight:0
vehicleWeight:40t
disabledEquipped:0
hov:0
passengersCount:2
tiresCount:4
commercial:0
heightAbove1stAxle:1m
width:1.8
length:4.41
mode:fastest;truck;traffic:disabled
alternatives:2
driver_cost:10
vehicle_cost:1

第二个api参数(不包括api键):

jsonAttributes:41
waypoint0:50.893017,20.615645
waypoint1:52.055324,21.010707
detail:1
routelegattributes:li
routeattributes:gr
maneuverattributes:none
linkattributes:none,rt,fl
legattributes:none,li,sm
currency:PLN
departure:
tollVehicleType:3
trailerType:0
vehicleNumberAxles:2
trailerNumberAxles:0
hybrid:0
emissionType:3
fuelType:petrol
trailerHeight:0
vehicleWeight:40t
disabledEquipped:0
hov:0
passengersCount:2
tiresCount:4
commercial:0
heightAbove1stAxle:1m
width:1.8
length:4.41
mode:fastest;truck;traffic:disabled
alternatives:2
driver_cost:10
vehicle_cost:1

请不要在 URL 请求中使用,也不要在 tce.cit.api.here.com 或 tce.api.here.com 中使用域名,也不要在 fleet.ls.hereapi.com 中使用一些旧的参数名称。

这个tce.api.here.com是遗留的,有时会计算通行费错误。

Read please this documentation 对于通行证参数:

Comma separated list of owned passes: Senior_Pass, transponder, Annual, Nr_of_Days, Nr_of_Months, SunPass, E-Z Pass (last 2 are examples for real toll transponders). Allows traversal of 'transponder-only' toll booths and allows cost free traversal of certain toll sections.

某些收费站和收费路段仅允许 持有通行证的 driver 使用,例如tollPass=transponder 否则 driver 必须避开这些 booths/toll 部分才能使用更远的路。

如果您尝试使用例如tollPass=transponder 参数请求 fleet.ls.hereapi.com 然后你会看到使用收费部分。