/

Carryt, a Colombian last-mile logistics company handling 200,000+ deliveries per month across Latin America, lacked a routing system capable of enforcing real-world constraints at city scale. Omdena assembled 50 AI engineers to build a route optimization system using Google OR-Tools, OpenStreetMap geospatial data, and a custom graph algorithm on Bogotá’s directed road network. Over ten weeks, the team delivered a production-ready Flask API on AWS that demonstrated a 10% reduction in delivery times, a 5% reduction in delivery costs, and a 20% improvement in customer satisfaction.
| Outcome | Detail |
| Delivery time reduction | 10% demonstrated post-deployment |
| Delivery cost reduction | 5% through fewer vehicle miles traveled |
| Customer satisfaction | 20% increase post-deployment |
| GHG emission reduction | Up to 15% per route via efficiency gains |
| Road network modeled | 335,590 edges, 153,164 nodes (Bogotá) |
| OSM restrictions applied | 92% of extracted turn restrictions incorporated |
| Carryt scale | 200,000+ deliveries/month; target 1 million/month in 2022 |
| Project team | 50 AI engineers, 10 weeks (January–April 2022) |
Carryt processed more than 200,000 deliveries per month across Bogotá, Lima, Mexico City, and Rio de Janeiro (four of the world’s most congested urban environments) and was targeting one million per month by 2022. Without a system capable of handling real-world routing constraints at that scale, dispatch remained manual and inefficient, capping growth and inflating costs.
The core constraint was technical. Carryt’s operations required routing across Bogotá’s one-way street grid with turn restrictions, time windows, vehicle capacity limits, and service priorities all applied simultaneously. No off-the-shelf routing tool handled all these constraints in a single optimization pass. Inefficient routes also carried a direct environmental cost: unnecessary vehicle miles increased fuel consumption and GHG emissions across every delivery run.
Carryt joined Omdena’s incubator for impact startups in 2021. Omdena assembled 50 AI engineers from around the world for a ten-week sprint from January to April 2022. Carryt provided two proprietary datasets for Bogotá: a Shapefile with road geometry, direction, and average speeds; and an OpenStreetMap (OSM) file covering the city’s turn restrictions.
The Vehicle Routing Problem (VRP) grows exponentially in solution complexity as delivery constraints are added. Carryt’s operations required enforcing six constraints simultaneously on every route:
At city scale, finding the provably optimal VRP solution is computationally intractable — it could take years for a large instance. Any practical routing system must return a near-optimal solution within a short time bound using heuristic search. Bogotá’s one-way street grid added further complexity: the nearest drivable node to a delivery address is not always the correct approach, and standard pathfinding algorithms have no native mechanism for OSM turn restrictions.

The Shapefile was parsed with GeoPandas into a structured DataFrame, with travel-time weights calculated as distance divided by average speed. The road network was modeled as a directed graph using NetworkX: one-way streets became single directed edges, and bidirectional roads became two. The resulting graph contained 335,590 directed edges and 153,164 nodes.

OSM restrictions (no-left-turn, no-U-turn, and similar prohibitions) were extracted using Osmium as from-via-to node triples. Of all restrictions in the OSM file, 99% were successfully extracted and 92% incorporated into the routing model. The team modified the standard NetworkX A* implementation to track edge costs rather than node costs, enabling turn restrictions to be checked at every candidate move during route search without removing road segments from the graph.
On Bogotá’s one-way network, routing to the nearest node could systematically underestimate delivery time when the correct approach required additional blocks. The team resolved this by temporarily inserting a routing node on the nearest edge rather than the nearest intersection, correcting geometry for any arbitrary delivery location. A Redis in-memory cache stored completed A* paths, avoiding redundant computation for recurring source-destination pairs.
Google OR-Tools handled three VRP variants: Capacitated VRP, VRP with Time Windows, and VRP with Pickup and Delivery. Constraints were passed via JSON specifying the fleet (start and end locations, capacity, service hours) and delivery nodes (time windows, service duration, demand, priority). The solver returned optimized routes within a 30-second compute window, enforcing all six constraints in a single pass.
The system was packaged as a Flask REST API on AWS, using Docker containers for the full stack including Redis cache and OR-Tools solver. The API accepted and returned data in Carryt’s existing JSON format, making integration a drop-in replacement with no changes to the dispatch workflow.

The deliverable was a Flask REST API on AWS that accepted a fleet specification and delivery node list in JSON format and returned complete optimized routes per vehicle. Dispatch planners could submit jobs without any data science expertise. Carryt reviewed and approved the system against complex real-world test cases, including round trips on one-way roads where pickup and dropoff fell on conflicting segments.

Post-deployment results from Carryt’s live operation:
The turn-restriction logic also corrected a systematic routing error across Bogotá’s one-way grid, a problem affecting all dense urban networks with directional constraints. The city-agnostic architecture means the same corrections apply directly to Lima, Mexico City, and Rio de Janeiro as Carryt expands.
On Bogotá’s one-way network, the nearest drivable node to a delivery address could require several additional blocks to reach from the correct approach direction, systematically underestimating delivery time. The fix, inserting a temporary routing node on the nearest edge, corrected this and applies to any dense urban network with directional constraints.
NetworkX’s default A* marks nodes as visited after the first optimal path, blocking alternate approaches when turn restrictions are in place. Switching to edge-cost tracking resolved this with minimal code changes and restored full network traversability under all incorporated restrictions.
Hierarchical pathfinding using the road hierarchy field was identified as the correct long-term solution for worst-case A* complexity, but remained incomplete within the project timeline. Redis caching provided a practical substitute: storing computed paths for repeated source-destination pairs maintained acceptable latency across real dispatch volumes.
The highest-priority next step is real-time route adjustment: integrating live traffic and weather data so the solver can reroute vehicles in response to changing conditions as Carryt scales toward one million monthly deliveries. A penalty-based handling system for infeasible constraint sets (where total demand exceeds fleet capacity) was scoped but not completed, and remains the top technical addition for the next phase.
The city-agnostic framework is ready for Lima, Mexico City, and Rio de Janeiro. Each city requires a compatible Shapefile and OSM dataset; the graph, solver, API, and cache layers are unchanged.
The team modified NetworkX A* to track edge costs, enabling from-via-to turn restrictions to be enforced during route search. 99% of OSM restrictions were extracted; 92% incorporated across Bogotá’s full road network.
OR-Tools supported three VRP variants (CVRP, CVRPTW, VRPPD), enforcing all six Carryt constraints in a single optimization pass. Output was validated against complex real-world Bogotá test cases before deployment.
The full system (directed graph, custom router, OR-Tools solver, Redis cache) was containerized and deployed as a REST API. It accepted and returned data in Carryt’s existing JSON format, requiring no changes to the dispatch workflow for integration.
Omdena partnered with Carryt, a Colombian last-mile logistics provider processing 200,000+ deliveries per month, to build a route optimization system for Bogotá. Fifty AI engineers collaborated over ten weeks (January–April 2022) to develop a NetworkX-based directed road graph, a custom A* algorithm incorporating OpenStreetMap turn restrictions, and a Google OR-Tools VRP solver deployed as a Flask API on AWS.