From kitchen to doorstep: last-mile food delivery optimization

September 18, 2025 Kiryl Vlasavets

From kitchen to doorstep: last-mile food delivery optimization

Food delivery is one of the fastest-growing sectors of urban logistics, but meeting customer expectations for speed and reliability is a challenging task.

In this blog post, we’ll explore how smart food routing and the new last-mile optimization experiment in anyLogistix can help you optimize your food delivery operations. We’ll also walk you through a step-by-step example so you can see exactly how to set up, run, and analyze optimized delivery operations in practice.

Contents:

  1. Why smart food routing matters
  2. How last-mile optimization helps
  3. How-to example: food delivery optimization in anyLogistix
  4. Get hands-on with anyLogistix

WHY SMART FOOD ROUTING MATTERS

Ordering food has become a new global habit. At first glance, delivering meals and groceries in a city sounds simple until you face real-world complexities. Customers expect fresh meals and groceries within tight delivery windows, while companies deal with vehicle capacity limits, traffic congestion, and unpredictable delays, among other daily challenges.

This isn’t just a logistical headache; it’s a real business-critical challenge. The study claims that 78% of consumers would not shop again with a retailer after a single bad delivery experience.

This is where food delivery optimization and smart food routing practices come in, with a primary focus on achieving consistency and maintaining a standard average delivery time. That predictability drives efficiency and strengthens customer trust by ensuring deliveries are reliable and always on time.

HOW LAST-MILE OPTIMIZATION HELPS

Last-mile optimization is one of the key practices in smart food routing. In anyLogistix, the new last-mile optimization experiment is specifically designed to enable companies to minimize total drive time across all delivery routes and improve service levels.

It addresses the core challenge of food delivery logistics, the Capacitated Vehicle Routing Problem with Time Windows (CVRPTW). Last-mile optimization helps consolidate orders into efficient routes, respecting time windows, and ensuring vehicles are used to their full potential.

HOW-TO: FOOD DELIVERY OPTIMIZATION IN ANYLOGISTIX

Let’s break down with an example how you can do last-mile optimization in the latest version of anyLogistix, a powerful supply chain optimization and simulation software.

Case background

Our how-to example features a food company serving customers in the city center within a single day of operations, delivering quick meal boxes. Deliveries are dispatched from the Central Kitchen Hub, a distribution center (DC) that operates two types of vehicles with different capacities and speeds.

20 customers were registered for the food delivery optimization case (click to enlarge)

Each customer has a precise delivery time window, and there are operational constraints:

  • Loading at the DC takes 3 minutes per shipment.
  • Unloading at customer sites takes 1 minute per unit.

The goal is to create an optimized daily delivery schedule that meets time windows, vehicle capacities, and process time requirements.

Required data input

To set up a scenario for last-mile optimization based on our case background, let’s follow these key steps and fill in the corresponding tables:

  1. Define customer demand: Enter orders using historical demand data, including quantities and delivery locations.
  2. Create vehicles: Define the two types of vehicles available, including their capacities and speeds.
  3. Set fleets: Assign each vehicle type to the distribution center.
  4. Build the road network: Add routes connecting the distribution center to all customers, as well as routes between customers.
  5. Add customer time windows: Specify when each customer is available to receive deliveries.
  6. Include loading and unloading processes: Define gates and processing times for loading at the DC and unloading at customer locations.

Inputting the necessary scenario data for food delivery optimization in anyLogistix (click to enlarge)

Running the last-mile optimization experiment

Once the scenario is set and the data has been entered, it’s time to run the last-mile optimization experiment by selecting it from the list of available simulation experiments.

In the experiment settings panel, you can configure key parameters such as:

  • Planning horizon: Define the period for route optimization (one working day in our case).
  • Vehicle types: Select which types will participate. The optimizer will automatically choose the most suitable vehicles for each delivery set. In our example, we will let anyLogistix consider both vehicle types created earlier in the Vehicles table when inputting the required scenario data.
  • Maximum shipment duration: Limit how long a single delivery trip can take. For our business example, let’s set the maximum to one hour.
  • Maximum vehicle idle time: Restrict waiting periods to improve efficiency. Here we’ll set it for 20 minutes, as an example.
  • Return to distribution center: Enable or disable mandatory vehicle returns after deliveries. We will enable this option, as our business owns its fleet, and vehicles need to return to the site.

Other settings can also be adjusted to match your operational constraints and business rules while performing food delivery optimization.

The new Preview Orders table in anyLogistix allows you to review all orders that will be included in the last-mile optimization experiment. This ensures that the optimizer considers the correct input data and helps identify any invalid or missing entries before running the experiment.

Configuring experiment settings and previewing orders in anyLogistix (click to enlarge)

Once you have customized the experiment's settings and previewed the included orders, click the blue button to run the experiment and explore the results.

Interpreting the results

After running the experiment, anyLogistix provides several ways to help you interpret the results:

  • Milk runs: Display all optimized routes, showing how deliveries are consolidated across multiple customers in a single trip. Review the suggested routes in the table and visualize each on the map.
  • Shipments schedule table: Provides a detailed breakdown of every shipment, including courier arrival times at each location, unloading times and durations, and any delays or idle periods encountered.

Food delivery optimization: milk runs table in anyLogistix (click to enlarge)

Shipment schedule table: shipment #1 was created at 11:25 AM, and unloading started at 11:30 AM (click to enlarge)

This is how you can set up, run, and analyze a last-mile optimization experiment in anyLogistix to transform complex food delivery challenges into efficient and reliable operations.


Want to know more about the last-mile optimization experiment and how to explore the results? Check out our release video.

Explore this example in anyLogistix by importing it from the library of available examples.

Importing the last-mile optimization example to your project in anyLogistix (click to enlarge)

GET HANDS-ON WITH ANYLOGISTIX

The last-mile optimization experiment in anyLogistix significantly enhances food delivery optimization by intelligently planning routes and schedules. Compared to uncontrolled or manual planning, this approach:

  • Reduces total distance traveled.
  • Improves vehicle utilization by consolidating orders.
  • Lowers logistics costs through better resource allocation.
  • Contributes to consistent, on-time deliveries that strengthen customer trust.

Ready to see how last-mile optimization can transform your operations? Download anyLogistix for free today and start experimenting with smart food routing in your supply chain.

download