Difference between km when change waypoint's order

natalia_silva
Registered Users Posts: 1 
Apprentice Seeker

Apprentice Seeker
When I send the same 2 requests with the same initial and final point but different waypoint's order, in endpoint routing/calculateRoute, the optimizated result is different. Look at the example bellow:
First request: https://api.tomtom.com/routing/1/calculateRoute/-16.820778,-49.220389:-17.462780,-52.215055:-17.105600,-51.819046:-17.098500,-51.690100:-16.767779,-51.977500:-16.751900,-51.960700:-16.818179,-51.797000:-16.818200,-51.797000:-16.826600,-51.778600:-16.820778,-49.220389/json?key=<APIKEY>&routeType=shortest&computeBestOrder=true&travelMode=truck&routeRepresentation=summaryOnly&avoid=tollRoads&traffic=false&departAt=2022-03-23T00:00:00
Second request:
https://api.tomtom.com/routing/1/calculateRoute/-16.820778,-49.220389:-17.105600,-51.819046:-17.098500,-51.690100:-17.462780,-52.215055:-16.767779,-51.977500:-16.751900,-51.960700:-16.818200,-51.797000:-16.826600,-51.778600:-16.818179,-51.797000:-16.820778,-49.220389/json?key=<APIKEY>&routeType=shortest&computeBestOrder=true&travelMode=truck&routeRepresentation=summaryOnly&avoid=tollRoads&traffic=false&departAt=2022-03-23T00:00:00
Although the points and parameters are the same, the returned result is different. Why does this happens?
First request: https://api.tomtom.com/routing/1/calculateRoute/-16.820778,-49.220389:-17.462780,-52.215055:-17.105600,-51.819046:-17.098500,-51.690100:-16.767779,-51.977500:-16.751900,-51.960700:-16.818179,-51.797000:-16.818200,-51.797000:-16.826600,-51.778600:-16.820778,-49.220389/json?key=<APIKEY>&routeType=shortest&computeBestOrder=true&travelMode=truck&routeRepresentation=summaryOnly&avoid=tollRoads&traffic=false&departAt=2022-03-23T00:00:00
Second request:
https://api.tomtom.com/routing/1/calculateRoute/-16.820778,-49.220389:-17.105600,-51.819046:-17.098500,-51.690100:-17.462780,-52.215055:-16.767779,-51.977500:-16.751900,-51.960700:-16.818200,-51.797000:-16.826600,-51.778600:-16.818179,-51.797000:-16.820778,-49.220389/json?key=<APIKEY>&routeType=shortest&computeBestOrder=true&travelMode=truck&routeRepresentation=summaryOnly&avoid=tollRoads&traffic=false&departAt=2022-03-23T00:00:00
Although the points and parameters are the same, the returned result is different. Why does this happens?
0