Skip to content
All projects

Last-mile delivery route optimization

Project write-up

The client is described by industry and scale, without a name. KPI figures are targets agreed with the client after a baseline measurement.

In brief

Problem
Routes are planned by dispatchers from experience, and changes during the day (new orders, absences) are handled by phone.
Approach
A route optimization engine with constraints (time windows, capacity, driver working hours) and a travel time forecast based on history.
Goal
Handling time per case: cut in half compared to the baseline measurement; Active users of the solution: ≥ 80% of the target group after 3 months.

Client context

Logistics runs on margins that depend on the utilization of fleet, warehouse, and people. Data about shipments, routes, and resources must be current, otherwise planning turns into guesswork. The client is a courier company delivering for e-commerce in several large cities.

Challenge

Routes are planned by dispatchers from experience, and changes during the day (new orders, absences) are handled by phone.

Requirements and constraints

  • GDPR, i.e. Regulation (EU) 2016/679, requires data minimization, a legal basis for processing, processing agreements, and, for high-risk processing, a data protection impact assessment (DPIA). In practice it rules out copying production data into test environments without anonymization or pseudonymization. (source)
  • The AI Act, i.e. Regulation (EU) 2024/1689, introduces obligations that depend on the risk category of the AI system: transparency toward users, human oversight, technical documentation, and event logging. Systems that affect creditworthiness or employment may fall into the high-risk category. (source)
  • Project constraints: work only on anonymized or synthetic data outside production, access to systems through the client's infrastructure, and every deliverable shipped with documentation the client's team can take over.

Approach and architecture

We start an AI project with the business question and the cost of error: what happens when the model is wrong in one direction or the other. Only then do we choose the method. A simpler, explainable model often beats a deep network. We work in an MLOps cycle: versioning of data and models, validation on data from a different period than the training data, drift monitoring, and a path for rolling the model back to rules.

A route optimization engine with constraints (time windows, capacity, driver working hours) and a travel time forecast based on history. The dispatcher approves and adjusts the plan, and changes during the day are recalculated automatically.

Key elements of the solution:

  • A route solver with constraints
  • Travel and service time forecast
  • Intraday plan recalculation
  • A dispatcher panel with approval

Team and roles

RoleCountResponsibility
Data scientist2models, validation, explainability
Python developer1services, integrations, processing scripts
Backend developer (Java/Kotlin)1domain services, API, unit tests
Business analyst1requirements, processes, acceptance criteria
Product owner and domain experts (client side)as neededpriorities, business decisions, acceptance

Phased schedule

PhaseWeeksDeliverable
1. Problem and data definition1–3problem card, data analysis
2. Prototype and offline evaluation4–7baseline model, metrics
3. Pilot with users8–11pilot, evaluation report
4. Production and MLOps12–15pipeline, monitoring, documentation
5. Review and development plan16–18report, backlog

Technology stack

Python, OR-Tools, PostgreSQL with PostGIS, OSRM, Kafka.

Risks and how we mitigate them

RiskHow we mitigate it
Low user adoptionchampions in each department, training on their own cases, usage measured from day one
Data drift and declining model qualitydistribution monitoring, alerts, periodic validation, and a path back to rules
Scope creep during the projecta backlog prioritized with MoSCoW, every change goes through the committee with a schedule impact estimate

Measurable goals and KPIs

The values below are targets that we set with the client after a baseline measurement in the first phase.

KPITargetHow it is measured
Handling time per casecut in half compared to the baseline measurementbefore and after time measurement
Active users of the solution≥ 80% of the target group after 3 monthsusage telemetry

Lessons learned and good practices

The dispatcher must have the last word, otherwise they will reject the tool. Forecasting the service time at a stop matters as much as travel time. A simple model that works in production is worth more than the best model in a notebook.

Why DYNAMINDS Labs

DYNAMINDS Labs is the R&D division of B2B.net S.A. On the Elevate platform, our external IT department model, we deploy AI Workers that organize data and take over repetitive work. Each step is a separate ticket with a price and a deadline within 24 hours, and payment happens after acceptance. The diagnosis is free.

Acceptance criteria

Each phase ends with formal acceptance against criteria agreed at the start. In this engagement, acceptance covers: problem card, data analysis; baseline model, metrics; pilot, evaluation report; pipeline, monitoring, documentation; report, backlog. Final acceptance requires a KPI measurement report against the baseline, complete documentation handed over to the client's team, and a list of recommendations for the next stage, with a cost and risk assessment for each.

Next step

Submit your first ticket in Elevate in your own words. You will get a price and a deadline within 24 hours, and you pay after acceptance. Contact: office@b2bnetwork.pl.

Start with one task.

Describe it in your own words. We start with a free diagnosis and reply within 24 hours.

Meet DYNAMINDS Labs

B2Bnetwork · B2B.net S.A. · accredited exam center. We describe clients by industry and scale, without names.

More projects: Logistics