Skip to content
sadat.
CapstoneLive demo

Dropify

HERMES turns a parcel manifest into one reviewable daily plan, cutting vehicle stops from 86 to 50 across three coordinated surfaces.

Why it matters

Taught me that the data model separating Failed from Not-attempted is what makes the next day of delivery work. Spatial optimisation is the easy half.

Dropify cover artwork showing the HERMES clustering engine planning a delivery route across Dhaka
Dropify / HERMES. Cover artwork for the project.
Final evaluation

What the strongest configuration did

Best measured configuration
  • Vehicle events
    8650
    Stops per day
  • Total time
    423.03359.56min
    Estimated daily
  • Walking added
    02.36km
    Park and walk
See it in motion

A walk through Dropify.

A screen recording of the Dropify workflow, from the hub dashboard through to the driver app in the field.

Open video
The shape of the work

How Dropify plans a delivery

Every part of the plan answers one practical question. Pick a topic to see the problem it solves and what HERMES does about it.

Every address a stop4 stops, 4 park eventsAddress 1Address 2Address 3Address 4Consolidated physical stops2 stops, 2 park eventsStop 1Stop 2One physical stop can hold several addresses.Illustrative diagram, not a measured delivery run

Four separate addresses on the left each need their own parking and re-entry event. On the right the same four addresses are held in two physical stops, so the vehicle parks twice instead of four times.

Straight-line distance is not walking distanceBarrierLooks closeSame connected networkSeparate networkA walkable group needs a real path, not a short radius.Illustrative diagram, not a measured delivery run

Two stops sit on one pedestrian network and can be walked between. Two others sit on a separate network across a barrier, so the straight line between them looks short but no route exists.

Where the vehicle actually parksCandidates sit on road edges, not on intersectionsCandidate 1SelectedCandidate 3Delivery stopsWalk this linkCandidates are ranked by real pedestrian access, not by nearest node.Illustrative diagram, not a measured delivery run

Three parking candidates sit along one road edge. The middle one is selected because a real pedestrian path links it to the delivery stops, while the other two have no usable walking link.

Cover every eligible stop exactly onceGrouped stops and direct stops together make one planGroup 1Group 2Group 3Direct 1Direct 2Vehicle sessionGrouped stops and direct stops are ordered into one session.Illustrative diagram, not a measured delivery run

Three grouped stops and two direct stops together form one complete plan. A single vehicle session then visits them in a fixed order, so every eligible stop is covered exactly once.

Every parcel ends the day in one of four statesDeliveredClosed for the dayFailedClosed, does not re-assignPendingStill in flight this sessionNot-attemptedEligible for the next dayIllustrative diagram, not a measured delivery run

Every parcel ends the day in one of four states: Delivered and closed for the day, Failed and closed without re-assignment, Pending and still in flight this session, or Not-attempted and still eligible the next day.

Stop planning

The challenge

A delivery vehicle used to stop separately at every physical address, so the same parking, locking and re-entry work repeated all day.

Dropify's approach

Parcels are consolidated into physical stops first. One stop can hold several addresses that a driver can reach on foot.

Why it matters

The wasted effort came from stop overhead, not from the kilometres between stops, so fewer physical stops is where the saving starts.

Under the hoodThe six stages, in order
  1. 01
    Prepare the pedestrian network
    OSMnx

    The walking graph is built and each delivery location is projected onto it, so distance is measured along real pedestrian paths rather than between coordinates.

  2. 02
    Build candidate regions and groups
    Union-Find and NetworkX

    Broad candidate regions are formed with Union-Find. Connected subsets inside them are then enumerated under stop-count, parcel-count, weight, one-way and closed-loop walking constraints, so only feasible groups survive.

  3. 03
    Rank road-edge parking candidates
    Lexicographic minimax

    Candidates are sampled on eligible driving edges and scored by exact pedestrian-network access. The comparison is minimax-first, so the worst stop in a group is reduced before the average is considered.

  4. 04
    Compute the walking loops
    Held-Karp

    The closed walking loop for each bounded candidate is solved exactly with Held-Karp dynamic programming. Bounding the candidates first is what keeps this exact step affordable.

  5. 05
    Select the coverage
    CP-SAT

    A non-overlapping clustered-plus-direct cover is chosen so that every eligible stop is covered exactly once. This is a constraint solve, separate from the walking-loop work.

  6. 06
    Sequence the vehicle sessions
    OSRM with 2-opt

    Road times from OSRM order the final sessions. A nearest-neighbour construction gives the starting order and 2-opt refinement improves it, turning a valid cover into a workable route.

Union-Find builds broad candidate regions from the pedestrian graph, then bounded connected subsets are enumerated under stop-count, parcel-count, weight, one-way and closed-loop walking constraints. Road-edge parking candidates are sampled on eligible driving edges and ranked using exact pedestrian-network access with a minimax-first lexicographic criterion, so the worst stop in a cluster is minimised before the average. Bounded closed walking loops are solved exactly with Held-Karp dynamic programming. CP-SAT then selects a non-overlapping clustered-plus-direct coverage so every eligible stop is covered exactly once, and OSRM road times sequence the final vehicle sessions via nearest-neighbour construction with 2-opt refinement. Each parcel exits the day in one of four states: Delivered, Failed, Pending or Not-attempted, where Failed is closed and Not-attempted is eligible for the next day.

Inside the project

What it actually does

01

Hierarchical micro-clustering

Union-Find candidate regions, then bounded connected feasible subsets under operational constraints.

02

Edge-aware projection

Every delivery location is projected onto the pedestrian network, not the nearest intersection.

03

Road-edge parking candidates

Sampled on eligible driving edges and ranked with a minimax-first lexicographic criterion.

04

Exact closed walking loops

Held-Karp dynamic programming solves each bounded candidate exactly.

05

CP-SAT coverage selection

Clustered and direct alternatives are chosen so every eligible stop is covered exactly once.

06

Road-time sequencing

OSRM road times with nearest-neighbor construction and 2-opt refinement.

07

Four-state delivery model

Delivered, Failed, Pending, Not-attempted. Failed parcels do not re-assign next day; Not-attempted do.

08

Three coordinated surfaces

Merchant page, Hub Manager Dashboard, and Driver Android app.

The workflow

How it moves forward

  1. 01

    Intake

    Merchant submissions flow into the nearest hub.

  2. 02

    Cluster

    HERMES enumerates feasible micro-clusters under stop, parcel, and walking rules.

  3. 03

    Cover

    CP-SAT selects a non-overlapping clustered-plus-direct coverage of every eligible stop.

  4. 04

    Sequence

    OSRM road times order the final vehicle sessions via nearest-neighbor and 2-opt.

  5. 05

    Dispatch

    The manager previews the plan and assigns it to drivers.

  6. 06

    Deliver

    Drivers walk the loops and report each parcel state back to the hub.

Technology

The tools behind it

Which component runs on which technology

Merchant page

  • React
  • Vite

Hub manager dashboard

  • React
  • Vite
  • MapLibre

Driver Android app

  • Java
  • MapLibre
  • Retrofit
  • OkHttp

Backend API

  • FastAPI
  • Firebase

HERMES engine

  • Python
  • OSMnx
  • NetworkX
  • OR-Tools

Database

  • PostgreSQL
  • Railway

Mapping and routing

  • MapLibre
  • Stadia Maps
  • OSRM
System architecture

How the pieces connect

Dropify system architecture
Merchant submission flows into the nearest hub, where the manager plans routes and dispatches the driver app. Select the diagram to open it larger.
Where the work happens

Three surfaces, one system

An order is placed, a route is planned, and a driver completes it
Web page

Merchant Page

Where an order is placed. A merchant submits a batch of delivery stops and follows them through to the end of the day.

  • 01Batch stop submission with parcel details
  • 02Order history kept per merchant account
  • 03Delivery status visible back to the submitter
Web dashboard

Hub Manager Dashboard

Operations console where dispatchers watch the hub, plan routes, and assign work to drivers in real time.

  • 01Live hub map with active drivers and pending deliveries
  • 02Cluster preview before routes are dispatched
  • 03Drag-and-drop assignment to driver IDs
  • 04CSV import for bulk stop ingest
  • 05Performance metrics per route (stops, distance, ETA)
Open hub demo
Android · MVVM

Driver Android App

Field app drivers use on the road: turn-by-turn walking directions, stop checklist, and status updates pushed back to the hub.

  • 01Turn-by-turn walking directions from parking position
  • 02Stop checklist with proof-of-delivery capture
  • 03Live status sync with the hub dashboard
  • 04Offline queue for spotty connectivity
  • 05Four-state delivery model carried through to the field
Download APK
Demo access

Try it yourself

Sign in as hub manager or driver
The data model

Four states, one parcel

Where every parcel ends the day
  • Delivered

    Handed over and closed for the day.

    Closed, successful
  • Failed

    Closed. Does not re-assign on the next day.

    Closed, failed
  • Pending

    Still in flight within the current session.

    In flight
  • Not-attempted

    Eligible for the next day of delivery.

    Re-runnable
A closer look
Click any screenshot to open the gallery
Under the hood

Engineering decisions

What was decided, and why
WalkingloopsCoverageselectionSessionsequencingThree solvers, three responsibilities

Several constraints, one route

Held-Karp walking loops, CP-SAT coverage selection, and OSRM road-time sequencing with nearest-neighbor and 2-opt refinement.

All candidatesBounded enumerationExact solver receivesa small setThe expensive step runs last, on less work

Latency under large delivery sets

Graph-search latency is held under control by bounding candidate enumeration before the expensive exact solvers run.

The hard parts

Challenges

The parts that did not come for free

A delivery planner looks simple on paper. The hard parts were all in the details that the map does not show you.

One wayvehiclestopstopThe wrong sideis unreachable

Parking and one-way streets

Snapping a parking position to the correct side of a one-way street is harder than snapping to the nearest coordinate, because the vehicle has to arrive the right way round.

Group sizeWalking distanceThe two pull against each other

Group size and walking effort

A group that packs more stops into one place may force the driver to walk further between them, so cluster size and walking distance pull against each other.

Bounded setonly the feasiblecandidates remain

Search at scale

Candidate regions branch into far more combinations than a delivery day contains, so the search has to be bounded before anything expensive runs.

Hub dashboardsees the statedriverSame API

Hub and driver state

The hub dashboard and the Android app both need the same state, and the phone is often on a poor connection while it is being used.

FailedClosed for the dayDoes not re-assigngone from tomorrowNot-attemptedNever triedStill eligibleback on tomorrow

Failed versus Not-attempted

A failed delivery is closed, while a parcel that was never attempted is still eligible tomorrow. Getting that distinction wrong changes the next day of work.

Afterwards

What stayed with me

Lessons from building it

Four things carried over from building the planner into how I think about data and about who actually uses the software.

Todayone stateThe datamodel decidestomorrowTomorrowthe plan

The data model shapes tomorrow

The difference between Failed and Not-attempted is not a status label. It decides what the next day of delivery is allowed to attempt.

Coordinateslatitude andlongitudeProjectiona planeto measure inEdge snappinga placeto standThree assumptions that have to agree

Spatial assumptions have consequences

Coordinate systems, projection, and edge snapping are three separate concerns, and assuming they agree produces routes that look right and walk wrong.

Data shapedecidesGraphoperationsSolverwork

Fast algorithms need the right data

An exact solver only stays affordable when the candidate set is shaped well. The data representation does the work before the optimiser runs.

Stop 3 of 9The plan is judged on a phone

The driver experience is the real interface

The plan is judged on a phone, in the street, with parcels in hand. That is where the engineering decisions either hold up or fall apart.