i am currently testing outh the HERE CalculateMatrix API. My goal is to get all possible routes and find out the shortest one. Now im asking myself the following question:
Is it possible to define interim waypoints that an Route has to pass? And is it possible that the order that these waypoints are passed is not defined?
So that i have for example the starting point: A, interim points: B and C an the destination: D, and the Matrix should then calculate the following possible Routes:
A-B-C-D, A-C-B-D
so im not using different destinations but different waypoints in between
As Raymond already mentioned in comments, it is not possible to use Calculate Matrix API for a use case of "sortable" way-points. The Fleet Telematics API does provide something close, although it would only provide the most optimal route and not all possible routes. In the API, some way-points can be marked as "sort" which means their order is not fixed and the API would then find the most optimal route.
From API reference (https://developer.here.com/documentation/fleet-telematics/dev_guide/topics/waypoint-sort-pickup-opening-times.html)
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.