距离矩阵平行距离 [英] Distance Matrix Parallel Distances
问题描述
您好,
我最近创建了一个visual basic宏,它允许我为选择坐标数组生成距离矩阵。它工作得很好,我对Bing贴图API的速度和效率印象深刻!
$
但是,我注意到所有结果都是平行的。从位置X到位置Y的行程距离和持续时间与从位置Y到位置X的行程完全相同。在近200个起点和目的地(约35 000个条目)的矩阵内,
除了20个值之外都是并行。
然而,在检查Bing地图服务时,这些值从未平行。
有没有办法解决这个问题?
我正在进行同步HTTP POST请求,将Travel模式设置为drive,并根据Distance Matrix文档设置标题和正文
低于生成的距离矩阵的一小部分
jl1 | jl2 | jl3 | jl4 | jl5 | jl6 | jl7 | |
jl1 | 0 | 160,021 | 162,7377 | 227,6854 | 899,5618 | 147,2492 | 129,3246 |
jl2 | 160,021 | 0 | 24,00036 | 96, 17511 | 1053,769 | 15,99183 | 57.1 9422 |
jl3 | 162,7377 | 24,00036 | 0 | 116,1118 | 1048,165 | 30,86553 | 39,30592 |
jl4 | 227,6854 | 96,17511 | 116,1118 | 0 | 1121,441 | 93,49228 | 152,0717 |
jl5 | 899,5618 | 1048,165 | 1121,441 | 0 | 1040,998 | 1011,119 | |
jl6 | 147,2492 | 15,99183 | 30 ,86553 | 93,49228 | 1040,998 | 0 | 60,90539 |
jl7 | 129,3246 | 57,19422 | 39,30592 | 152,0717 | 1011,119 | 60,90539 | 0 |
提前致谢!
我们的所以要求生成距离矩阵。假设我们要生成10 * 10 矩阵 可以使用javascript使用距离矩阵。
任何人都有距离矩阵的示例代码(java脚本)。此外,使用距离矩阵获得优化路线的示例代码可能类似于旅行商问题。
谢谢!
 
Hello,
I have recently created a visual basic macro that allows me to generate a distance matrix for select coordinate arrays. It works perfectly and I was impressed by the speed and efficiency of the Bing maps API!
However, I noticed that all results were parallel. The travel distance and duration from location X to location Y was exactly the same as when travelling from location Y to location X. Within a matrix of nearly 200 origins and destinations (~ 35 000 entries),
all but 20 values were parallel.
However, upon checking with the Bing maps service, these values were never parallel.
Is there a way to solve this?
I am making a synchronous HTTP POST request, with Travel mode set to driving, and with header and body set according to the Distance Matrix documentation
Below a fraction of the generated distance matrix
jl1 | jl2 | jl3 | jl4 | jl5 | jl6 | jl7 | |
jl1 | 0 | 160,021 | 162,7377 | 227,6854 | 899,5618 | 147,2492 | 129,3246 |
jl2 | 160,021 | 0 | 24,00036 | 96,17511 | 1053,769 | 15,99183 | 57,19422 |
jl3 | 162,7377 | 24,00036 | 0 | 116,1118 | 1048,165 | 30,86553 | 39,30592 |
jl4 | 227,6854 | 96,17511 | 116,1118 | 0 | 1121,441 | 93,49228 | 152,0717 |
jl5 | 899,5618 | 1053,769 | 1048,165 | 1121,441 | 0 | 1040,998 | 1011,119 |
jl6 | 147,2492 | 15,99183 | 30,86553 | 93,49228 | 1040,998 | 0 | 60,90539 |
jl7 | 129,3246 | 57,19422 | 39,30592 | 152,0717 | 1011,119 | 60,90539 | 0 |
Thanks in advance!
Hi,
We also have requirement to generate Distance matrix. Suppose we want to generate 10 * 10 matrix is it possible using Distance matrix using javascript.
Anyone have sample code (java script) of Distance matrix. Also sample code to get the optimized route using distance matrix may be similar to Traveling salesman problem.
Thanks!
这篇关于距离矩阵平行距离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!