From producer to retailer, do you know how many kilometres your carton of milk travelled before it reached your breakfast table today? If you bought coffee pods, the beans may have come from Ethiopia but were roasted and packaged in Europe. How many countries did your favourite sweater cross before landing on a shop’s shelf? How many tonnes of carbon dioxide were emitted so that an online order could reach your doorstep? And how long did you have to wait for it?
Welcome to the fascinating world of logistics and supply chains: one of the most crucial and challenging areas of competitiveness for businesses today. Modern logistics is no longer just a question of transportation; it combines optimisation models, Artificial Intelligence, human experience, and sustainability to find the best solutions and bring planning closer to reality. From route optimisation to dynamic delivery pricing, logistics is undergoing a transformation – one enhanced by online commerce. More data brings more uncertainty, and this calls for solutions that balance speed with intelligence.
At INESC TEC, we are exploring synchronisation algorithms, collaboration models between producers, retailers, and operators, and simulators designed to tackle complex problems in transportation, mobility, and supply chains. The route is set – shall we go?
From theory to reality: smarter routing
The classical Vehicle Routing Problem (VRP) is a well-known mathematical optimisation challenge. Based on customer, location, and vehicle data, the goal is to define the most efficient routes – minimising costs while respecting constraints such as delivery time windows or vehicle capacity.
In the past, applying theoretical models to real-world conditions was enough; today, however, planning has become far more dynamic. As INESC TEC, researcher Fábio Neves Moreira explained, “you can’t plan deliveries for 100 customers and simply adjust if 200 show up. Uncertainty is constant, and we need solutions that can adapt in fractions of a second. The key lies in sequential decision-making, a concept that integrates real-time data and allows plans to be adjusted as circumstances change.”
This reasoning led him to develop operations simulators – systems that recreate complex scenarios, whether in urban transportation or in-store operations, to train decision-making algorithms in conditions close to reality. “Simulators are a cheaper way to make mistakes; we can train and test thousands of times before applying a policy in the field,” he explained.
A concrete example emerged during the pandemic, when a major retailer faced the challenge of preparing online orders directly in-store. INESC TEC created a simulator that guided pickers through less jammed aisles. “The algorithm learned that if it encountered crowded aisles, it should suggest alternative routes. The idea was to maximise the number of orders prepared without disrupting the customer’s shopping experience,” recalled Fábio.
His research has found applications in other areas too – from media companies, where algorithms simulate reader journeys to personalise content, to retail, where similar principles optimise staff allocation across store sections, incorporating planners’ preferences into the optimisation process.

Algorithms and human experience: the missing combination
It’s 11:30 a.m. and a delivery van pulls up outside a residential block in the outskirts of Porto. The driver knows what to do: instead of ringing the bell at the listed address, he leaves the parcel at the newsagent across the street. Why? Because Arlindo is never home at that time of day.
This type of real-world insight inspired the TacitRouting project, which won the Portuguese Logistics Association award. The idea: combine classical optimisation models with AI and machine learning to integrate “tacit knowledge” into route planning – the informal, experience-based decisions that affect the so-called “last mile.”
“The traditional models oversimplify reality. What’s planned in software rarely matches what drivers do on the ground. But there’s one stage that remains a huge challenge: the last mile – the final stretch from distribution centre to the customer’s door. That’s where costs skyrocket, and where technology still struggles to offer perfect answers,” explained António Galrão Ramos, INESC TEC researcher and one of the project’s architects.
The economics explain why: moving a full truckload from a producer to a distribution centre is highly efficient. But once the load is split into dozens of vans driving through neighbourhoods, narrow streets, and jammed cities, costs rise sharply. With the boom in e-commerce and the pressure for ever-faster deliveries, the challenge grown considerably.
The differences between “what is planned” vs. “what actually happens” is quite clear in the Arlindo example mentioned before; hence, TacitRouting seeks to bridge this gap by building systems that learn from human expertise. “We need to balance mathematical thoroughness with the flexibility of human experience,” said Ramos. Similar work is underway in European projects such as PEER, which also explores ways to integrate human feedback into algorithms. As Fábio Neves Moreira mentioned: “There’s information that doesn’t exist in the data. Our mission is to build algorithms that learn from experience, becoming more robust and better aligned with decision-makers’ preferences.”
The INESC TEC work goes beyond deliveries and the “last mile”, since the teams has been exploring other projects dedicated to optimisation. In the cork industry, for example, algorithms are being developed to help robots stack irregular cork planks. “Unlike regular boxes or blocks, each piece has different dimensions, which makes automatic loading harder to achieve. We’re developing algorithms that show robots where to put each piece, crating stable piles. It’s a complex task, since there are no equal pieces,” explained António Ramos.

Fairer for producers, more efficient for retailers
In theory, route planning is simple: deliver within the time windows, ensure product quality, and return to base. In practice, as researcher Maria João Santos has shown, the process is full of exceptions and constraints, particularly in the food sector. If a company is far from the customers but there’s already a logistics operator delivering in that area, why not use the same trip to pick up goods for the return journey?
“In the traditional models, vehicles return empty; but the principle of backhauls shows great potential: vehicles don’t just deliver but also collect goods on the way back, increasing efficiency. If operators and retailers share the same resources, everybody wins,” said the researchers. But there are risks – especially in food logistics. “Cross-contamination must be avoided; if you’re transporting meat, you can’t collect other goods on the same route. But when it comes to beverages, it works well – you deliver full bottles and collect empty bottles.”
In practice, it is not enough to state that this collaborative system is beneficial. Data sharing is required to define principles and establish rules – something that is not always easy for companies. In the BeFresh project, for example, researchers explore flexible solutions regarding the requirement that products arrive at the retailer with at least two-thirds of their shelf life intact. Instead of products being rejected on arrival, the team presents alternatives – discounts or other conditions – that can avoid unnecessary journeys. According to Maria João, “it is fairer for the producer and more efficient for the retailer.” She added: “If producers, retailers, and logistics operators can anticipate problems and negotiate fair solutions, everyone wins. Mathematics and algorithms help, but they only work if they are close to what really happens.”
When synchronisation comes into play
We have already spoken about VRP, but what happens if we add another layer of complexity to designing more efficient routes? In the VRP with synchronisation (VRPSync), there are dependencies between routes, as explained by INESC TEC researcher Ricardo Soares: “It may be necessary for two vehicles to reach the same customer at the same time, or within a specific time interval. Or it may be necessary to coordinate the arrival of vehicles at loading and unloading terminals due to limited space. Or, in the case of concrete mixers, their availability must be synchronised with the arrival of the vehicles transporting cement to different clients. These are all examples of interdependence.”
With the expansion of autonomous vehicles, synchronisation is gaining new relevance. Ricardo Soares pointed out that there are already situations where heavy lorries cover main routes while drones carry out deliveries to more remote or hard-to-reach areas.
But how can synchronised routes be planned when uncertainty is involved? “Normally, one assumes that travel times are fixed. But there are delays – due to traffic, roadworks, or weather conditions. To deal with this variability, we use robust optimisation,” the researcher explained. It is not necessary to know the exact distribution of uncertainties; instead, an “uncertainty budget” is defined (for example, the solution must withstand up to five worst-case scenarios during the operation). This approach ensures that the planning solution is more reliable when applied to the real world. The result is an algorithm capable of solving problems and striking a balance between quality, total cost, and safety.
From fixed fees to dynamic pricing
Consumers are buying more online, want faster deliveries, and have become more demanding. Planning cannot focus only on minimising costs; it must also maximise customer satisfaction.
Fábio Neves Moreira explained that dynamic pricing for home deliveries may be one of the formulas for solving logistics problems, adjusting tariffs according to demand, available vehicle capacity, or order volume. In the TRUST-AI project, for instance, a model was developed that integrates time slot pricing into the classical vehicle routing problem, enabling distribution routes to be optimised while considering different delivery time windows and their respective costs. “In the past, delivery fees were fixed, but today companies work with other data. If many customers choose the same time window, the price may increase. If there is spare capacity in other windows, the system suggests lower prices to attract demand. The goal is to balance convenience for the customer with operational efficiency,” the researcher added.
The logic is similar to that used by services such as Uber, but applied, for example, to food retail. “In Portugal, there are still few companies with fully dynamic systems. Many prefer to control the pricing panels themselves and not allow the algorithm to choose the best combination at any given moment. At this transitional stage, the challenge is to find the balance point between flexibility and control, meeting the needs of businesses,” he added.

The future of logistics
For researchers, the future of logistics lies in real-time data integration, in the explainability of algorithmic decisions, in emerging technologies, in flexibility, and in growing collaboration with robotics. “Companies want to know not only what the best solution is, but also why the algorithm suggests it. Transparency is now a requirement because it increases trust and brings technology closer to users,” stressed António Galrão Ramos.
Robotisation is seen as inevitable, especially in repetitive or heavy tasks. In the long term, the goal is clear: to create hybrid systems, where algorithms learn not only from data but also from human knowledge, making logistics more agile, predictable, and sustainable.
Maria João Santos mentioned that logistics will face even greater challenges with the introduction of electric and autonomous vehicles, since these innovations bring new restrictions ranging from battery charging to regulatory rules.
Back in the 1960s, The Marvelettes begged Mr. Postman not to be late with the delivery of a letter. In 2025, we are begging the algorithm to ensure that the online order arrives on the right day, at the right hour.
The researchers mentioned are associated with INESC TEC, Porto School of Engineering, Faculty of Economy of the University of Porto and the Faculty of Engineering of the University of Porto.