Locus Logo Locus Logo
  • Platform
    • Platform Overview
    • Delivery Experience
      • Delivery Linked Checkout
    • Real-world Routing
    • Carrier Management
  • Industries
    • Retail
    • 3PL & CEP
    • E-commerce
    • E-grocery
    • Industrial Services
    • Manufacturing
    • Home Services
  • Resources
    • Whitepaper
    • Case Studies
    • Infographics
    • E-books
    • Blogs
    • Events & Webinars
    • Videos
    • Glossary
  • Company
    • About Us
    • Global Presence
      • Locus in Americas
      • Locus in Asia Pacific
      • Locus in the Middle East
    • Careers
    • Partners
    • News & Press
    • Trust & Security
    • Contact Us
  • Customers
  • Guides
    • Last Mile Delivery Trends
    • Time Under the Roof
    • Peak Shipping Season
    • Electronic Products
    • Fleet Management
    • Healthcare Logistics
    • Transport Management System
    • E-commerce Logistics
    • Direct Store Delivery
    • Logistics Route Planner Guide
  1. Home
  2. Blog
  3. Followed by Randomness

Last Mile Delivery Optimization, Route Optimization

Followed by Randomness

Avatar photo

locus_dhruv

Nov 2, 2017

5 mins read

Followed by Randomness

Rolling dice has been a divine act since ancient times. For Pre-Christians who lived along the MediterraneanSea, the die was the law of the land. Since then human beings have not shied away from exploiting its power in all spheres of life, be it for recreation, gambling, moving economy, predicting weather, and even developing computationally efficient algorithms for immensely hard problems.

Why routing algorithms?

Algorithms have greatly helped humanity in automating immense number of processes that emanated during the industrial revolution. An algorithm is nothing but a sequence of instructions given to a machine on how to perform a task. At Locus we solve NP-hard optimization problems and the algorithms that we build are sublimely mathematical in flavor.

How The World’s Best Route Optimization Engine Works

What is NP-hardness?

An NP-hard optimization problem of size N has a solution space of size greater than any polynomial in N. Let us consider a derivative of the famous travelling salesman problem – you have to visit your friends’ houses to give your Diwali wishes and gifts but the constraint is that you have only a day at your disposal. Before you even start, you want to figure out the best way you could visit your friends so that you spend the least amount of time travelling and are able to finish as early as possible.

If you have N friends, the number of ways you could visit them is factorial(N), also represented as N!. A straightforward procedure is to evaluate all the N! tours and then choose the best one. However, the hitch here is that N! scales faster than an exponential function as N grows large. Even for a small N=20, this would execute approximately 10¹⁸ operations. Assuming that a computer performs 10¹² operations per second, which is quite optimistic, the execution time of this algorithm would be 10⁶ seconds ≈ 12 days. Clearly this is not a viable option.

Rather than unintelligently testing all solutions, both good and bad, a far better approach is to logically construct a solution that is guaranteed to be the best possible one. However, even the best of such strict approaches needs an astronomically large number of operations to produce a solution.

At Locus we do play dice

Instead of performing a mindless exhaustive search, or building the perfect solution slowly and painfully, it turns out that making millions of intelligent guesses can yield excellent solutions rapidly.

Another intuitive approach is to start with a random tour out of these possible 20! tours and keep improving iteratively by making small tweaks until no small tweak can improve the tour. Since the solution obtained here is best compared to all similar solutions, it is referred to as a local optimum. A limitation of this approach is that it considers only a small subset of all possible configurations. Hence, the solution obtained might be highly inferior with respect to the best one.

The best scenario when searching the solution space would be if the algorithm can figure out when and how to get out of these local optima. The algorithms that we design at Locus not only explore a larger part of the solution space but also intelligently exploit the power of die to jump out of the local optimum. We give our algorithm a chance to accept a worse solution than the existing one in expectation of finding an even better solution later. A substantial trait of this algorithm is that after hopping out of a local optimum it is able to find better solutions in future iterations.

Cost function during a sample run of Locus’ proprietary VRP engine
Cost function during a sample run of Locus’ proprietary VRP engine

Games that we play

3D Box Packing: We pack freight in the most optimal way. When pushing a box in the cargo, our algorithm rolls a biased die to figure out the best orientation to place this box. The die is more favorable to the configuration that has better packing efficiency.

Loading a shipping container  — Part I

Vehicle Routing Problem: We generate the best routes for a fleet of vehicles on its way to make deliveries within restricted time-windows. When assigning a task to a fleet our algorithm gives chance to all vehicles but recommends those that are in the vicinity of the current delivery’s location. The die favors the assignment that will result in less time and distance being traveled on the road while respecting the hard constraints like volume breach and time windows.

Moreover, the algorithms that we design are perceptive enough to infer the biases of these dice. As the algorithm continues to improve upon the solution, it gradually builds robustness to accepting a less optimal solution for VRP. Below is an illustration depicting the value of these biases during the course of a run of the algorithm.

Vehicle Routing Problem
Bias of a die during a sample run of Locus’ proprietary VRP engine

Monte Carlo to Las Vegas

The technique described above falls under the domain of Monte Carlo algorithms. There also exist algorithms that can always find the best solution, such celebrated randomized algorithms are known as Las Vegas algorithms. Fortunately there do not exist Las Vegas type algorithms for the problems that we solve. At Locus we are developing and training intelligent dice which will help us drive to Vegas!

Locus offers best route optimization software to enterprises to improve last-mile deliveries with greater cost-efficiency. Get in touch with us for a free demo.

Schedule Demo with Locus

Like what you’re reading? Hit ❤ and follow us to read more.

Click heart icon gif

This post was authored by: Kamal Nayan Goyal

Related Tags:

Previous Post Next Post
Bringing Banking to the Customer’s Doorstep with ‘Locus for BFSI’

Blog

Bringing Banking to the Customer’s Doorstep with ‘Locus for BFSI’

Avatar photo

locus_dhruv

Jul 18, 2017

Expectations are a moving target, thereby creating the need for institutions to regularly track and understand how they are Performing Against Customer Expectations (PACE). The PACE index for the banking sector does this on an annual basis, in a global study spanning 8,000 customers and 500 small businesses. The 2016 survey revealed that Indian banks were near the bottom of the global […]

Read more
Sales Beat Optimization in FMCG

Route Optimization

The Curious Case of FMCG Sales Beats Optimization

Avatar photo

locus_dhruv

Nov 15, 2017

Indian Retail is a Buyer’s game today. In E-Commerce as well as offline modern trade, consumers are truly the king, with every tick of the clock bringing new choices. Hence it has become both, vital and challenging for enterprises to be close to the end consumer. An efficient distribution system, which reduces order to delivery […]

Read more

Followed by Randomness

  • Share
    • Facebook
    • Twitter
    • LinkedIn
    • Email
  • Print
  • Download

MOST POPULAR

E-Commerce

How E-commerce Warehouse Operations can be Optimized with Dispatch Management Software

Avatar photo

Prateek Shetty

Feb 17, 2023

Fleet Optimization

The Journey of the Mango: How India’s favorite fruit reaches your plate

Avatar photo

locus_dhruv

Jul 4, 2019

Sustainability

How Microhubs Contribute Towards Sustainable Urban Freight Logistics

Avatar photo

Lakshmi D

May 12, 2021

EDITOR’S PICKS

Webinars

In Focus: Elevating Customer Experience and Operational visibility with Real-Time Tracking Solutions

Avatar photo

Lakshmi D

Feb 6, 2023

Webinars

In Focus: Retailers, Customer Delight is Tied to Exceptional Delivery Experiences

Avatar photo

Prateek Shetty

Feb 3, 2023

Blog

In Focus: 5 Factors To Consider On The “Build Vs Buy” Decision on Last-Mile Software Solution

Avatar photo

Siddhesh Raut

Oct 7, 2022

SUBSCRIBE TO OUR NEWSLETTER

Stay up to date with the latest marketing, sales, and service tips and news

SUBSCRIBE TO OUR NEWSLETTER

Stay up to date with the latest marketing, sales, and service tips and news

Platform
  • Platform Overview
  • Delivery Experience
  • Real-world Routing
  • Carrier Management
Industries
  • Retail
  • 3PL & CEP
  • E-commerce
  • E-grocery
  • Industrial Services
  • Manufacturing
  • Home Services
Resources
  • Whitepaper
  • Case Studies
  • Infographics
  • E-books
  • Blogs
  • Events & Webinars
  • Videos
  • Glossary
Company
  • About Us
  • Customers
  • Careers
  • Partners
  • News & Press
  • Trust & Security
  • Contact Us
Locus Logo

© 2023 Mara Labs Inc. All rights reserved. Privacy and Terms