这里的Fleet Telematics API并没有真正优化成本 [英] HERE Fleet Telematics API doesn't really optimize cost

查看:64
本文介绍了这里的Fleet Telematics API并没有真正优化成本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据官方文档:

指定参数& rollups而不是& rollup,并且不指定& cost_optimize,以获取Fleet Telematics API中计算出的路线.Fleet Telematics API会忽略mode参数中最短/最快的参数.相反,它将驾驶员成本,车辆成本和通行费成本之和最小化.这样可以产生完全成本优化的路线

Specify the parameter &rollups instead of &rollup, and don't specify &cost_optimize, to get the route computed within Fleet Telematics API. Fleet Telematics API ignores the shortest/fastest in the mode parameter. Instead, it minimizes the sum of driver_cost, vehicle_cost and toll cost. This yields fully cost optimized routes

但是实际上,这不是我在测试后观察到的.我尝试了从利沃夫到柏林的路线,将 driver_cost 设置为100欧元,将 vehicle_cost 设置为0.我收到的路线需要20个小时,费用为43欧元(收费道路).这不是最佳路线,因为驾驶员费用确实很高-2000欧元.

But in fact it's not what I observe after testing. I've tried route from Lviv to Berlin, I've set driver_cost to 100 euro and vehicle_cost to 0. I received the route which takes 20 hours and costs 43 euros (toll roads). This is not optimal route as the driver cost is really high - 2000 euro.

如果我添加 cost_optimize = 0 并将 rollups 更改为 rollup (应关闭费用优化)作为参数,以请求我收到收费公路的费用略高一些-54欧元,但持续时间为13小时,因此驾驶员成本为1300欧元,总体成本较低.

If I add cost_optimize=0 and change rollups to rollup (which should turn off cost optimization) as a parameter to request I receive bit more expensive route, in terms of toll roads - 54 euro, but the duration is 13 hours, which gives 1300 euro driver cost and lower overall cost.

如何?这是一种错误吗?

How so? Is this some kind of a bug?

P.S.我一直在使用官方示例仔细检查我的结果,例如

P.S. I've been using official examples to double check my results e.g. this

推荐答案

这是文档的(相当奇怪的)完整部分:

This is the (rather weird) full section of the documentation:

指定参数& rollup和/或& cost_optimize以获得由路由API计算的路由.路由API本身并不会优化成本/费用,但会提供最快和最短的路由,以及提供更多具有不同选项的路由.然后,Fleet Telematics API选择具有驾驶员成本,车辆成本和通行费成本之和最小的路线.因此,通常会找到(费用)成本优化的路线,但并不总是可以保证的.

Specify the parameter &rollup and/or &cost_optimize to get the route calculated by Routing API. Routing API itself doesn't cost/toll optimize, but provides a fastest and a shortest route and some more routes with different options. Fleet Telematics API then chooses the route which has the minimum sum of driver_cost, vehicle_cost and toll cost. Hence, a (toll)cost optimized route is usually found, but it is not always guaranteed.

指定参数& rollups而不是& rollup,并且不指定& cost_optimize来获取Fleet Telematics API中计算出的路线.Fleet Telematics API会忽略mode参数中最短/最快的参数.相反,它将驾驶员成本,车辆成本和通行费成本之和最小化.这样就产生了完全成本优化的路线(在距离路线点很远的地方,路线不会考虑最小的道路).但是不支持所有的路由API参数,并且可以显示更长的响应时间.

Specify the parameter &rollups instead of &rollup, and don't specify &cost_optimize, to get the route computed within Fleet Telematics API. Fleet Telematics API ignores the shortest/fastest in the mode parameter. Instead, it minimizes the sum of driver_cost, vehicle_cost and toll cost. This yields fully cost optimized routes (within the limitation that routing doesn't consider smallest roads when very far away from way points). But doesn't support all Routing API parameters and can show higher response times.

它说有两个优化引擎,一个(Fleet Telematics API)应该找到最佳路线,一个(Routing API)比通常"搜索引擎最佳.(但并非总是如此)找到最佳路线.在这两种情况下,您都需要定义 tollVehicleType .

It says that there's two optimisation engines, one (Fleet Telematics API) that should find the optimal route, one (Routing API) than "usually" (but not always) finds the optimal route. And you need to define tollVehicleType in both cases.

在您的第一个测试中,如果您有 cost_optimize = 1 ,则它是R-API或没有优化(您没有提供您的请求,所以我不能告诉您).在您的第二次测试中,我认为您只是在寻求最快的路线.如果要使用FT-API,则必须删除 cost_optimize 参数,并使用 rollups ,而不是 rollup .

In your first test, if you have cost_optimize=1, it's either the R-API or no optimization (you don't provide your request, so I can't tell). In your second test, I think you're just asking for the fastest route. If you want the FT-API, you have to remove the cost_optimize parameter and use rollups, not rollup.

这篇关于这里的Fleet Telematics API并没有真正优化成本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆