Özer Cem KELAHMETKELAHMET
Tools · Industries

AI in logistics

Logistics uses AI for demand forecasting, route optimisation, ETA prediction, warehouse automation and anomaly detection in shipments. Learn key use cases.

Overview

Logistics is the work of moving and storing goods: from factories to warehouses, between distribution centres, through ports and borders, and finally to shops and front doors. It involves trucks, ships, aircraft, trains, couriers, warehouse staff, robots and a great deal of paperwork. Every day, logistics companies make thousands of decisions about what to stock where, which vehicle carries which load, in what order deliveries happen and how to recover when something goes wrong.

AI helps in two complementary ways. Prediction tells planners what is likely to happen: how much demand there will be, when a shipment will really arrive, which deliveries will fail. Optimisation decides what to do about it: which routes to drive, how to load vehicles, where to place stock and how to staff a warehouse. Combined with real-time tracking, these methods let networks react to delays and disruptions instead of discovering them afterwards.

An everyday picture is a dispatcher with perfect memory and foresight, who knows every parcel, every vehicle, every traffic jam and every customer's opening hours, and can replan thousands of trips in a few seconds when a lorry breaks down. No person can do that alone, but data and algorithms let a team operate close to it.

What it is

Use case Question Typical technique
Demand forecasting How much will be ordered, where and when? Time-series models, gradient boosting, deep forecasters such as TFT
Inventory placement How much stock should each location hold? Forecasts plus inventory optimisation
Route optimisation Which vehicle visits which stops, in what order? Vehicle routing solvers and heuristics
ETA prediction When will this shipment really arrive? Regression on route, traffic, history
Load planning How should goods be packed into vehicles or containers? Packing optimisation
Warehouse operations How should picking, slotting and staffing work? Optimisation, forecasting, robotics
Exception detection Which shipments are going wrong? Anomaly detection, rules
Document processing What does this invoice or customs form say? OCR and language models
Customer communication Where is my parcel? Tracking data plus assistants

A useful distinction is between planning horizons. Strategic decisions, such as where to build a warehouse, look years ahead. Tactical decisions, such as weekly staffing and stock levels, look weeks ahead. Operational decisions, such as today's routes and real-time rerouting, look minutes to hours ahead. Different models suit each horizon.

Where it came from

Logistics has long been a home for mathematical optimisation. Operations research grew rapidly during and after the Second World War, and transport problems were among its first applications. In 1959 George Dantzig and John Ramser published "The Truck Dispatching Problem" in Management Science, which formulated what is now called the vehicle routing problem: how to serve a set of customers from a depot with a fleet of limited-capacity vehicles at minimum cost. Fast heuristics, such as the savings method of Clarke and Wright in the 1960s, made practical solutions possible.

Over the following decades, warehouse management systems, transport management systems, barcode scanning and later GPS tracking digitised the physical flow of goods. E-commerce growth from the 2000s onward, especially in parcel and last-mile delivery, multiplied the number of small shipments and raised customer expectations for precise delivery times.

From the 2010s, machine learning improved forecasting and arrival-time prediction, while warehouse robotics and automated sorting spread. Supply-chain disruptions in the early 2020s highlighted the value of visibility and fast replanning. Today, language models are increasingly used to read shipping documents, summarise exceptions and help planners query operational data.

How it works

Step 1: build visibility

Collect events from every stage: orders, warehouse scans, vehicle GPS, carrier status updates, port and customs events, and proof of delivery. Stream them through an event platform such as Apache Kafka and link them by shipment identifiers. Without reliable visibility, every model downstream is guessing.

Step 2: forecast demand

Forecast volumes by product, location and day, using sales history, promotions, seasonality, holidays and external signals such as weather. Report uncertainty ranges, because planning for a high-demand scenario needs to know how high it might go.

Step 3: plan inventory and capacity

Use forecasts to set stock levels per location, plan warehouse labour shifts and book transport capacity. These are optimisation problems with service-level targets and costs.

Step 4: optimise routes and loads

For each day, assign orders to vehicles and sequence stops, respecting vehicle capacity, driver hours, time windows and road restrictions. Solvers combine exact methods for small problems with heuristics and metaheuristics, such as local search, for large ones. Travel times come from historical speeds and live traffic.

Step 5: predict arrival times and exceptions

Machine learning models estimate arrival times from distance, route, time of day, stop history, carrier performance and live position. Exception models flag shipments likely to be late or damaged so staff can act early.

Step 6: execute and replan

As the day unfolds, compare actual progress with the plan and replan when needed, for example moving stops between vehicles after a breakdown. These loops are real-time systems with tight time budgets.

Key concepts and terms

Term Meaning
Vehicle routing problem Assigning and sequencing stops for a fleet at minimum cost
Time window The period in which a delivery must be made
Last mile The final leg of delivery to the customer
ETA Estimated time of arrival
Service level Target share of orders delivered on time or in full
Safety stock Extra inventory held to cover forecast uncertainty
Cross-docking Moving goods from inbound to outbound transport with little or no storage
Slotting Deciding where items are stored in a warehouse
WMS and TMS Warehouse and transport management systems
Bullwhip effect Demand swings growing larger as they move up the supply chain
Exception management Detecting and resolving shipments that deviate from plan

A worked example

This scenario is illustrative. A regional grocery distributor delivers to 420 shops each morning with 38 refrigerated trucks. Routes are planned by hand each evening, and about 9 per cent of deliveries miss the shop's two-hour window.

The team first builds a travel-time model from a year of truck GPS data, predicting segment times by hour and weekday; it reduces travel-time error by about a third compared with map estimates. It then uses a vehicle routing solver with capacity, refrigeration, driver hours and shop time windows, fed by the predicted travel times and the next day's orders.

In a four-week trial on half the fleet, the optimised routes need two fewer trucks per day and cut total distance by 11 per cent. Missed windows fall to 4 per cent. An ETA model updates each shop's expected arrival during the morning, and shops receive a message if their delivery will be more than 20 minutes late. Dispatchers keep the right to edit routes, and their edits are logged and reviewed to improve the constraints the solver uses.

Strengths and limitations

Strengths:

  • Reduces distance, fuel, vehicles and labour for the same work.
  • Improves on-time performance and customer communication.
  • Lowers inventory while keeping service levels.
  • Detects problems early enough to act.
  • Scales planning to volumes no manual team could handle.

Limitations:

  • Depends on accurate, timely tracking and master data such as addresses.
  • Real-world constraints are complex and often undocumented.
  • Disruptions break patterns that forecasts learned from history.
  • Plans that ignore drivers' and staff knowledge may be rejected in practice.
  • Partners, such as carriers and ports, may share limited data.

How it compares with alternatives

Approach Strength Weakness
Optimisation with machine-learned inputs Strong plans with realistic times Needs data and modelling skills
Manual planning by experienced staff Captures local knowledge Slow, inconsistent at scale
Static rules and fixed routes Simple and predictable Wasteful when demand varies
Pure machine learning policies, such as reinforcement learning Can adapt to complex dynamics Hard to guarantee constraints and explain
Simulation and digital twins Safe what-if testing of networks Costly to build and calibrate

Practical guidance and best practices

  1. Fix visibility and master data, such as addresses and product dimensions, first.
  2. Measure baselines for cost, distance and on-time rates before changing anything.
  3. Use machine learning for predictions and solvers for decisions; combine them.
  4. Forecast with uncertainty ranges and plan for the range, not just the average.
  5. Encode real constraints from drivers and warehouse staff, and keep refining them.
  6. Pilot on part of the network and compare with a control group.
  7. Keep planners able to override, and learn from their changes.
  8. Monitor forecast and ETA accuracy continuously, especially after disruptions.

Common mistakes

  • Optimising routes with map travel times that ignore real delays at stops.
  • Treating a point forecast as certain and holding no safety stock.
  • Ignoring constraints such as loading-dock hours or vehicle access restrictions.
  • Measuring success by plan quality instead of what actually happened on the road.
  • Building separate models for each team that disagree with each other.
  • Retraining forecasts on disrupted periods without marking them as unusual.

Frequently asked questions

Is route optimisation an AI problem?

It is mainly an optimisation problem from operations research, solved with algorithms designed for routing. Machine learning improves it by providing better inputs, such as predicted travel and service times and demand, and sometimes by learning heuristics. The best systems combine both.

How accurate can ETA predictions be?

It depends on the mode and data. Short urban deliveries with live GPS can be predicted within minutes, while ocean freight depends on port congestion and weather and may be uncertain by days. Report a range and update it as the shipment progresses.

What is the bullwhip effect?

It is the tendency for small changes in consumer demand to become larger swings in orders further up the supply chain, as each party adds buffers and reacts to delays. Sharing demand data and better forecasting reduce it.

Where do language models help in logistics?

They read and extract data from invoices, bills of lading and customs documents, summarise exceptions, draft customer messages and let planners ask questions of operational data in plain language. Critical numbers should be validated against source systems.

Do warehouses need robots to use AI?

No. Forecasting labour needs, slotting fast-moving items near packing stations, and optimising pick paths bring large gains in manual warehouses. Robotics adds further automation where volumes justify it.

Glossary

  • Logistics: planning and executing the movement and storage of goods.
  • Depot: a base from which vehicles start and end routes.
  • Fleet: the set of vehicles available.
  • Proof of delivery: confirmation that goods reached the recipient.
  • Lead time: time between ordering and receiving goods.
  • Metaheuristic: a general strategy for finding good solutions to hard optimisation problems.
  • Visibility: knowing where goods are and their status in real time.
  • Replenishment: restocking a location to target levels.

Summary

Logistics uses AI to forecast demand, place inventory, plan routes and loads, predict arrival times, run warehouses and catch exceptions. It rests on decades of operations research, from the 1959 truck dispatching problem onward, now strengthened by tracking data and machine learning. The strongest systems combine accurate predictions with constraint-aware optimisation, start from clean visibility and master data, plan for uncertainty and keep experienced planners involved.

It belongs to Industries and applications in my stack, under Machine learning. Others in the same group:

Type to search.
    ↑↓ navigate↵ open