我可以用临时 waypoints 调用 HERE CalculateMatrix API 吗?
Can I call the HERE CalculateMatrix API with interim waypoints?
我目前正在测试 HERE CalculateMatrix API。我的目标是获得所有可能的路线并找出最短的路线。现在我问自己以下问题:
是否可以定义路线必须经过的临时 waypoints?
并且这些 waypoints 的传递顺序是否可能未定义?
所以我有例如起点:A,中间点:B 和 C 和目的地:D,
然后矩阵应该计算以下可能的路线:
A-B-C-D,
A-C-B-D
所以我没有使用不同的目的地,而是在两者之间使用不同的 waypoints
正如 Raymond 在评论中提到的那样,无法将计算矩阵 API 用于 "sortable" 路点的用例。 Fleet Telematics API 确实提供了一些接近的东西,尽管它只会提供最佳路线而不是所有可能的路线。在API中,一些航路点可以标记为"sort",这意味着它们的顺序不固定,然后API会找到最佳路线。
Sorting Waypoints (Travelling Salesman Problem) Routing can find the
optimal sequence order for the waypoints. Activate this feature by
following waypoint parameters:
&waypoint1=...;sort
All sections of waypoints flagged with "sort" can be rearranged by the
router for cost optimization. For example, in the waypoint list of
WP0, WP1;sort, WP2;sort, WP3;sort, WP4, WP5;sort, WP6;sort, WP7 the
router can change the sequence order among WP1, WP2 and WP3, and it
can change the sequence order among WP5 and WP6. If the last waypoint
is "sort"able then the route may end at any of the sortable waypoints.
Use this if the driver does his overnight stay simply at/after the
last waypoint he visited throughout the day.
&waypoint1=...;before:3,5
Enforces that the route meets waypoint 1 before the waypoints 3 and 5.
Use it in combination with either "sort" or "optional".
&waypoint1=...;implies:4,8
Enforces that if waypoint 1 is part of the route then also waypoints 4
and 8 must be part of the route. Use it in combination with "optional"
waypoints.
我目前正在测试 HERE CalculateMatrix API。我的目标是获得所有可能的路线并找出最短的路线。现在我问自己以下问题:
是否可以定义路线必须经过的临时 waypoints? 并且这些 waypoints 的传递顺序是否可能未定义?
所以我有例如起点:A,中间点:B 和 C 和目的地:D, 然后矩阵应该计算以下可能的路线:
A-B-C-D, A-C-B-D
所以我没有使用不同的目的地,而是在两者之间使用不同的 waypoints
正如 Raymond 在评论中提到的那样,无法将计算矩阵 API 用于 "sortable" 路点的用例。 Fleet Telematics API 确实提供了一些接近的东西,尽管它只会提供最佳路线而不是所有可能的路线。在API中,一些航路点可以标记为"sort",这意味着它们的顺序不固定,然后API会找到最佳路线。
Sorting Waypoints (Travelling Salesman Problem) Routing can find the optimal sequence order for the waypoints. Activate this feature by following waypoint parameters:
&waypoint1=...;sort
All sections of waypoints flagged with "sort" can be rearranged by the router for cost optimization. For example, in the waypoint list of WP0, WP1;sort, WP2;sort, WP3;sort, WP4, WP5;sort, WP6;sort, WP7 the router can change the sequence order among WP1, WP2 and WP3, and it can change the sequence order among WP5 and WP6. If the last waypoint is "sort"able then the route may end at any of the sortable waypoints. Use this if the driver does his overnight stay simply at/after the last waypoint he visited throughout the day.
&waypoint1=...;before:3,5
Enforces that the route meets waypoint 1 before the waypoints 3 and 5. Use it in combination with either "sort" or "optional".
&waypoint1=...;implies:4,8
Enforces that if waypoint 1 is part of the route then also waypoints 4 and 8 must be part of the route. Use it in combination with "optional" waypoints.