MIO API question

Balasaheb Molawade 136 Reputation points
2024-04-17T11:42:11.4933333+00:00

Hi,

We are using the following MIO API to generate the schedule.

https://learn.microsoft.com/en-us/bingmaps/rest-services/routes/optimized-itinerary

It's working fine, but some of the records are not generating the proper schedule.

When we schedule 4 records , it generates the following schedule.

test

We found that the difference is that it should go to E first, then D, and finally to the End location. However, it goes to D first, then E, and finally to the End location, which is the reason for the increased time. To generate the schedule, we pass records to MIO, which then generates the schedule. We are currently checking if there is any parameter or way to obtain the best possible route.

Thanks!

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
588 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. rbrundritt 15,311 Reputation points Microsoft Employee
    2024-04-17T14:50:48.23+00:00

    Shortest path calculations (Travelling Salesmen) use a lot of compute fast and with each point added, the time to compute grows exponentially. As such a heuristic algorithm is used to estimate the shortest path through a network. Since this is an estimate, it may not find the perfect shortest solution, but one that is one of the shorter possible options. This is just how heuristic algorithms work, and any other method would take too long when you add more points. The MIO API was designed with the idea that there would be a lot of points being submitted. If you are only submitting 5 points, the brute force calculation for shortest path doesn't take that long and could be done in code and give the perfectly optimal solution. A couple of options to try if you have a small number of points (less than 10):


  2. IoTGirl 2,976 Reputation points Microsoft Employee
    2024-04-18T20:37:10.2933333+00:00

    Hi @Balasaheb Molawade

    As we have just announced the EOL for Bing Maps MIO I recommend you review the samples provided as a replacement.

    https://aka.ms/BingMapsDiyOptimizer

    https://aka.ms/AzureMapsDiyOptimizer

    As you have experienced, customers want to customize the optimizer and that has led to the decision to suggest each customer take ownership of the optimizer so that they can tweak it.

    Sincerely,

    IoTGirl