For years I researched a question that today defines the work of LATTIMEX: how do you design efficient routes when capacity is not just a number, but goods that must fit, stay intact and be unloaded in the right order?

Years ago a family of problems hooked me completely: those related to transporting goods and people. They weren't exercises that ended once you found an elegant formula. Every answer opened another question, and every constraint completely changed the solution space.

Behind an apparently ordinary delivery operation lies an enormous combinatorial decision: which vehicle should serve each delivery, in what order it should visit the destinations, and how to do it without exceeding its capacity. As soon as the number of stops grows, the alternatives multiply so fast that checking them all is no longer viable.

What started as curiosity became an independent line of research I have kept up for years. That search produced two algorithms: OAS, for transporting people, and SENDA, for distributing goods quickly and with quality high enough to support real decisions.

The question that obsessed me

The first version of OAS was not created to deliver packages. It came from studying trips with origin–destination pairs: people who must be picked up at one point and taken to another, sharing a vehicle with other passengers.

The goal was not only to reduce the vehicle's distance. It also mattered how long each person waited, how long they stayed on board and how to balance the service among everyone. That tension between global efficiency and individual experience forced me to look at the problem from a different angle.

Over time I realized that the core intuition could be carried over to the distribution of goods. When every trip starts at the same depot, the problem changes shape but keeps the essential question: how to group and order deliveries to produce low-cost trips under limited capacity.

For the first time I saw clearly that this research could become a concrete way to improve how people and goods move.

From OAS to SENDA

When I took the question to the distribution of goods, I found that the rules of OAS didn't work there. With a single depot, the vehicle leaves already loaded and there are no pickups to sequence: another algorithm was needed. That is how SENDA was born, the routing core LATTIMEX uses today.

SENDA follows a single search trajectory per run: each run holds one solution, with all its routes, that is partially destroyed, repaired and improved, without a population of solutions crossing over with each other. It combines published ideas (adaptive large neighborhood search, granular neighborhoods and adaptive capacity penalties) in its own implementation, and splits its time among several trajectories in parallel.

  1. OAS. Sequencing for transporting people with pickup-and-delivery pairs. It will be used, in its original form, in a passenger transport planner.
  2. SENDA. Routing of goods from a depot with one search trajectory per run. It is the algorithm measured in this article.
  3. LATTIMEX. The engine that integrates SENDA with 3D cargo loading, the real fleet, the city's streets and the door-by-door unloading plan.

From the model to the CVRP

In logistics, this class of problem is known as the Capacitated Vehicle Routing Problem, or CVRP. The model starts from a depot, a fleet with limited capacity and a set of customers with demand. The challenge is to serve all of them at the lowest possible total cost.

In complexity theory, the CVRP belongs to the family of NP-hard problems. This means the number of combinations grows explosively as customers, vehicles and constraints are added. In a small operation it is still possible to explore many alternatives; in a real network, trying to enumerate them all can demand impractical computing time. So the challenge is not only to find a solution, but to find a high-quality solution within the time the operation allows.

For years I kept formulating hypotheses, building versions, finding cases where the method failed and starting over. Progress didn't come from a single spectacular discovery. It was an accumulation of small improvements, each one tested before it was kept.

  1. Build a reliable first solution. Before aiming for excellence, the method had to produce complete routes and respect capacity.
  2. Understand the hard cases. Not all instances behave the same: geographic distribution, vehicle saturation and demand variation change the problem.
  3. Focus effort where it adds value. Computing time is a resource; a commercial solver has to decide fast, not research indefinitely.
  4. Verify independently. A solution doesn't count if it skips customers, exceeds capacity or reports a distance that doesn't match its routes.

The result was a compact engine, designed to concentrate computational effort on the highest-impact decisions and avoid unnecessary complexity. Its implementation is under a free license for the community interested in improving routing; what matters for an operation is that it can be deployed, integrated and deliver verifiable results.

Measuring SENDA against a benchmark

To know SENDA's real value it wasn't enough to compare it against its earlier versions. It had to face a serious reference. I chose HGS-CVRP—Hybrid Genetic Search—, one of the most recognized and competitive methods in CVRP research.

HGS is the product of years of algorithm engineering. Its ability to produce high-quality solutions has made it an international point of comparison. The question was not whether SENDA could be declared the overall winner; the question was how much quality it gave up, how much speed it gained and at what sizes that trade-off could be useful.

The experiment was part of a formal manuscript that remains unpublished. We froze the rules before running, used the same time budget, ran 10 external replicates per instance and independently verified cost, coverage, capacity and fleet size.

0.111%SENDA's average gap to the BKS (fixed fleet)
1.58 saverage time per instance (2 s budget)
0.004%HGS's average gap in the same test

BKS stands for Best Known Solution: the best solution known for an instance, used as a scientific reference. The smaller the difference from the BKS, the higher the quality of the solution obtained.

Map of SENDA and HGS results on 60 valid pairs from sets A, B and E, with each instance's fleet size verified
A/B/E comparison under a single-thread 2 s wall clock: 60 valid pairs, 10 external replicates per instance and fleet size verified for both methods. The center of each cell shows the gap difference between SENDA and HGS.

On 60 comparable instances from sets A, B and E, respecting each instance's number of vehicles, SENDA achieved an average gap of 0.111% to the BKS. HGS achieved 0.004%. The average difference was about one tenth of a percentage point.

In plain words: for problems of that size, SENDA came very close to the best known solution and tied HGS on 37 of the 60 instances; on the other 23, HGS was better. Both had the same 2-second budget; SENDA keeps a safety margin by design and finished in 1.58 seconds on average.

Correction of September 28, 2026. The first version of this article reported 0.0120% for SENDA (then called OAS) versus 0.0059% for HGS. A later audit of our own protocol found that, on three instances, those SENDA solutions used one more vehicle than allowed, something the verification missed at the time. With fleet size verified for all methods, the correct figures are the ones above. Closeness does not mean equivalence: the defensible result is that SENDA produces near-optimal solutions on A/B/E, with a small but systematic gap in favor of HGS.

Honesty is part of the product too

On the larger X instances a regime change appeared. SENDA recorded an average gap of 4.119%, versus 1.450% for HGS: a difference of 2.669 percentage points.

There, HGS keeps a clear advantage on the classic CVRP. Hiding that result would have produced a better advertising line but a worse company. Knowing the frontier of a technology is as important as knowing its strengths: it lets you decide where to use it, when to give it more time and what must be evaluated in the complete system.

SENDA doesn't need to be the best solver for every size and every variant. It needs to solve, with quality, speed and consistency, the problem an operation actually faces.

The third dimension changed the question

So far we've only talked about assigning customers and ordering visits. But a last-mile operation doesn't dispatch points on a map: it dispatches boxes, parcels and products that take up space, have weight and must be unloaded in a certain order.

When we add dimensions, orientation, support, fragility and unloading sequence, we enter the territory of the 3L-CVRP. A route can then be outstanding in the traditional CVRP and still be impossible to execute.

  • The total volume may fit while the geometry of the boxes doesn't.
  • A heavy package may end up on top of fragile goods.
  • The next delivery may be blocked at the back of the vehicle.
  • An assignment that is efficient in kilometers may require a vehicle that physically cannot carry the load.
The shortest route is useless if the goods don't fit or can't be unloaded.

That's why, once 3L comes in, a solver's advantage in routing alone no longer determines by itself which solution is best. That difference doesn't disappear, but it becomes part of a bigger decision: producing a complete plan that can be loaded and executed.

This was one of the conclusions that finally changed the course of the project. It was no longer just about perfecting an algorithm. We had to build the bridge between research and the loading dock.

Building LATTIMEX

A solver alone is not a product. To use it every day, a company needs to load orders, configure vehicles, compute distances on real streets, assign drivers, review costs, visualize the loading, hand out route sheets and keep control of its data.

Building LATTIMEX meant surrounding the mathematical engine with everything needed for a decision to reach the operation:

  1. Data a company can use. Import of deliveries, fleet, packages, dimensions and weights.
  2. Distances that match the city. Planning on the road network, not just straight lines between coordinates.
  3. Routing and loading in the same conversation. The assignment must account for what the vehicle can really carry.
  4. Results that reach the driver. Stop sequence, navigation, costs and a loading diagram per vehicle.
  5. Privacy by design. Sensitive customer data stays on the company's infrastructure; the engine works with the minimum information needed to optimize.

That is how the commercial vision of LATTIMEX was born: not to sell an abstract result, but to turn a delivery operation into clear decisions about vehicles, routes and cargo.

The company's name came after the research, but its purpose was already there: bringing mathematical precision to operations that can't afford to exist only on paper.

A day at LATTIMEX

A working day at LATTIMEX doesn't start by asking what new feature we can add to the software. It starts by talking with carriers, dispatch managers, planners and people who know delivery from daily operations.

We ask them which decisions take up most of their time, where the trips that could have been avoided show up and what situations force them to redo a plan. Sometimes the problem lies in assigning vehicles; other times, in a capacity that existed only in the spreadsheet, in a route that changed during the day or in a load that reached the dock and couldn't be arranged as planned.

Then we turn those conversations into optimization questions: which part of the decision can be automated? Which constraints must be represented for the result to be executable? How do we measure whether an alternative really improves the operation?

Then the experimentation begins. We design algorithmic strategies, build prototypes, put them through different scenarios and measure quality, time and feasibility. Since the solution space is too large to explore completely, we work with approximation methods able to concentrate computational effort on the most promising alternatives. The practical question is always the same: how much quality can we get with the time and resources available?

Some ideas work; others reveal their limits and are discarded. We also study how behavior changes as the instance grows or new constraints are added, because a strategy that works with dozens of deliveries doesn't necessarily keep the same performance with hundreds. Not every hypothesis deserves to become a product, and learning that early is also a way to move forward.

When a solution proves it adds value, another job begins: turning it into a tool that can be used without knowing the mathematics behind it. Data preparation has to be automated, decisions presented clearly, results verified and connected to the company's daily workflow.

The goal is not to replace the experience of those who know the operation. It is to give them the ability to evaluate in minutes alternatives that would take hours by hand, spot opportunities that aren't obvious and keep control of the final decision.

That cycle—listening to a real difficulty, formulating it, experimenting, automating and returning to the operation to measure—is how we work at LATTIMEX today. Every conversation can reveal the next problem worth solving.

From Querétaro, we are onboarding distribution and last-mile companies in Mexico to compare their current routes against optimized alternatives and measure kilometers, fuel, fleet utilization, planning time and load feasibility on their own data.

The research continues, but now every advance has a concrete destination: helping an operation make better use of its vehicles, cut unnecessary trips and make decisions backed by evidence.

From theory to your operation

Compare your current routes against an optimized alternative.

We can start with a sample of your deliveries and measure the result on a real case, including fleet capacity and loading constraints.