The logistics optimization manifesto — 2021
Reference article: https://www.bringg.com/blog/logistics/first-mile-delivery/
With the rapid expansion and adoption of eCommerce over the last few years, shipping companies of all sizes are emerging at the same speed. To stay competent, most companies find themselves in the need to promise faster delivery time, better customer experience, better merchant experience and more affordable shipping cost. That said, the path to realize that is often full of operational challenges that limit the capacity to do so without true innovation. Some of the challenges facing shipping companies are:
Challenges
Cutting transportation cost
Enhancing customer experience in term of visibility
Dealing with courier shortage, at the same time hire the minimum amount of drivers needed.
Acquire more merchants
Offer competitive pricing
Offer more narrow time windows
Ensuring courier efficiency and delivery time
The current supply chain model for most shipping companies consists of three phases. First mile, middle mile, and last mile delivery.
First mile delivery
The first mile delivery is the pickup process. That is the movement of shipments from merchants to a regional delivery hub.
Middle mile delivery
In middle mile delivery, collected shipments are collectively transferred from regional hubs to a sorting center then redistributed back to the nearest hub for every delivery destination.
Last mile delivery
In the last mile delivery, shipments are distributed from the regional hub to the final end user. In this process, nearby shipments are grouped to be delivered by the same courier in an ordered or unordered manner depending on the efficiency of the shipping company.
Opportunities
To be profitable and expand market share, shipping companies find themselves in need to attract more merchants or retain the existing ones by promising competitive pricing and better end user experience through narrow time windows, accurate timing and order status visibility.
To realize those promises in the most efficient way, most successful shipping companies leverage data science and optimization techniques to improve operational efficiencies, adopt strong KPI culture, cut down cost and improve customer experience. The rapid advances of open source tools and the democratization of data science knowledge acted as an enabler for many startups and small to medium size shipping companies to stay as competitive and reliable as big logistics companies.
In this article, we will show, based on years of experience working in Japan, how companies are using technology and leveraging the power of data to stay competent and gain an edge over their competitors. This is accompanied by an implemented example in Riyadh including all the technical details and libraries.
This is the most comprehensive, practical and free article on the use of data and algorithms to boost the efficiency of shipping companies in 2021.
Opportunities in first mile delivery?
In many cases, merchants are small e-commerce websites and sometimes Facebook pages or even selling on WhatsApp. Different merchants sell different volumes and in turn have different economic value to a shipping company. Similarly, offering a good merchant experience and process visibility helps retain merchants and increase their loyalty to a shipping company. Here are some opportunities to leverage technology in the first mile delivery process:
Putting merchants on the map.
Address Geocoding
Geocoding is the process of converting a hand written address to a corresponding location coordinates. When the number of merchants is small and consistent, the process can be done manually on google maps. However, if the numbers are in thousands and changing, it’s better to have that automated through a Geocoding API.
There are many services that offer Geocoding functionality, some are free and others are paid. Here are some notably known services:
Google Maps Geocoding:
Esri Geocoding:
Mapbox Geocoding:
Nominatim:
After geocoding addresses, we are able to get the location of each merchant on the map as a latitude and longitude. The location information is the backbone of optimizations and it is quite important to ensure it is done properly.
Administrative name assignment
In many cases, the administrative description is extracted from the address but in some cases, the description of the address might not contain all administrative divisions.
Example of an address with all administratives: 10 Musa Ibn Nusair St
Example of an address without all administratives: 10 Musa Ibn Nusair St, Al Olaya, Riyadh, Saudi Arabia
Both addresses are still valid and it’s easy for a human to identify where it is located, but not necessarily know what neighborhood name it belongs to. Running automation scripts on addresses to assign administrative boundaries to the geocoded addresses is a great way to store data in a way helpful for analytics.
Picture of mapped administratives to every address
Mapping
Now that merchants’ locations are geocoded in latitude and longitude. The next step is putting them on a map. Not all merchants are of equal importance to a shipping company, so adding a color or size indicator allows one to see the picture more clearly. There are many tool to do that such as:
Visualizing merchants according to their average daily shipments.
The first step to optimization or process enhancement is data collection and visualization. In many cases, the merchant’s location is shared with the shipping company as an “Address”. That in turn limits the ability to automatically decide on the best routes or how many drivers are needed for each package. Parallel to that, identifying where a shipping company has a cluster of high volume merchants can lead to better decisions in enhancing merchants’ experience.
Zoning
Perhaps one of the most important steps in digitizing the process is to identify the boundaries of each delivery zone. Zoning is the process of drawing boundaries on the map and it’s a common terminology used in transportation planning under the term “Traffic Analysis Zone — TAZ”. There are many ways to create zones, but the most common approach is to follow an existing zoning system and adjust or modify slightly when needed.
Administrative boundaries are often created and archived on a country level to be used for official statistics and other government services. In many cases, they are publicly available through open access portals without licenses constraining commercial usage. Here are the administratives in Riyadh:
Estimating how many trucks to collect packages from merchant to sorting center?
Chances are, logistics companies pickup orders from their merchants on a daily basis. Some merchants may have orders to deliver and some may not on a given day. Manually looking at the excel sheet to look at how many orders to pick up from which merchant everyday then deciding on the number of drivers or trucks for the pickup is a hard task. Alternatively, aggregating the total number of orders per merchant and clustering merchants per zone and estimating the number of packages and the number of merchants per zone.
Now that we know how many merchants need to be visited and how many packages need to be picked up from each zone. Optimizing how many drivers to assign for each delivery zone based on the number of packages and the total merchants can be a great way to minimize the number of drivers. In case the number of packages in one zone are below a certain threshold, few neighboring zones can be joined together where one or more drivers can cover them.
This process is an iterative process and it will take some time to understand the trends and dynamically assign the minimum number of drivers to reduce the operational cost.
Generate the best pickup routes for every driver to cut down delivery time
After clustering different merchants per zone and identifying how many drivers per a zone or per a group of zones. Ordering the pickup process in a way that minimizes travel time and maximizes driver productivity is a good step to take. This problem is called traveling salesman problem when there is only one driver and vehicle routing problem when there are many drivers and many merchants.
In traveling salesman problem …..
Routing related here
Traveling salesman optimization
To solve the traveling salesman problem, a road infrastructure network along with a routing engine needs to be set up to calculate the cost of traveling from one point to another. Some common routing engines are:
OSRM
Zones where only one driver is needed to cover merchants are then optimized using traveling salesman problem solvers.
The traveling salesman optimized route looks like this, click on link below for an interactive webgl map.
<image>
In vehicle routing problem
Vehicle routing problem is a little more complex than the traveling salesman problem. When we have many shipments and many drivers, which shipment to assign for each driver for a cost optimization? That’s where the vehicle routing problem comes in handy. More formal question vehicle routing problem answer is:
“What is the optimal set of routes for a fleet of vehicles to traverse in order to deliver to a given set of customers”
To apply vehicle routing problems, google or tools is a great library with much flexibility to add time windows and more.
This is an example where packages are too much for one driver to handle in a delivery zone with the optimized route using vehicle routing problem solver. Click on the link below for an interactive webgl map.
Final optimized route & the driver pickup report.
Putting all routes together along with a visualization of which package is assigned to which driver is a great overall view for a depo manager to operate at most efficiency. The final map looks like this. Click on the link below for an interactive webgl map.
Drivers are very busy people, giving them a map with an assigned route is not always the best option. Sometimes they actually drive motorcycles or three wheelers in some countries and the ability to go along specific routes is a headache. I drove with a driver for days to understand what would actually work for them. Most drivers prefer using google maps, but their challenge is finding the location accurately on the map.
What will work better is a nice organized PDF report (so that it can be printed too) with the best delivery order and detailed description of the pickup or delivery destination.
Mechant side prediction: Forecast how many packages will be ordered tomorrow to prepare pickup vehicles.
Order volumes vary per merchant. The variability can be seasonal or it can be due to external factors such as weather, demand, existing competitors or other. At the same time, keeping the number of pickup trucks to complete all pickups at the most minimum is important to reduce operational cost. With good forecasting on how many packages to expect from a specific merchant on the next day or on a given day in the future, a shipping company can better allocate resources and save cost.
This is a data driven solution that leverages the underlying data assets collected about merchant historical pickup requests. Features, such as seasonality, merchant market share, weather, product popularity and more are usually not collected by a shipping company. But they are essential as context data. In data science, we call that ”Enrichment Datasets”. The problem then becomes multivariate time series regression modeling with an output of the expected number of deliveries for every merchant over the next n number of days.
That said, it will be easier to maintain the minimum number of drivers per zone while maintaining a high level of merchant satisfaction. Below is a map showing the forecasted number of shipments for the same merchants next day, and the associated drivers needed for every zone along with the implemented pickup route.
What is last mile delivery?
Last mile delivery is the final leg in the delivery process. This is when a package or a group of packages is assigned to a courier to deliver each to the target end user. Last mile delivery is by far the most expensive part of the fulfillment chain. In addition, it is the most critical delivery part in terms of end user satisfaction of the delivery service and needs strong operational efficiency.
Challenges in the last mile delivery:
Courier ability to find the exact location of the shipment destination address.
Keeping the number of couriers per delivery zone to minimum to reduce the delivery cost.
Courier productivity assessment to retain best couriers or upskill others.