Sync, Async Matrix Routing

Can anyone please explain what is synchronous matrix and asynchronous matrix routing. I really can’t understand what are they, but have to use matrix routing in my job. Please help me.

1 Like

In synchronous you get the result in the response of the same request.
Asynchronous is used for larger queries, so that you can close the connection and later in another query download the result.

1 Like

Hi Tony,

Thank you for your question. As Przemek mentioned synchronous Matrix is suitable for smaller matrices (which is also reflected in size limit in API) that are expected to be processed quickly and return in the response of the post request. On contrary asynchronous Matrix supports bigger matrices, yet as their processing may take longer, you’ll receive an id of the matrix job in the response and you need to perform a download requests later, once the matrix is ready.

I also encourage you to trying out the new version of Matrix, Matrix Routing v2 which allows you to benefit from better performance.

Feel free to share your use case, feedback or ask more questions. I’ll be happy to help!

Kind regards,
Łukasz

1 Like

Thank you for the answers @maloleps and @gebel . Currently I’ve been working on a Route Optimization Project where the use case will be to optimize routes for around 25 to 30 trucks which will have minimum drop points of 4. Please share your thought on using the necessary TomTom API’s.

Do you already know which points are associated to which truck? Or do you assign points to trucks based on calculations?

@maloleps ,Will assign the drop points to trucks based on the calculation.

So the Matrix Routing v2 is the best that we can currently offer for this case.

1 Like

Once you used Matrix v2 to assign trucks to drop points, you can use Waypoint Optimization API to find the optimal order of waypoints: Best | Routing API and Extended Routing API. Then you can use calculateRoute endpoint from Routing API to calculate the optimal route by specifying waypoints in order returned by Waypoint Optimization API (Calculate Route | Routing API and Extended Routing API).

1 Like

Thank you for the info @gebel .