In this example, we will use the Last Mile Optimization experiment to optimize transportation routes in our supply chain by solving the Capacitated Vehicle Routing Problem with Time Windows (CVRPTW).
A company delivering food within the city of Ljubljana, Slovenia, wants to improve its supply chain efficiency by implementing a daily process for solving the analytical task of scheduling deliveries with time windows and limited vehicle capacity.
We are considering one day of the company's operations, during which a route optimization cycle will be performed based on static data (available vehicles and orders from the customers considering their operating hours).
A total of 20 customers (offices and individual clients) were registered for the considered experiment duration period. The orders these customers placed were registered with the operating hours (defined in the Time Windows table) of the customers.
The company has a central distribution center, from which deliveries to customers will be made. The distribution center has two fleets with vehicle types that have different capacities and speeds.
We assume that it takes:
- 1 minute per unit of goods to transfer products from the vehicle to the customer.
- 3 minutes to load a vehicle at the distribution center.
Obtain an optimal schedule for shipping, loading and unloading of the orders within the city, considering the delivery time and the distance traveled by the vehicles.
We create the required scenario by following the steps below:
- Define customers' demand of historic type in the Demand table.
-
Define two types of vehicles:
-
Create a fleet for the distribution center for each vehicle type (Fleets table):
- Add the necessary paths (in the Paths table) between all objects of the supply chain so that the vehicles could move not only from the distribution center to customers but also among the customers. These paths will be used for optimization.
- Define customers' operating hours (in the Time Windows table), during which they are ready to accept orders.
-
Add loading and unloading gates (in the Loading and Unloading Gates table)
to model the required processes of transferring orders from the vehicles to customers as well as loading the vehicles at the distribution center:
Let us run the Simulation experiment. The received result will have the following KPI metrics:
We can observe the complete fulfillment of all orders, as well as transportation costs according to the specified calculation policies. Additional dashboard pages provide a more detailed overview of the run results.
To demonstrate unorganized deliveries without centralized planning the LTL shipping policies were used in the Shipping table. As a result the couriers would fetch just 1 order for the delivery most of the time, and then wait at the customer's location for the operating hours defined in the Time Windows table.
Last mile optimization essentially implements the CVRPTW problem, which comprises:
- Customers and distribution centers.
- Demand generated by the the customers (individual orders for specific product in certain amount).
- Operating hours (defined in the Time Windows table) for distribution center / customer operations.
- Vehicles have limited capacity.
- Various business constraints, such as mandatory return to the distribution center, maximum vehicle idle time, etc.
-
The goal is to obtain milk runs for each vehicle type that would meet the following requirements:
- An order can be fulfilled just once.
- Vehicle capacity constraints are not violated.
- The defined operating hours are not violated.
- The total travel time is minimized.
The Last mile optimization experiment settings allow us to define:
- The planning horizon (experiment duration).
- Vehicle types that will be used by the optimizer (the optimal vehicles will be eventually used to deliver specific sets of orders in a single trip).
- Maximum shipment duration.
- Maximum vehicle idle time.
- If the vehicles should return back to the positioning site.
- etc.
The Preview Orders table suggests that all orders that have been generated based on the scenario data and experiment parameters should be taken as the input data for the optimizer:
Let us run the experiment. The following result will be obtained within 30 seconds, since this time is allotted to the experiment by the Optimization time limit parameter:
he Milk Runs dashboard page contains the list of generated milk runs with the optimized delivery times. Each milk run is a route comprising a set of customers that will be visited by a vehicle to deliver the demanded orders.
The Shipments Schedule Table dashboard page provides detailed information on all shipments: times of the courier arriving at each point, times of unloading processes, and idle time, if any. This table displays the schedule we want to obtain:
The Last Mile Optimization experiment significantly improves delivery efficiency by planning the delivery routes considering time windows and fleet constraints.
Unlike scenarios with uncontrolled deliveries, this optimization approach:
- Reduces the total distance traveled by consolidating orders into routes.
- Increases vehicle load rates, minimizes empty runs.
- Decreases logistics costs by ensuring better resource allocation.
- Allows importing data from the found solutions into the original scenario for further supply chain analysis.
The Last mile optimization experiment becomes a powerful tool for urban logistics planning, especially during an order surge and strict time constraints. Its application allows you to make data-driven decisions on daily basis and easily scale this approach to other regions or time horizons.
-
How can we improve this article?
-