Ground Transportation Logistics App

A route optimization problem

For the ground transportation logistics during the Lima2019 Pan-american Games, our team needed an application to handle the multiple and random transportation requests in an efficient way.

We used to store in our database our team members' most common destinations. In this way we could schedule efficient round trips and inform the team of the available vans.

During the ceremonies our team growth became difficult to track and we couldn't rely on our database to provide an efficient nor effective service.

We needed a dynamic solution that could compute the best trip on the fly using the database destination and custom ones.

Just scanning our team members' badges we can quickly extract their destination from the database.

What about custom destinations?

First we needed to be sure the they really existed. Our application queries Google Maps API autocomplete service in order to be sure the route computer always takes as input existing destinations.

# We will use Google Maps Place API to autocomplete the wanted destination and be sure it really exists. # Plus in order to get more accurate results we will use a circular location bias centered at lat&lng with a n radius meters.

Once we collected all the waypoints we need to compute the best route in order to minimize the round trip cost.

People in the stadium are always in a hurry. Hence we have to be able to compute the best route in a very short time. Using the Google Maps implementation for the traveling salesman problem we can give our user an answer in less than a second!

# We will send the waypoints in random order to the Directions API with the flag optimize:true # It will return the best order considering the origin and destination.

Now that Google API returns us the optimized waypoints order we can easily build a Google Maps URL to send to our drivers and start the navigation directly on their phones!

# We will add the flags travelmode=driving and dir_action=navigate for the URL to be used in the Google Maps application and automatically start the navigation.