且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

这里的Fleet Telematics API并没有真正优化成本

更新时间:2022-06-17 23:50:47

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

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.