WorksEngineering
Marginal-Cost Clustering for Courier Dispatch: A Parallel Decomposition for Pickup and Delivery with Time Windows and Fleet Sizing
Abstract
Courier dispatch poses a pickup and delivery problem with time windows in which requests are batched, windows are soft, couriers start where they are and take open routes, and a fixed dispatch charge makes fleet size a decision. We contribute to the cluster-first, route-second family a grouping criterion that scores a request by its marginal cost, the travel and lateness it adds to the route a courier already plans, rather than by its distance to a centroid, one point standing for a whole workload in space and time. The marginal cost instead knows where a courier is, when it becomes free and what it already carries. Each pass, we hold the marginal costs fixed while we solve one integer program that assigns every request to a courier and chooses which to open, then improve its solution by a descent that relocates and swaps requests between couriers. We then route each dispatched courier exactly. That subproblem is naturally a mixed-integer program, and we solve it by label setting over visited sets, which we prove optimal and cheap enough to run every pass. On instances we generate and on adapted Li & Lim benchmark batches, we beat the best of six published clustering rules by 29% as published and by 12% once those rules carry the same descent. Against an adaptive large neighbourhood search at matched wall-clock we are ahead on the generated instances and level on the benchmark, and we handle 1000 requests and 300 couriers in about a minute.
Introduction
On-demand delivery platforms dispatch batches of orders to a pool of couriers every few minutes. Each order is a pickup at a merchant and a delivery to a customer, each has a promised time window, each courier can hold only a few orders at once, and putting one more courier on the road costs money. The dispatcher must decide, in the time between batches, which courier takes which orders, in what sequence, and how many couriers to use at all.
A monolithic mixed-integer formulation of this problem conflates two different difficulties. Assignment, which courier serves which request, forces a routing variable for every (stop, stop, courier) triple, giving binaries. Sequencing, the order in which one courier visits its own stops, is a travelling-salesman problem with precedence and time windows and cannot be reformulated away. Fixing the assignment removes the first exactly and shrinks the second to independent problems on a few stops each, small enough to solve to optimality. That is the cluster-first, route-second idea, and it is old.
What is not settled is what the grouping should optimise. The natural answer, and the one taken by the spatio-temporal clustering literature, is proximity: group requests that are close in space and close in time. We show that the second half of that instinct is backwards. A courier serves its group one stop after another, so two requests that must both be served at ten o’clock are not natural partners but competitors for the same courier-minute, while two requests three hours apart are ideal partners. A clustering cost that rewards temporal closeness therefore concentrates exactly the requests a courier cannot serve. The effect is measurable and is not particular to our formulation: adding a scaled time coordinate to -means, the standard way to make a clustering “spatio-temporal”, multiplies its tardiness by 3.5 on instances where spatial and temporal structure do not already agree, and no weight on that coordinate recovers the loss at any setting we tried.
The fix is to stop describing a group geometrically. A group is good when its requests chain: when the courier can leave one and reach the next inside its window. That is a property of a path, so we price a request against a courier by the marginal cost of the routing subproblem: the increase in travel plus lateness when that request is inserted into what the courier is already doing. The cost is computed from the current assignment and then held fixed while the assignment problem is solved, which keeps that problem a well-structured integer program, and it is vehicle-aware in a way a centroid cannot be: it knows where the courier is and when it becomes free.
What that correction buys is not punctuality but distance. Across a twentyfold range in the penalty rate , our solutions are consistently shorter than the best clustering rule’s and consistently a little later (§ 4.4). That follows from what chaining is: a group whose requests chain is one whose courier reaches each next request without a long empty run, so the travel between its stops is short. Punctuality is available to either method once lateness is priced highly enough, and what separates them is the distance each pays to reach it.
The problem this addresses is the pickup and delivery problem with time windows (PDPTW) under conditions particular to courier dispatch. It generalises the vehicle routing problem (Dantzig and Ramser, [16]; Clarke and Wright, [11]) by pairing each pickup with a specific delivery and restricting service at both to prescribed windows (Dumas et al., [17]; Savelsbergh and Sol, [55]; Parragh et al., [48]); applications span last-mile delivery (Agatz et al., [1]; Ulmer et al., [62]), home health care (Mankowska et al., [38]; Nasir and Kuo, [43]) and ride-sharing (Agatz et al., [2]; Qin et al., [50]). Terminology in this area is not used consistently, so Table 1 sets out the structural axes that separate these problems and locates ours among them. Three entries in our row are what make the clustering question different: windows are soft, so a bad grouping surfaces as cost rather than infeasibility; couriers start from their own positions rather than a depot, so a group’s cost depends on which courier takes it; and routes are open, so a group is a path rather than a tour and its cost is not symmetric in the way a centroid assumes.
Structural taxonomy of pickup-and-delivery routing problems. Commodity flow follows the standard classification [8, 9]: – denotes commodities each having one origin and one destination, and –– commodities delivered from a depot to customers and collected from customers to a depot. A double dagger marks the row in which several pickups belong to one request: each commodity is still –, since the goods collected at each pickup have one origin and one destination. The third class of that scheme, many-to-many, in which any location may be the origin or destination of any commodity, does not arise among the variants compared here. A dagger marks the degenerate case of –– in which no pickups occur, so that goods flow only outward from the depot. “Composition restriction” records what limits the order in which a route may interleave the requests it carries; none means any order consistent with precedence and capacity is permitted. Vehicle capacity is a constraint throughout and is therefore not shown. PDP abbreviates pickup and delivery problem.
| Problem variant | Commodity flow | Pickups per req. | Deliveries per req. | Composition restriction | Time windows | Vehicle origins | Route form | Representative work |
| Capacitated VRP (CVRP) | –– | 0 | 1 | none | none | single depot | closed | [16, 11] |
| VRP with time windows (VRPTW) | –– | 0 | 1 | none | hard | single depot | closed | [60] |
| VRP with backhauls (VRPB) | –– | 0 or 1 | 1 or 0 | all deliveries before pickups | none or hard | single depot | closed | [45] |
| VRP with simultaneous P&D (VRPSPD) | –– | 1 | 1 | none | none or hard | single depot | closed | [47] |
| Full-truckload PDP | – | 1 | 1 | one request at a time | hard | multiple depots | closed | [24] |
| PDP with LIFO loading (PDTSPL) | – | 1 | 1 | last-in-first-out unloading | none or hard | single depot | closed | [48] |
| PDP with time windows (PDPTW) | – | 1 | 1 | none | hard | single depot | closed | [17, 53, 52, 5] |
| Dial-a-ride problem (DARP) | – | 1 | 1 | maximum ride time per request | hard | single depot | closed | [14, 12] |
| Multi-pickup PDPTW (MPDPTW) | – | 1 | none | hard | single depot | closed | [41, 4] | |
| Meal delivery routing (MDRP) | – | 1 | 1 | none | hard (deadline) | per vehicle | open | [51, 68, 63] |
| This paper | – | 1 | 1 | none | soft | per vehicle | open | — |
Table 1.
Related work. Exact treatment of the PDPTW begins with column generation over a set-partitioning formulation, embedded in branch-and-bound and priced by dynamic programming (Dumas et al., [17]); the window tightening introduced there is still standard and we reuse it. Branch-and-cut formulations with families of valid inequalities followed (Ropke et al., [53]; Cordeau, [12]), together with branch-and-cut-and-price (Ropke and Cordeau, [52]) and set partitioning with dual ascent (Baldacci et al., [5]), which remain the strongest exact methods; related exact work covers the capacitated VRP (Baldacci et al., [6]) and stochastic travel times (Laporte et al., [29]), a literature surveyed in (Gendreau et al., [22]). These solve instances of a few hundred requests, but take minutes to hours, and an exact method interrupted early may return nothing feasible. A rolling horizon allows seconds.
The field has therefore turned to heuristics: tabu search (Nanry and Barnes, [42]; Cordeau and Laporte, [14]), building on tabu search for vehicle routing without paired requests (Gendreau et al., [21]; Cordeau and Laporte, [13]), tabu-embedded simulated annealing (Li and Lim, [33] (2001)), insertion and route-building construction (Potvin and Rousseau, [49]; Lu and Dessouky, 2006; Mitrovic-Minic et al., [39]), and grouping genetic algorithms (Pankratz, [46]); multi-objective variants are surveyed in (Jozefowiez et al., [26]). The strongest current methods are large-neighbourhood searches: adaptive large neighbourhood search (Ropke and Pisinger, [54]) improved a majority of best-known solutions on the Li & Lim instances (SINTEF, [59]), and Courtois et al. [15] combined local search, large neighbourhood search and guided ejection search to improve them further. A parallel line learns construction heuristics directly (Vinyals et al., [64]; Bello et al., [7]; Nazari et al., [44]; Kool et al., [28]), including for pickup and delivery (Li et al., 2022, 2021); these are fast at inference but require training per instance distribution and give no feasibility guarantee under capacity and window constraints. Deep policy dynamic programming (Kool et al., [27]) uses a learned model differently, to restrict a dynamic program that extends only feasible partial routes, so it does respect time windows, at a higher inference cost than direct construction.
Two literatures bear directly on our setting. Requests spanning several merchants (the multi-pickup problem [41, 4]) form a different combinatorial object from the paired requests studied here. Meal delivery matches our operational conditions closely: the routing problem was introduced in [51] with a rolling-horizon matching algorithm, the static variant solved by simultaneous column and row generation on industry data in [68], random meal ready times added in [63] and multi-restaurant orders in [61]. In all of these, as here, couriers are dispatched from wherever their previous assignment left them.
The present work belongs to the cluster-first, route-second tradition introduced in [20], where customers are assigned to vehicles by a generalised assignment problem whose objective approximates routing cost, after which each vehicle is routed independently. The assignment step is tractable due to [10], which showed that -means under cluster-size constraints is a minimum-cost flow problem solvable as a linear program. Within routing, -means and its relatives have been used to assign customers to depots [18], balance workload across delivery areas (Mo et al., 2026), and support cold-chain distribution [58], facility location [69], the VRP with time windows (Le et al., 2022) and two-echelon routing [65]; hybrid -means and genetic schemes appear in [19, 66], and a three-stage heuristic for the capacitated VRP with time windows in [3]. Algorithmic foundations are treated in [25, 56].
Three features of this stream motivate the present work. First, the number of groups is tied to the fleet. A cluster is a vehicle’s workload, so the two are in one-to-one correspondence [20, 3, 18] (Le et al. 2022); every vehicle is implicitly dispatched and fleet size cannot be traded against travel, even when a courier carries a fixed cost. Second, the grouping objective is a geometric proxy for a routing cost, and is not validated against it. A request is scored by its distance to a centroid, a quantity that summarises a whole workload by one point and is never compared with what the routing subproblem would actually charge. Third, groups are formed on proximity, and the standard remedy for time windows is to extend that proximity to the time axis, by a spatio-temporal embedding or a distance from a request’s window to a cluster’s mean time. We show in § 3.2 that this is the wrong relation: under sequential service, requests due at the same moment compete rather than belong together, so a temporal proximity term concentrates precisely the requests one courier cannot serve. The three are addressed by one change: pricing a request against a courier by the marginal cost of the routing subproblem, in a program that also decides which couriers to open.
Contributions.
(i) We show by measurement that temporal proximity is the wrong quantity to cluster on under sequential service, and we replace it with the marginal cost of the induced routing subproblem (§ 3.2).
(ii) We make the grouping dispatch-aware, formulating it as one integer program that assigns requests to couriers and simultaneously decides which couriers to open, and we keep that program linear in the number of requests with candidate lists (§ 3.3).
(iii) We build two cheap surrogates for the subproblem cost, measure their rank fidelity against the exact router rather than assume it, and use both in a two-stage descent, the faster screening every candidate move and the sharper re-scoring only the promising ones (§ 3.4–§ 3.5).
(iv) We derive a parallel form of the assignment step in which each courier solves its own subproblem, coupled only by a multiplier on each request, and we report what that form costs as well as what it saves (§ 3.8).
(v) We evaluate against six published clustering rules, in their published form and strengthened with our own improvement step, over three problem sizes, two alignment regimes and benchmark batches we did not design, scaling to 1000 requests and 300 couriers, and we mark the boundary of the claim by removing the dispatch charge (§ 4).
Problem Statement
Data
An instance consists of requests and couriers . Request is a pair of a pickup and a delivery; writing and , the stops are . Stop has a service duration and a window within which service should begin. Courier has capacity , an origin , the location it starts from, and a ready time , the time it becomes available. Travel times satisfy the triangle inequality.
Each request occupies one unit of capacity, so counts requests rather than weight: what binds in meal and parcel delivery is how many orders fit in the bag. Capacity is a bound on the total number of requests a courier receives, , not on the number it holds at one instant. The two readings differ, and the choice is forced by the decomposition rather than by the application. A cluster-first method commits a whole group to a courier before any sequence exists, so at the moment the capacity constraint is imposed there is nothing to count concurrency on; only the total is known. The total-count reading is the stronger of the two, since a route never holds more than it is given, so a solution feasible under it is feasible under the simultaneous-load reading as well, and every method in Section 4, including ALNS, is held to it so that no method is allowed to close a courier the others may not. One consequence is used repeatedly in Section 4: capacity alone forces at least couriers, a floor no method can undercut.
Two modelling choices follow dispatch practice rather than the classical PDPTW. Routes are open paths: couriers are dispatched on a rolling horizon and end wherever the last delivery leaves them, which becomes the origin of the next round. Time windows are soft: a batch released at once often admits no schedule meeting every window, and a dispatcher cannot abandon the batch, so violations are priced at a rate rather than forbidden. A consequence we rely on is that no grouping can make a subproblem infeasible: a bad grouping surfaces as cost, which is a signal an improvement step can act on.
Solutions and objective
A solution assigns each request to exactly one courier and gives each courier an open path from its origin through the stops of its requests, subject to pairing (a request’s two stops are served by the same courier), precedence (pickup before delivery), capacity, and time consistency. Writing for the time service begins at stop ,
are the earliness and the tardiness at stop , the amounts by which service begins before the window opens and after it closes. With indicating that courier is dispatched and the travel time of its path,
The fleet term is what makes the dispatched fleet a decision, and we call the dispatch charge, the cost of putting one more courier on the road. Without it an extra courier can only reduce travel and lateness, so every courier is used at optimality and the question does not arise; with it, the model must weigh a courier’s fixed cost against the travel and punctuality it buys. We report both regimes.
Remark 1 (Fairness). With earliness and tardiness priced at the same rate, the earliest feasible schedule is optimal for any fixed sequence. Two deviations are available and neither pays. Delaying service beyond leaves untouched and can only add tardiness, at stop and at every stop after it. Serving before is permitted by (1), and buys a reduction in downstream tardiness, but it does so by converting that tardiness into earliness one unit for one; at a common rate the exchange is exactly neutral. The earliest feasible schedule therefore attains the optimum, though not uniquely, and it is the special schedule at which at every stop. Sequencing therefore reduces to a shortest path over subsets, which is what makes exact routing affordable at the sizes the decomposition produces. Asymmetric pricing breaks this and requires the schedule to be solved as a small linear program.
A consequence worth stating, since it makes one term of (2) inert: under this scheduling rule at every stop, so the earliness term never contributes and every table in Section 4 reports tardiness alone. We keep the term in the objective rather than deleting it because it is what distinguishes this model from one that prices only lateness, and because the moment , the realistic pricing for courier work and the extension Remark 1 points at, the term becomes active and the scheduling rule, not the objective, is what must change.
Problem difficulty and the case for decomposition
The PDPTW contains the VRP and is NP-hard ([31]), but that is not the informative statement. A monolithic formulation carries binaries because it does not know the assignment. Fixing the assignment eliminates that difficulty exactly: the courier index becomes a label on a set of requests, pairing and single-service constraints are enforced by the partition, and the problem separates into independent sequencing problems on stops. Sequencing is not eliminated but shrunk, and because its effort grows steeply in the number of stops, keeping small is what makes exact routing possible. The decomposition’s task is therefore to produce groups that are small, feasible, and chainable, the last of these being the subject of this paper.
Method
Overview
Our proposed method repeats five steps, shown in Figure 1, and every reported cost comes from the exact router. One repetition of the five is a pass, the outer loop’s iteration, and the word is used in that sense throughout. Figure 2 follows one instance through four passes, from the construction to the routed solution.
Figure 1. The proposed method end to end. The dashed region is one outer iteration: steps 1–5 run in order and then repeat, and what our proposed method returns is the cheapest iterate any pass produced, not the last (§ 3.7). Shading marks how a step behaves when cores are added: light steps are the ones whose expensive work decomposes by courier, the dark step is the one integer program that does not decompose at all, because each request must be taken exactly once; the light steps still carry synchronisation points, which § 3.8 sets out. § 4.6 measures what each step costs. Time enters only through step 2: what lateness a courier would actually incur, never how close two requests are in time.
Figure 2. The proposed method running on one instance, drawn from a trace the solver emits rather than reconstructed, so each panel is a state the algorithm actually passed through. Panel (a) is the instance as posed; in it and in every map panel a filled circle is a pickup and an open one a delivery. In (b)–(g) a shaded region encloses each courier’s group together with where that courier starts, and hollow stars mark couriers left idle. Panels titled descent are the state after that iteration’s improvement step; (g) additionally shows the exact routes, whose nodes are the pickups and deliveries the courier visits rather than the group midpoints of the earlier panels. Below each cost are its three terms in the order of (2): travel, lateness, and times the couriers dispatched. The initial construction opens eleven couriers and the first assignment program closes three of them at once, which is the step no published clustering rule performs. Later iterations move a few requests at a time: the fleet is settled early and the remaining gain is in which courier holds what. Panel (h) reads the same history as numbers, with cost on the left axis and the dispatched fleet on the right.
Candidate lists. For each request keep the couriers whose current work is nearest, rebuilt from the current solution.
Marginal costs. For each allowed (request, courier) pair compute , the increase in that courier’s routing cost if it took the request.
Assignment. Solve one integer program that assigns every request to a courier and decides which couriers to open.
Descent. Improve the assignment by relocate and swap moves, screened with a cheap surrogate and decided with an accurate one.
Routing. Route every dispatched courier exactly, and keep the best iterate seen.
The assignment cost
Let be the requests currently on courier and the cost of serving a set of requests on courier : travel plus times lateness, scheduled by the earliest-feasible rule of Remark 1. The assignment cost is the marginal cost
so that members and non-members are priced on the same scale. The two branches are one quantity: writing , adds to a set of requests it does not belong to, both read , since when is not already there. The marginal cost is computed from the current assignment and then held fixed while the assignment problem is solved, which keeps that problem a fixed-cost integer program.
Why not a spatio-temporal distance. The alternative, and the standard choice, is to embed requests in a joint space and group by proximity: a spatial term plus a temporal term such as the squared distance from a request’s time interval to a group’s mean time. Under sequential service this is the wrong object. A courier visits its requests one after another, so two requests whose windows coincide compete for the same courier-minute, and two requests far apart in time are precisely the pair one courier can serve comfortably. Minimising a temporal distance concentrates the competing requests.
The same error can appear in a subtler form. A natural remedy is to charge each pair of requests the courier cannot chain. Writing for the spare time between delivering and collecting , the quantity is how far that order falls short of feasible. A grouping cost has to charge the pair rather than the ordered pair, so the two directions are combined, either as
and requests are then grouped to minimise the total charge inside each group. But a courier chooses the order, so a pair is unchainable only if both orders fall short, which is what charges and does not: charges a pair whenever either order fails, and so charges most for the pairs that chain most easily. On our generated instances correlates +0.95 with the temporal separation , writing for the midpoint of the span over which request must be served. It is, to a good approximation, a measure of how far apart in time two requests are. § 4 reports what each of these choices costs.
The assignment program
With costs fixed, let assign request to courier , open courier , and be the couriers may be assigned to, the candidate list defined after (7):
Constraint (6) is the only one that couples couriers, and it is what makes (5) a single program rather than independent ones. The fleet decision sits in the , priced by , which is what allows our proposed method to trade couriers against travel; no published clustering rule we are aware of can make that trade, because each partitions into a fixed number of groups.
Remark 2 (Fixed charge and integrality). With and dropped, (5) is a transportation problem: the constraint matrix is totally unimodular, the relaxation is integral, and the assignment is obtained by linear programming. The fixed charge destroys that property, which is why the fleet decision is the expensive part of the program and, as § 3.8 shows, the part that resists decomposition.
Candidate lists. A request is rarely served by a courier on the far side of the city, so we keep for each request a set of the nearest couriers. What that distance is measured to matters, because a courier has no fixed location: we take its position to be the mean of the midpoints of the requests currently assigned to it, so a courier counts as near a request when the work it already carries is near that request, not when its starting point happens to be. The lists are therefore rebuilt each outer iteration from the current solution, and the incumbent courier is always kept in so that solution stays feasible. A courier holding nothing has no current work to measure a distance from, so its own origin stands in: without that an empty courier would enter no candidate list, the program could never open it, and the fleet could only shrink. The restriction is a heuristic. When it is vacuous and the program is the dense one, and a distant courier can be the right choice whenever the windows are loose enough to absorb the drive. But it is what makes the program small. It reduces the binaries from to and the marginal-cost evaluations from to , both linear in for fixed .
Surrogates with measured fidelity
The exact router of § 3.6 is far too expensive to call inside the search, because it is not consulted once but continually. The marginal cost of (3) is wanted for every allowed (request, courier) pair each time the candidate lists are rebuilt, and again for every move the descent of § 3.5 weighs: a single solve at asks for about 400,000 times. Answering all of them exactly would turn the 18 s our proposed method takes at that size into hours (§ 4.6). Two cheap surrogates are available, and what matters is not how close their value is but whether they rank two candidate request sets the way the exact router would. Table 2 measures both against the exact router over 120 random request sets.
| ratio | rank corr. | time | |
| stops in time-window order | 2.418 | 0.949 | |
| cheapest insertion in time order | 1.043 | 0.990 | |
| exact label-setting router | 1.000 | 1.000 |
Table 2. Three ways to cost one courier’s request set, over 120 random sets. What a descent needs is the rank, not the value.
Ordering stops by time window ignores geography and zig-zags, overstating cost by a factor of 2.4; cheapest insertion lands within 4.3% of exact at one forty-fourth of the cost. We use the first to screen and the second to decide, and call them the window-order and insertion surrogates from here on.
Assignment descent
Write for the insertion surrogate of § 3.4, with , and let
be the objective of (2) under an assignment , with the exact replaced by . The dispatch charge is carried inside : without it, emptying a courier would look free and the descent could not see the one saving the fleet decision exists to find.
Two move classes are considered. Relocate moves a request to a courier in with room; swap exchanges and when each is a candidate for the other's courier, which is what keeps the number of swap moves linear in rather than quadratic. Both classes are enumerated in full, not sampled: no step of the descent is random. Each move is first scored with the window-order surrogate, the most promising by that score are re-scored with , and the one whose is most negative is applied, provided . A sweep of the move set that produces no such move ends the descent. We use and .
Termination and the absence of cycling both follow from this. Every applied move lowers by more than ; depends on the assignment alone, not on the path taken to it; and the assignments form a finite set. So no assignment can recur, so in particular the descent cannot oscillate between two solutions, and it halts after finitely many moves. The margin is what rules out an endless sequence of improvements too small to accumulate in floating point. Note what is not claimed: the fixed point is one of , not of the exact objective, and it is a local minimum with respect to these two move classes only.
Routing the induced subproblem, exactly
Once the assignment is fixed, each dispatched courier faces a routing problem of its own, and those problems share nothing: no variable, no constraint, and no decision. This subsection states that subproblem, gives the algorithm that solves it, and shows the algorithm is exact.
The subproblem. Fix a courier and let be the requests assigned to it. Define
where is the courier’s origin and an artificial terminal with for all and no outgoing arcs. A route is a Hamiltonian path on from to : an order with , and every stop of appearing once. Because the closing arc to is costless the courier is never charged for returning anywhere, which is what makes the route open.
An order fixes the schedule. Writing for the time service begins at stop , as in § 2, the earliest-feasible rule of Remark 1 gives
with $S_{o_k} = 0. The subproblem is then to choose the order:
and a non-empty contributes a further . Only tardiness appears because (10) leaves at every stop, by Remark 1; pairing, single service and capacity are not constraints here but properties of , which the assignment has already settled.
Three difficulties the assignment removes are worth naming, because they are what make this subproblem small. There is no courier index: variables are indexed by arc and node only, so the -fold replication of timing and load variables disappears. The coupling constraints vanish: pairing, single service and same-courier assignment are enforced by the partition rather than by constraints, and only precedence survives, as a two-variable relation. And the subproblems are independent, so they may be solved in any order or concurrently.
Earliest service times. Soft windows leave the subproblem with no arcs to eliminate, because nothing in (10) confines to : a late service is charged, not forbidden, so the window endpoints are not themselves bounds on and no arc is rendered infeasible by lateness. What does bound is the earliest the courier could arrive, giving
since a pickup cannot be served before the courier can reach it, and a delivery not before its own pickup has been served and traversed. They enter the search directly, as the arrival times from which (13) extends.
Label setting. We do not solve the subproblem as a mixed-integer program, and Remark 1 is the reason. For a fixed order of the stops the optimal service times are not a further decision but a formula, : waiting never pays when earliness and tardiness cost the same. Choosing when to serve therefore drops out of the subproblem and only the order remains, leaving a pure sequencing problem with no continuous variables for a mixed-integer program to carry.
The same fact is what allows a label, defined next, to be a pair of numbers rather than a function. Under asymmetric pricing the best completion of a partial route would depend on the whole trade-off between arriving early and arriving late, so a label would have to carry cost as a function of arrival time; the dominance argument of Proposition 1 compares two scalars and would not survive that change.
A state is a pair : is the set of stops already served and is the one served last. A label on that state is a pair , where is the time service begins at and is the cost accumulated so far, travel plus times the lateness incurred at the stops of . The search starts from the single label on and extends one stop at a time. Extending a label at to a stop gives
which is (8) applied one stop further on, accumulating the two sums of (9) as it goes: is the service time the order would give , and the bracket is the tardiness that order would pay there. A label is therefore a partial route priced exactly as (9) prices a whole one. The extension is allowed only when is reachable: a delivery requires . Capacity needs no check, since holds for the whole set of requests by construction. A route is complete when , and the answer is the least among the labels there, the closing arc to being free.
What keeps this affordable is dominance. Two labels on the same state are comparable, and dominates when and ; the dominated one is discarded. Both components are needed. Keeping only the cheapest label would be wrong, because a cheaper label may arrive later and pay for that lateness at every stop still to come; keeping only the earliest would be wrong for the mirror reason. What survives on each state is its Pareto set. Dominance is also the only step that discards anything, so whether the router is exact turns on it alone.
Proposition 1 (The router is exact). Label setting with the extension (11) and the dominance rule above returns a minimiser of (9).
Proof. Fix a state and let be the least total cost of completing a route from it, given arrival with cost at time . By (11) every later cost is non-decreasing in the incoming and every later service time is non-decreasing in the incoming , and lateness is non-decreasing in its argument; so is non-decreasing in both and . Hence, dominates , every completion available to the second is available to the first at no greater cost, and discarding the dominated label removes no optimal route. Since every route from through corresponds to exactly one sequence of extensions, and no extension that could lie on an optimal route is pruned (precedence excludes only orderings that violate before , which no feasible route uses, and dominance is the only other step that discards anything), the surviving label of least cost at is optimal. Termination is immediate: grows by one stop at every extension. □
Nothing in this argument depends on how many requests the courier holds: label setting is exact at any . What grows with is the running time. A state is a visited set and a last stop, so there are of them, and on random demand request sets the router takes 5.6 ms at , 0.74 s at 8 and 18 s at 10, four to five times longer for each request added.
Our implementation therefore runs the exact router up to eight requests and falls back to cheapest insertion improved by or-opt and 2-opt beyond it. That fallback never fires in this paper, because capacity bounds the requests a courier holds before the limit does: throughout Section 4, so the largest set ever routed is five requests, and no reported number uses a heuristic route. This is what the decomposition buys. It does not make routing easy; it keeps in the range where an exact router is affordable at all.
Proposition 2 (Validity of the decomposition). Let partition with for every , and let be a feasible route for each . Then is feasible for the problem of Section 2, and its objective (2) equals the sum of the subproblem costs plus times the number of non-empty parts. Consequently , where is the optimal value of subproblem and the global optimum.
Proof. Pairing and precedence hold because contains whole requests, so and lie in the same subproblem and the route orders them. Capacity and timing are subproblem constraints. Each request lies in exactly one , so each is served once. The objective is a sum over couriers of travel, a sum over stops of penalties, and a sum over couriers of fixed cost; all three decompose along the partition, the last because is determined by whether is empty. Since the partition is one feasible choice among many, the assembled cost is an upper bound on the global optimum. □
Guarantees and their limits
Two of the five steps terminate provably. The descent of § 3.5 strictly decreases of (8) over a finite set of assignments, so it halts at a local minimum of with respect to relocate and swap; and the assignment program (5) is solved to proven optimality for the costs it is given.
The outer loop has no such guarantee. Each pass recomputes from the current assignment, so successive passes minimise different linear objectives. In other words, there is no single quantity the iteration descends, and the true cost may rise from one pass to the next. What our proposed method relies on instead is bookkeeping. Every pass ends by routing its assignment with the exact router of § 3.6, and the loop returns the cheapest assignment it has seen rather than the one the last pass happened to produce. Running further passes can therefore never worsen the answer, whatever the passes themselves do.
Why has to be recomputed at every pass is worth making precise, since the same argument explains why is kept small for a reason beyond tractability. Write for the exact cost of serving a set of requests on courier . If were modular, that is , then wherever it was measured, the objective (5) would equal the true cost, and one pass would solve the assignment exactly. Routing is not modular: two requests placed together interact. Write
for the interaction of requests and against a base set of requests . By Proposition 2 the objective (2) is plus times the couriers opened, and the program’s objective (5) replaces each by while pricing the fleet term exactly, since that term depends only on which couriers are non-empty. The whole discrepancy therefore sits in the per-courier terms. Under modularity the two terms (12) adds and the two it subtracts come to the same number, both being , so is identically zero; and identically zero in turn forces to be modular. The interaction is therefore an exact measure of the additivity that (5) assumes and routing does not have.
Recomputing at the start of every pass is what stops that error compounding. The marginal costs are fixed for the length of a pass, while the assignment program and the descent move requests between couriers: measured on the instances of § 4.1, about a quarter of all requests change courier within a single pass. By the end of one, many marginals therefore describe workloads their couriers no longer hold, and the interaction of (12) is what that drift costs. Measuring again at the assignment the pass actually reached throws those stale marginals away instead of carrying them into the next pass, so the error the program works under is the error of one pass rather than of every pass so far. Whatever error survives both, it does not reach the costs this paper reports. Every iterate is routed exactly by the label setting of § 3.6, and the solution returned is the cheapest of those exactly routed iterates, so each reported cost is the true cost of the solution it describes, whatever the surrogate said while that solution was being built. The surrogate can therefore steer the program to a worse assignment than exact marginals would have chosen; it cannot make the cost reported for the assignment that is returned look any better than that assignment really is.
Parallel structure, and the cost of the coupled step
Four of the five steps do their expensive work per courier: the candidate lists, the marginal costs of (3), the screening and scoring evaluations of the descent, and the exact routing of § 3.6. What parallelises is that evaluation, not the step around it. Building needs every courier’s position broadcast before the per-request lists can form; a relocate or swap changes two couriers, so its assembles from two local evaluations; and the descent applies the best move of a sweep, a reduction over all of them. Between those synchronisation points the per-courier evaluations run independently; the sweep as a whole does not. Only the exact routing is independent end to end, since the partition is fixed before it starts and the subproblems share nothing. The assignment program (5) does not decompose at all, because the covering constraint (5b) ties the couriers into one program. § 4.6 reports the measured split.
What follows asks what it would take to remove that one exception, and what removing it costs. The way to remove it is to charge for the covering constraint rather than impose it. Write for the requests whose candidate list contains courier , the index set of (5c), and for the assignment variables of courier alone. Attaching a multiplier to each covering constraint (5b) gives
where is minimised subject to constraint (5c) for courier and integrality, and to nothing else. Two properties of (13) carry the parallel step and are worth stating exactly: the share no variable, and each is evaluated by a selection rather than by a solver.
Proposition 3 (The priced assignment separates). Fix multipliers and write for reduced costs. Then of (13) is the optimal value of (5) with the covering constraint (5b) deleted from the feasible set and priced in the objective instead. In particular is at most the optimal value of (5), for every . No variable appears in both and for . Finally, let be the requests courier would gain by taking, and let consist of the members of of smallest reduced cost, ties broken arbitrarily, so that when . Writing , with for an empty sum, : when the minimiser is with the indicator vector of , and otherwise it is , .
Proof. The dual function. Constraint (5b) is an equality, so its multiplier is free in sign. Adding to (5a) and collecting the terms that carry a variable,
since each is charged once and credited once. Minimising over the constraints that remain, which are (5c) and integrality, and taking the constant outside the minimisation gives (13). Any feasible for (5) satisfies (5b), so the added term vanishes at it and its objective value is unchanged, while the minimisation also ranges over points that violate (5b); hence is at most the optimal value of (5).
Separability. The surviving constraints are constraint (5c), one instance of it per courier, together with integrality; the variables appearing in courier ’s instance appear in no other courier’s. The feasible set is therefore the product with . Exchanging the order of summation, , both sides running over the same pairs, so the objective is a sum whose th term depends on the th factor alone. A minimum of such a sum over a product set is the sum of the minima of its terms, which is .
Each courier’s minimum. Fix . If then (5c) forces , at an objective value of . If the objective is , and the inner minimum is attained at . Removing from a request with does not increase the sum and cannot violate capacity, so an optimal may be taken inside ; if and satisfy then exchanging them strictly decreases the sum, so the requests held are those of smallest reduced cost in ; and whenever and some member of is left, adding it decreases the sum further. The selection therefore stops only on running out of capacity or out of , whichever comes first, which is . Comparing the two cases for gives , with the minimiser as stated.
A courier therefore needs nothing from any other courier: its own reduced costs, its own capacity and settle both what it claims and whether it opens, and they settle it by a selection among numbers rather than by a call to a solver. That is what a machine with one core per courier would run in parallel.
What this does not do is enforce (5b): two couriers may claim the same request and none may claim another, so the claims that come with the bound of Proposition 3 are not an assignment. Prices are updated by the subgradient step , which lowers when more than one courier claimed and raises it when none did. A courier sees only through the reduced cost , so a contested request becomes less attractive to all of them and an unclaimed one more attractive, and a repair step turns the claims into a feasible assignment.
Because (5) is an integer program, is a lower bound that need not be tight, and a duality gap may persist even at the best multipliers. § 4.9 reports not that gap but the solution loss: what the priced step and its repair cost against the exact program on the same instance. That is the quantity a practitioner pays. The bound itself we do not report, because the proposed method solves the assignment exactly and never forms . The loss is concentrated in the fixed charge: the multipliers coordinate which courier takes a request well, and whether a courier opens at all badly. We therefore use the exact assignment in the proposed method and report the Lagrangian variant as the option to take when the assignment must itself be distributed.
Experiments
Experimental setup
Instances. Instances are generated from a rule that makes the fleet decision non-trivial by construction. Given the fleet size , a reduction factor (the share of the fleet a good solution is expected to dispatch) and (requests per dispatched courier),
which forces couriers at minimum and permits all , so how many are dispatched is left to . We use and throughout, which fixes and leaves the fleet free between and . The main comparison uses the three sizes this rule gives at , and , namely , and ; at , for instance, a solution may dispatch anywhere between 8 and 12 couriers. Two alignment settings and three random seeds at each size give 18 instances.
Within that frame an instance is drawn as follows. Four spatial hubs are placed uniformly in a square of side 100, and each request is assigned a hub; its pickup is Gaussian about the hub with standard deviation 5, and its delivery Gaussian about its own pickup with the same spread, so a request is local to its hub. Travel times are Euclidean distances at unit speed, so a distance and a duration are the same number. The horizon, from time zero to the last delivery deadline, is divided into bands separated by a fixed gap. Each request’s band is copied from its spatial hub with probability , and drawn independently of it otherwise: makes spatial neighbours temporal neighbours, makes the two structures unrelated, and the realised misalignment is measured rather than assumed. Misalignment is one minus the agreement between two four-way Ward partitions of the requests, one on their spatial midpoints and one on the midpoints of their intervals, maximised over the ways of matching their parts: 0 means the spatial and temporal groupings coincide, and a value near 1 means they are unrelated. Pickup windows are 45 wide and a request’s delivery window has the same width shifted 35 later, so the request interval, the span from a request’s earliest pickup to its latest delivery, is 45 + 35 = 80 time units for every request. Service takes 8 at each stop. Couriers start at perturbed hub positions and become available at staggered times over the first 5% of the horizon. We report . Figure 3 shows one instance at each of those two settings, with three solutions drawn side by side on both: capacitated -means as published, the same rule carrying our descent, and the proposed method. Four of the settings fixed here are swept one at a time in the subsections that follow, and Figure 4 collects those sweeps in one place: the dispatch charge in panel (a), the alignment of space and time in (b), the weight on a temporal coordinate in (c), and the penalty rate in (d).
Figure 3. Both regimes on the same axes, requests, couriers available, , . Rows 1–2 are an aligned instance (misalignment 0.12: requests that are close in space are also close in time); rows 3–4 a misaligned one (misalignment 0.60). Within each pair, the map row shows the instance as posed, with filled circles for pickups, open circles for deliveries and stars for the twelve couriers available; then the routes found by capacitated -means as published, labelled rule, by the same rule carrying our descent, and by the proposed method; the row beneath shows every request’s window, then the windows of each dispatched courier’s own requests; the horizontal axis of every panel in those rows is time, labelled once at the foot of the figure. A | marks when the exact route serves a stop, × a late one. Below each map panel’s cost are its three terms in the order of (2): travel, lateness, and times the couriers dispatched. Cost falls 1977 → 1612 → 1357 when aligned and 2107 → 1785 → 1451 when misaligned: travel, tardiness and fleet all improve in both. The published rule dispatches all twelve couriers in either regime because it has no mechanism to do otherwise, while the proposed method dispatches eight, which is why eight rows of the timeline are occupied rather than twelve. Each instance shown is the median of five seeds, not the best.
Figure 4. The four parameter sweeps. In every panel the lines are cost differences against the baselines on the left axis, negative favouring the proposed method, and the bars on the right axis carry the quantity that explains the trend. (a) the dispatch charge, with the fleet we open; (b) the alignment axis, with the tardiness spatio-temporal -means pays for its time coordinate relative to plain -means; (c) the temporal weight of § 4.1, with tardiness as a multiple of the same rule at ; (d) the penalty rate , with the tardiness of both methods. Instances are , , , with and except on the axis being swept.
What this design does and does not cover. Holding the window width and the delivery shift constant is what isolates the alignment axis, but it also makes the temporal scale uniform: every instance has the same request interval, and the fraction of request pairs whose intervals overlap sits near 0.25. Because each delivery is drawn about its own pickup, the locality of these instances, the fraction of requests whose pickup and delivery lie within 10 of each other, is high; § 4.7 lowers it deliberately by sending deliveries to a different hub. The courier-time ratio is times the span from the earliest window opening or courier ready
time to the last deadline, divided by the total service time at all stops plus times the median distance between two stops of the instance. Below 1 the fleet has less time than the work is estimated to need, so no grouping of the requests can be punctual and the instance measures which method pays the smallest forced penalty. Adapted Li & Lim batches at the same , and differ in all three respects: mean interval 465 against our 80, overlap 0.77 against 0.25, and courier-time ratios from 0.57 to 3.95 against our 1.6–1.8. They also occupy only the misaligned end of the axis, with measured misalignment 0.55–0.68 against our 0.00–0.70. § 4.7 therefore repeats the comparison on them.
Adapting the benchmark batches. The Li & Lim benchmark is specified for the classical PDPTW, which sends every vehicle out from one depot and back to it, treats time windows as hard, and measures demand by weight. § 2 assumes none of those three, so each instance is converted before use, as follows. A dispatch batch of requests is sampled from the requests released inside one window of the benchmark day, since a batch drawn across a whole day is one no fleet can serve. The benchmark’s demands are discarded and every request counts as one unit against . Routes are open and windows are soft. Couriers start at perturbed depot positions and become ready at staggered times, as in the generated instances. The lc1 family is excluded: its service times exceed its window widths, so no multi-stop route can be punctual and every method is dominated by forced lateness. The fleet, capacity and request count are set to the same design point, , , , so the two tables may be read against each other.
Baselines. We compare the proposed method against six clustering rules from the literature, the groupings a cluster-first dispatcher would otherwise use. They are SWEEP (Gillett and Miller, [23]), FISHER (Fisher and Jaikumar, [20]), -means (Lloyd, [36]) on request midpoints, spatio-temporal -means, which is the same algorithm on a third coordinate alongside the midpoint, where is the temporal midpoint of § 3.2, and are the spatial and temporal spreads of the instance, and the dimensionless temporal weight sets how far the time axis is stretched relative to the spatial ones, so that recovers plain -means and gives time the same spread as space, capacitated -means, which assigns requests to centroids by the transportation problem of Bradley et al. [10] with an upper bound of requests per cluster in place of their lower bound, and Ward agglomerative clustering (Ward, [67]). Two values are reported for each method and they answer different questions. As published measures our proposed method against what the literature proposes. Strengthened attaches our descent of § 3.5 to the rule’s own grouping, so that both sides improve their assignment with the same step. That also gives the rule a response to , which no bare rule has, since the descent minimises the objective and the objective contains . This second comparison therefore answers two questions: how much a generic local search recovers for an existing rule, and, with the improvement step now common to both sides, how much is gained by grouping on the marginal cost of (3) rather than on the geometric criteria these rules use. All six rules are routed with the exact router of § 3.6, the one our own method uses, so none of the difference between them and us comes from route quality.
ALNS. We also compare against an adaptive large neighbourhood search (Ropke and Pisinger, [54]), which produced many of the best known solutions for the standard PDPTW benchmarks and remains the usual reference point for the problem. It is not a cluster-first method and forms no groups at all, which makes it the opposite kind of algorithm to the six above and to ours. It holds a complete solution, and each iteration removes part of that solution and reinserts the removed requests wherever they fit best, so which courier serves a request and where in that courier’s sequence it falls are settled together and revised continually, never fixed in stages. The rules deciding what to remove and where to put it back are the standard ones and we changed none of them. All are in play: removal at random, by the saving it yields, and by relatedness between requests in the sense of Shaw [57]; reinsertion at the cheapest position and by regret (Ropke and Pisinger, [54]). What the search adapts is the choice among them: a roulette wheel reweights them towards those that have recently improved the solution, and a simulated-annealing rule decides whether an iteration’s result is kept.
Every one of those rules works over the whole solution, and that is what makes ALNS a centralized method. We use that word literally rather than as a label: a removal rule ranks every request in the instance against the objective of the whole current solution, and reinsertion tries every position in every route, so no step of it can be carried out knowing one courier’s requests alone. That is the property the decomposition gives up, and § 3.8 states how much of ours retains it: the expensive work of four of the five steps is computed from one courier’s data, and only the assignment program (5) is irreducibly joint. We therefore include ALNS as a reference point rather than a competitor, and hold it to the same conditions. Its budget is the wall-clock our proposed method used on that instance, subject to a floor of ten seconds so that the smallest instances are not searched for a second and then stopped. The floor binds wherever we finish in under ten seconds, which is every instance at , where we take about one second and ALNS is therefore given ten; the comparison favours ALNS by that much and we report it as run. The budget can only be tested between iterations, so the search finishes the ruin-and-recreate pass it is in when the budget expires, which at these sizes costs a fraction of a second and at the sizes of § 4.6 costs a great deal more. ALNS obeys the total-count capacity of § 2.1, and, being stochastic, is run three times with the median reported. It is also the one method that sequences for itself, so its routes are its own rather than our router’s; every solution it returns is re-costed under the earliest-feasible schedule of Remark 1, so that the objective compared is the same one.
Protocol. All comparisons are paired on identical instances and reported with counts and a Wilcoxon signed-rank -value. Travel, tardiness and the courier count are reported separately as well as in the objective (2), since a method can win on one and lose on another. Our proposed method is run once on each instance. Its only use of a random number is a perturbation of at most that breaks ties when the construction orders requests by release time, and no two release times in these instances are that close, so a restart from a different seed returns the same answer. ALNS is stochastic and is run three times with the median reported: restarted five times on twelve instances it spread 11.5% in cost on average, so a single run of it would not measure what it can do. Machine: Intel i7-12800H, Python 3.12, HiGHS via SciPy.
Comparison with published clustering rules
Table 3 reports every method on 18 instances across 3 problem sizes, at , two alignment levels and three seeds each. Its cost columns are means over the 18 instances, and its vs. ours columns are paired on the per-instance differences instead, since the instances differ in difficulty by more than the methods differ from one another.
| method | travel | tard. | cour. | cost | vs. ours | travel | tard. | cour. | cost | vs. ours |
| sweep | 2163 | 833 | 22.7 | 5263 | −29.3% | 1932 | 35 | 22.7 | 4234 | −13.3% |
| fisher | 2487 | 578 | 34.0 | 6464 | −42.6% | 1692 | 12 | 26.6 | 4359 | −16.1% |
| -means | 2174 | 410 | 34.0 | 5984 | −38.8% | 1876 | 18 | 28.1 | 4700 | −21.6% |
| spatio-temporal -means | 2217 | 800 | 34.0 | 6417 | −43.0% | 1932 | 31 | 28.6 | 4819 | −22.7% |
| capacitated -means | 2284 | 449 | 34.0 | 6133 | −40.0% | 1922 | 12 | 28.4 | 4773 | −22.5% |
| Ward agglomerative | 2176 | 326 | 34.0 | 5902 | −36.8% | 1822 | 40 | 28.2 | 4684 | −19.5% |
| best of six | 2149 | 809 | 22.9 | 5247 | −28.8% | 1779 | 18 | 23.9 | 4186 | −12.1% |
| this paper | 1206 | 105 | 23.2 | 3628 | — | |||||
| ALNS | 2040 | 92 | 23.1 | 4438 | −14.2% |
Table 3. requests, couriers, , , . Cost and its components, means over all instances. As published uses the rule in its original form; + descent adds the improvement step of § 3.5. vs. ours is the mean paired percentage cost difference against the proposed method, negative favouring it; each is a Wilcoxon signed-rank test over the same instances, and every one of them has . Best of six takes the cheapest rule on each instance separately, so it is a stricter baseline than any single row. The proposed method and ALNS have no as published form, so they appear once. Cost is travel + tardiness + couriers.
The vs. ours columns of Table 3 pair the proposed method against each of the six rules separately and against the best of them. The comparison we lead with is the last, and it is the strictest: on each instance the baseline is whichever of the six is cheapest on that instance, so the margin against it is necessarily smaller than the margin against any rule taken alone, as the spread of those rows shows. Against that baseline our proposed method is 29% cheaper with the six as published, winning 18 of 18 instances. Giving the six our own descent narrows that to 12.1% (, still 18/18). The two figures measure differences. The 16.7 points between them are what a generic improvement step recovers for an existing rule. The 12.1% that survives it is the contribution of grouping on the marginal cost of (3), measured with the improvement step common to both sides, and it is the figure the rest of this section builds on.
The cost difference behind that 12.1% is the sum of three terms of the objective (2) that move in different directions. Pooled over the 18 instances and measured in the units of that objective, our proposed method saves 573 in travel, gives up 87 in tardiness and opens 0.72 fewer couriers on average, worth 72 at ; the three account exactly for the 558 it saves in cost. The advantage is therefore a large reduction in travel bought with a small concession in lateness, and not a uniform improvement across the objective. The margin also grows with instance size, and Table 4 gives it by size against both baselines. Against the six strengthened rules it is −8.9% at , −13.1% at , −14.4% at .
| travel | cour. | cost | travel | cour. | cost | |
| \multicolumn{3}{c | }{vs. best of six + descent} | \multicolumn{3}{c}{vs. ALNS} | ||||
| 40 | −9.3% | −8.9% | −8.9% | −3.6% | −3.7% | −4.1% |
| 100 | −32.9% | +1.1% | −13.1% | −37.4% | +0.9% | −17.6% |
| 200 | −36.4% | −3.0% | −14.4% | −47.1% | +1.3% | −20.8% |
Table 4. requests, couriers, , , . Paired differences by problem size, on the instances of Table 3. Each entry is the mean of the per-instance percentage differences at that size, negative favouring the proposed method. Best of six is the cheapest of the six rules carrying our descent on that instance. Six instances at each size, two alignment levels by three seeds. A tardiness column is omitted because both baselines are close to punctual here, so a ratio against their tardiness is set by the instances where it is almost zero rather than by the difference; the pooled difference in the units of the objective is given in the text.
The grouping cost examined
Non-additivity of the routing cost. § 3.7 identifies the pairwise interaction of as the exact measure of the additivity that the assignment program assumes and routing does not have. This subsection measures it. We sampled 12,000 second differences with the exact router, in which is a set of requests a courier already holds and are two further requests it might be given. Table 5 reports them by , which runs from 0 to : all of has to fit one courier, so a base set of 4 leaves no room for a pair.
| samples | zero | median | 95th pct. | |
| 0 | 3,054 | 0% | 0.538 | 0.655 |
| 1 | 3,068 | 27% | 0.201 | 0.462 |
| 2 | 2,944 | 39% | 0.074 | 0.344 |
| 3 | 2,934 | 45% | 0.024 | 0.261 |
Table 5. requests, couriers, , , . The interaction of (14), computed with the exact router on sampled triples and grouped by , the number of requests the courier already holds. is zero for every , and exactly when a courier’s routing cost is additive across its requests, which is what the assignment program assumes. Zero is the fraction of samples whose vanishes exactly; median and 95th pct. give relative to the marginal it perturbs.
The routing cost is not additive across requests, and the table says by how much. The typical departure from additivity is small, median 7.3 time units against a mean of 171 for serving one of these sets, and its sign is close to balanced, 35% negative against 38% positive, so the errors a courier accumulates over its requests partly cancel rather than compound. The mean relative interaction is −0.9%. In 27% of samples it vanishes exactly, which happens when the two requests never compete for a position in the route: each is inserted where the other leaves the schedule untouched, so what one adds does not depend on whether the other is there. The worst case is different: the largest interaction sampled is 307 time units, so § 3.7 claims nothing about how accurately any one courier’s requests are costed.
Where the interaction is measured matters more than its average size, and that settles a design choice we had made on intuition. It falls sharply with the size of the set the marginal is measured in: at no sample vanishes and the median interaction is 0.54 of the marginal it perturbs, while at nearly half vanish and the median is 0.024, a factor of 23 apart. A marginal measured against a courier’s current workload is therefore far more accurate than one measured against an empty courier. That is what (3) does, and it is also why the outer loop recomputes at every pass: the set of requests a courier holds changes from one pass to the next, and a marginal measured against requests the courier no longer holds is measured in the wrong place.
Temporal criteria in the grouping cost. In Section 3.2 we argued that a temporal coordinate is the wrong thing to group by, because it draws together the requests that compete for a courier rather than those it can serve in turn. That claim can be tested without reference to our proposed method at all, because two of the six rules differ in exactly one respect: -means groups requests by their position, and spatio-temporal -means adds a scaled time coordinate to the same algorithm. If grouping requests that fall due together helped, the second would be the better of the two. It is not, and where it fails is exactly where the argument predicts, as Table 6 shows.
| instances | tardiness k-m. | tardiness s.-t. | cost k-m. | cost s.-t. | |
| aligned | 575 | 743 | 0.164 | 6038 | 6251 |
| misaligned | 245 | 857 | 0.004 | 5930 | 6583 |
Table 6. requests, couriers, , , . -means grouping with and without a time coordinate, paired on identical instances. -m. is -means on request midpoints; s.-t. is spatio-temporal -means, the same algorithm carrying the extra time coordinate of Section 4.1 at temporal weight , so the two differ in that coordinate alone. Misaligned instances are those where spatial and temporal structure disagree, so the time coordinate carries information the spatial one does not.
On instances where space and time disagree, adding the time coordinate multiplies tardiness by 3.5 () and raises total cost by 11.4% (). On instances where the two agree the effect is not significant (), which is what one would expect: there the time coordinate merely repeats what the spatial one already says, so it can do little harm and no good. The published remedy for time windows in a clustering rule therefore makes the rule worse precisely when it is supposed to help, and the reason is the one given in Section 3.2: a courier serves its group in sequence, so requests that fall due together contend for it.
The time coordinate carries a weight, so the natural objection is that the weight was set badly. Figure 4(c) sweeps the temporal weight of Section 4.1 over 8 values. No setting helps by more than noise. The best of them in the rule’s published form is the smallest weight tried, , at −1.0% against on 7 of 12 instances (). From upward every weight is significantly worse, and the cost climbs to +18% at with tardiness climbing alongside it, from 286 to 871. Carried by our descent the same rule is flat to within 4%, which is the descent repairing the grouping rather than the weight becoming useful.
That was the crude way of putting time into a grouping cost. The sophisticated one concedes what Section 3.2 argues, that minimising a temporal distance groups the requests that compete for a courier, and introduces time another way: it charges each pair of requests the courier cannot chain, by or of (4). That is the criterion most likely to be proposed in place of the marginal cost, so it is the one worth measuring. Like the marginal cost of (3), this is a grouping cost, and it is used in its place, so the comparison is between two answers to the same question. It is built and measured exactly as the six published rules are, on the same 12 instances.
The chaining slack of Section 3.2 is directional. is the spare time left if the courier serves and then , and is a value computed in the other direction. A grouping cost charges a pair rather than an ordered pair, so the two directions have to be combined into one, and there are two ways to do it. Summing them charges a pair when either order fails; taking their minimum charges it only when both do. The second is the correct reading, since the courier chooses the best order, and both are measured below.
The two symmetrisations are not variants of one quantity, and correlating each against the temporal separation of Section 3.2 shows why. Taken over all pairs of requests in these instances, of (4) correlates +0.95 with separation: it is, to a good approximation, a measure of how far apart in time two requests are, so minimising it groups requests that fall due together, which is what Section 3.2 argues against. correlates −0.74, of the opposite sign, scoring requests far apart in time as the compatible ones. The correction does what it claims. Table 7 reports what each symmetrisation costs.
| grouping | cost | travel | tard. | cour. | cost | vs. ours |
| slack, sum | 2221 | 1387 | 15.2 | 5133 | +114.8% | |
| slack, min | 2218 | 1673 | 16.7 | 5558 | +134.3% | |
| slack, sum + desc. | 1291 | 11 | 14.7 | 2768 | +17.2% | |
| slack, min + desc. | 1245 | 6 | 15.2 | 2776 | +16.5% | |
| best published + desc. | 1184 | 13 | 14.7 | 2664 | +12.6% | |
| marginal cost (ours) | 873 | 42 | 14.3 | 2349 | — |
Table 7. , 100 requests, , 30 couriers, , , . Grouping by pairwise chaining slack, in both symmetrisations, against the marginal cost. Sum charges both orders of a pair, min only the better one. Each is reported as published and with our descent, and all are routed by the same exact router.
Nonetheless, correcting the symmetrisation does not rescue the criterion. As published the minimum is if anything the worse of the two (+134.3% against ours, versus +114.8% for the sum), and once both are given our descent they are statistically indistinguishable from each other (−0.5%, ) and both remain worse than the marginal cost by +17.2% and +16.5% (). They are also worse than the best published rule carrying the same descent, so neither reaches the rules the idea was meant to improve on.
The components say where the difference sits, and it is not punctuality. Carrying our descent, the slack rules are the more punctual of the two, with tardiness 6 and 11 against our 42, but they travel 1245 and 1291 against our 873 and open more couriers. At that trade runs about ten to one against them: the better of the two saves 36 units of lateness and pays 372 units of extra distance for it. Section 4.4 shows the same trade against the published rules, across a twentyfold range in .
Getting the sign right is therefore not enough, and that is a separate point from the correlation. A charge on pairs asks whether two requests can follow one another; what a courier is actually charged is the cost of a path through all of them, and no sum over pairs recovers it, because what a pair costs depends on what else the courier is carrying and where the path has reached. The failure is not in how the two directions were combined, which the minimum repairs, but in charging pairs at all. That is the quantity (3) evaluates directly.
In the proposed method time does not enter the grouping cost directly, as it does in both criteria above. It enters through the marginal cost of (3), which prices a request by the lateness the courier would actually incur on the route it would then take, at the rate the objective sets. Our proposed method therefore spends on punctuality exactly what the objective says it is worth. That is why it is the less punctual of the two here and still the cheaper, and why the same mechanism reverses when lateness is priced higher: § 4.4 follows it across a twentyfold range in . A criterion with no in it cannot make that trade in either direction.
Sensitivity to instance conditions
Spatio-temporal misalignment. The comparison so far uses the two ends of the alignment axis, and . Misalignment is measured on each instance rather than set by , so intermediate values place instances along the axis and the margin can be read as a function of it. Figure 4(b) sweeps over 5 levels with 8 seeds each.
The margin over the strengthened rules grows monotonically with realised misalignment: the Spearman rank correlation between the two is −0.90 (), negative because a wider margin is a more negative cost difference. Our proposed method is cheaper on every instance at every level ( at each). The bars on the right axis of the same panel show the effect without reference to our proposed method, since they compare only the two baselines: the tardiness spatio-temporal -means pays for its time coordinate, relative to plain -means, falls from 3.8× at the misaligned end to 1.2× where space and time agree. That ordering is what § 3.2 predicts. Where the time axis repeats what the spatial one already says, adding it costs little; where it carries information the spatial axis does not, minimising distance along it concentrates the requests that compete for a courier.
One value from this sweep is used later. The adapted Li & Lim batches sit at a realised misalignment of 0.61, beside our setting at the hard end of the axis, so the smaller margin § 4.7 reports on them is not explained by their being temporally easy.
The penalty rate. In § 3.2 we argued that a courier visits its requests one after another, so two requests whose windows coincide compete for the same courier-minute, and that grouping by temporal proximity therefore collects exactly those competing pairs onto one courier. Grouping on the marginal cost of (3) instead of on temporal proximity might therefore be expected to buy punctuality. However, what it buys is distance: travel falls and lateness does not. One explanation would be that makes lateness too cheap to be worth buying, in which case pricing it higher should close the gap, so we swept over a twentyfold range. It enters every part of the method: the exact router sequences with it, the marginal costs of (3) are computed with it, and the descent decides with it. Table 8 reports the sweep, and Figure 4(d) plots it beside the tardiness of both methods.
| tardiness ours | tardiness base | travel ours | travel base | cost | ||
| 0.5 | 65.66 | 29.41 | 564 | 696 | −11.1% | 0.008 |
| 1 | 14.34 | 7.45 | 606 | 694 | −9.1% | 0.008 |
| 2 | 4.46 | 2.82 | 645 | 739 | −8.7% | 0.008 |
| 5 | 0.90 | 0.18 | 637 | 740 | −9.3% | 0.008 |
| 10 | 0.73 | 0.03 | 644 | 720 | −8.2% | 0.008 |
Table 8. requests, couriers, , , . Sweeping the penalty rate , which prices earliness and tardiness alike in (2). Base is the best of the six rules carrying our descent on each instance. Tardiness is a mean over the instances, so a small value is an average of instances that are exactly punctual and one or two that are not, rather than a small lateness everywhere. The proposed method responds to as it should, and its advantage stays travel at every .
As rises from 0.5 to 10, the mean tardiness of our proposed method falls from 65.7 to 0.7 and its mean travel rises from 564 to 644. The comparison with the baselines does not move with it. At every our solutions are the later of the two, by roughly a factor of two while lateness is still material and by less than a unit once has driven both near zero, and at every our travel is lower, by 76 to 132 units. The cost advantage is flat across the range, −11.1% at and −8.2% at , on every instance at every . That total is the sum of two terms moving in opposite directions and by very different amounts: measured in the units of the objective (2), the travel our proposed method saves outweighs the lateness it gives up for that saving by a factor of 7 to 29 across the sweep. The cost is therefore lower than every one of the six strengthened rules at every penalty rate, and the gain is a large saving in travel bought with a small concession in tardiness.
Chainability and compactness are the same property. A group whose requests chain is one whose courier can leave each request and reach the next without a long empty run, which is a group with short travel between its stops, and the marginal cost of (3) selects for it directly. Punctuality is available to either method once makes it worth buying, both driving lateness towards zero by ; what differs is the distance each pays to get there. The contribution is therefore the grouping criterion and its effect on cost, and not an improvement in punctuality.
The dispatch charge and the fleet
Behaviour without a dispatch charge. Everything above prices a dispatched courier at . Setting removes the fleet decision from the objective: any number of couriers may be opened at no charge, and the problem reduces to minimising travel plus lateness. Since the dispatch charge is what no published clustering rule can respond to, this is the setting in which our advantage over them should be most at risk, and Table 9 repeats the whole comparison there.
| method | as published travel | as published tard. | as published cour. | as published cost | + descent travel | + descent tard. | + descent cour. | + descent cost |
| sweep | 2163 | 833 | 22.7 | 2996 | 1786 | 8 | 30.0 | 1794 |
| fisher | 2487 | 578 | 34.0 | 3064 | 1605 | 5 | 32.4 | 1610 |
| -means | 2174 | 410 | 34.0 | 2584 | 1829 | 11 | 31.8 | 1839 |
| spatio-temporal -means | 2217 | 800 | 34.0 | 3017 | 1936 | 28 | 32.8 | 1964 |
| capacitated -means | 2284 | 449 | 34.0 | 2733 | 1868 | 10 | 32.1 | 1878 |
| Ward agglomerative | 2176 | 326 | 34.0 | 2502 | 1867 | 40 | 32.1 | 1907 |
| this paper | 1095 | 10 | 31.5 | 1106 | ||||
| ALNS | 1104 | 40 | 30.8 | 1144 |
Table 9. requests, couriers, , , . The same instances with no dispatch charge, , so cost is travel+tardiness alone and the courier count is free. Compare with Table 3.
The advantage over the clustering rules does not require the dispatch charge, and is larger without one. Against the six rules as published our proposed method is −49.9% (18/18 instances, ), and against the same rules carrying our descent −26.5% (18/18, ), against −12.1% for the same comparison at
. The apparent strengthening is largely arithmetic: at every method pays a fixed term of times the couriers it opens, 23 on average over these instances, a large common addend that compresses every relative difference. In absolute terms nothing changes, and the travel column shows it: our proposed method is close to ALNS there and the rules are not.
The courier counts separate the methods by whether the fleet size is a decision at all. The number of groups is an input to every published rule, so each of the 6 dispatches the same couriers whichever charge applies: the counts in the as published block of Table 3 and of Table 9 are identical. Our proposed method opens 8.3 more couriers when the charge is lifted and ALNS 7.8 more, both responding to what the objective now prices. The strengthened rules respond as well, by 3.7 to 7.3 couriers, because the descent they carry minimises the objective, and the objective charges for every courier opened.
This is the form in which the fleet result holds. It is a claim about responsiveness to and it separates our proposed method from the published rules, not from ALNS. It is not a claim about distance from the capacity floor of § 2: sweep fills each courier to in angular order, so it opens couriers exactly, sitting on the floor at and at alike.
Against ALNS the two are not statistically distinguishable: pooled −0.5% with 11 wins in 18, . That pooled figure hides a trend with size, +9.6% at , −5.8% at , −5.2% at , so ALNS is ahead on the smallest instances and behind on the larger ones. Under a dispatch charge the decomposition beats ALNS at matched wall-clock and ALNS does not catch up given far longer (§ 4.8); with couriers free it is a tie at matched wall-clock, and a search given more time would be expected to pass us, since what remains in the objective is exactly the route quality a search over complete solutions is good at.
Against every published clustering rule, in its own form and strengthened with our improvement step, our proposed method is cheaper on all 18 instances at and on all 18 at , and against ALNS it is ahead under a dispatch charge and level without one. Both comparisons use the three problem sizes of Table 3. Section 4.6 takes the one against the clustering rules to 1000 requests and 300 couriers, where most of our runtime is work that decomposes by courier: our proposed method returns in 50 s against 821 s for the strongest clustering baseline, at a cost 34% below it.
The charge swept. Section 4.2 prices a dispatched courier at and Section 4.5 at . Sweeping over 6 levels from 0 to 400 at gives the shape between them; Figure 4(a) plots the result. The margin over the strengthened rules is monotone and largest where the charge is smallest, −15.1% at against −4.2% at $\varphi = 400, which is the compression effect of Section 4.5 seen across the whole range rather than at its ends: a term every method pays alike grows with and shrinks every ratio. Our fleet falls from 11.2 couriers at to the capacity floor of 8 by and stays there, while no rule in its published form moves at any charge. Against ALNS the sign changes inside the range: we are behind at and ahead from upwards, which locates the crossover the earlier sections describe.
The fleet size. The design rule of § 4.1 ties the request count to the fleet, so enlarging enlarges the instance with it and the workload per courier is held fixed. Table 10 sweeps from 6 to 18.
| vs. rules + descent | vs. ALNS | ||||
| mean | wins | mean | |||
| 6 | 20 | −4.1% | 6/8 | 0.055 | +1.7% |
| 9 | 32 | −6.5% | 7/8 | 0.039 | −1.1% |
| 12 | 40 | −9.1% | 8/8 | 0.008 | −4.3% |
| 18 | 60 | −12.2% | 8/8 | 0.008 | −10.7% |
Table 10. requests, couriers, , , . The advantage widens with the fleet. The design rule of § 4.1 is held fixed, so the workload grows with the fleet. Paired against the best of the six rules carrying our descent, and against ALNS at matched wall-clock, at . Negative favours the proposed method.
Both margins move monotonically with the fleet: against the strengthened rules from −4.1% at to −12.2% at , and against ALNS from +1.7% to −10.7%, crossing from behind to ahead. The reason is the fleet decision itself: the number of couriers a solution may open grows with , so there is more for the assignment program to decide and more for a method that cannot decide it to lose.
Scaling, and where the work sits
Table 11 runs the comparison at four sizes up to requests and couriers, five times the largest instance in Table 3. At that size our proposed method returns a solution in 50 s against 821 s for the strongest clustering baseline, and it is ahead on every component rather than on the total alone: travel 7878 against 16448, lateness 24 against 63, and 201 couriers against 262, for a cost 34% below the baseline’s. Of that time, 30 s is spent in work that is independent per courier, namely marginal costs, descent screening and exact routing, and 20 s in the assignment program, which is not. Were the first term to divide perfectly and the second not at all, the whole would still take 20 s on any number of cores: by Amdahl’s law the attainable speedup is the total divided by the serial part, 50/20 ≈ 2.5×. That figure is a ceiling computed from a single-core measurement, not a speedup we observed: every runtime reported in this paper is single-core and no experiment exploited the parallel structure. A real implementation would fall short of it, since the synchronisation points of § 3.8 and the cost of distributing the marginal costs each take back part of it. What the decomposition delivers is a workload whose expensive part is per-courier; converting that into wall-clock on a parallel machine is left to future work. The candidate list of § 3.3 contributes as well, by making every step linear in .
| method | travel | tard. | cour. | cost | time | assign. | |
| 100 | ours | 1117 | 4 | 20.5 | 3171 | 7 s | 6 s |
| baseline | 1936 | 20 | 26.5 | 4606 | 1 s | — | |
| ALNS | 1589 | 25 | 20.5 | 3664 | 11 s | — | |
| 200 | ours | 1847 | 1 | 40.5 | 5898 | 18 s | 13 s |
| baseline | 3246 | 4 | 47.5 | 8000 | 8 s | — | |
| ALNS | 3235 | 59 | 40.5 | 7344 | 19 s | — | |
| 400 | ours | 3527 | 14 | 81.0 | 11642 | 31 s | 20 s |
| baseline | 7115 | 41 | 104.0 | 17556 | 36 s | — | |
| ALNS | 6753 | 158 | 80.5 | 14961 | 90 s | — | |
| 1000 | ours | 7878 | 24 | 201.0 | 28002 | 50 s | 20 s |
| baseline | 16448 | 63 | 262.0 | 42711 | 821 s | — | |
| ALNS | 23518 | 2602 | 200.5 | 46170 | 1483 s | — |
Table 11. requests, couriers, , , . Two misaligned instances at each size; those at and 200 are also in Table 3, those at 400 and 1000 are not. Scaling of the proposed method against the strongest clustering baseline (capacitated -means with our descent) on the same instances. Assign. is the part of our time that does not divide across cores.
The ALNS rows of Table 11 are not a comparison at equal wall-clock, as its time column shows. ALNS is given our runtime on the same instances as its budget, but a budget can only be tested between iterations, so the search runs to the end of whichever ruin-and-recreate pass is in flight when the budget expires. At 100 and 200 requests a pass is short enough that this costs almost nothing and ALNS keeps to the budget. At 400 it takes three times what it was allowed, and at 1000, where one pass over the whole plan is itself longer than the budget, it takes 1483 s against the 50 s it was allowed, a factor of 30. Even with that much extra time its solution is far worse on the two components a search should be good at, travel 23518 against 7878 and lateness 2602 against 24, while it opens the same fleet as we do, 200 couriers against 201. A search over complete solutions must repair a thousand-request plan at every step, while the decomposition never sequences more than requests at once.
Benchmark instances and the boundary of the advantage
Adapted benchmark instances. The instances above come from our own generator, so we repeat the comparison analysis on batches drawn from the Li & Lim benchmark [59], adapted to this setting as
Section 4.1 describes. These have window widths, spatial layouts and release patterns we did not choose, and they sit at the misaligned end of the alignment axis throughout. Table 12 reports them by family.
| ours | best of six | + descent | ALNS | |
| cost, by family | ||||
| lc201 | 1632 | 1799 | 1663 | 1676 |
| lc202 | 1581 | 1756 | 1631 | 1556 |
| lr201 | 1779 | 1875 | 1814 | 1833 |
| lr202 | 1977 | 2208 | 2070 | 2060 |
| lrc101 | 2449 | 2827 | 2463 | 2475 |
| lrc102 | 2271 | 2787 | 2258 | 2247 |
| lrc201 | 2151 | 2517 | 2227 | 2161 |
| lrc202 | 2125 | 2546 | 2231 | 2101 |
| pooled, by component | ||||
| travel | 1066 | 1249 | 1084 | 1076 |
| tardiness | 47 | 140 | 44 | 54 |
| couriers | 8.8 | 9.0 | 9.2 | 8.8 |
| cost | 1996 | 2289 | 2045 | 2014 |
Table 12. requests, couriers, , , . Adapted Li & Lim batches. Upper block: mean cost by family. Lower block: the same batches pooled and split into the terms of (2). Best of six takes the cheapest published rule on each instance, + descent the cheapest after our improvement step.
Pooled over the 24 benchmark batches our proposed method is −12.2% against the best published rule (24 wins, ), a figure that coincides to three significant figures with an unrelated one, the −12.2% against strengthened rules at in Table 10, which is measured on generated instances; the two are different comparisons on different data and agree by chance. Against the best of those rules carrying our descent the margin here is −2.4% (18 wins, ). Against ALNS at matched wall-clock it is −0.9% (15/24, ), a tie at this number of instances. The lower block of Table 12 gives the components, which locate that margin: travel and lateness are nearly level with the best strengthened rule and with ALNS, and most of the difference comes from the fleet size.
Both figures are measured at : −8.9% on our generated instances against −2.4% on the benchmark batches. Instance size is therefore not what makes the margin smaller here. Section 4.7 identifies it.
Instance structure and the size of the advantage. The margin on the benchmark batches is smaller than on the instances generated by the design rule of Section 4.1. Whether that rule yields conditions favourable to the proposed method is a question about instance structure, and we answer it by moving the generator along the axes on which the two datasets differ and watching the margin. Three axes were tried. Table 13 carries the two swept here; the alignment axis was swept already in Section 4.4. Two do not explain the gap and one does. The two failures are reported because they say what the effect is not.
| setting | property | + desc. | vs. ALNS |
| window width: courier-time ratio | |||
| width 45 | 1.77 | −9.1% | −4.1% |
| width 90 | 2.05 | −13.4% | −5.9% |
| width 180 | 2.61 | −14.9% | −4.2% |
| width 360 | 3.75 | −14.3% | −3.6% |
| width 720 | 6.01 | −14.9% | −4.1% |
| delivery placement: locality | |||
| local | 0.85 | −9.1% | −3.6% |
| cross | 0.03 | −2.0% | −0.2% |
| benchmark (Li & Lim) | 0.29 | −2.4% | −0.9% |
Table 13. requests, couriers, , , . Moving our generator towards the benchmark, one axis at a time. Each block reports the measured instance property and the margin against the best of the six rules carrying our descent, and against ALNS. The benchmark row is the adapted Li & Lim batches at the same size.
Not the alignment. Section 4.4 places the benchmark at a realised misalignment of 0.61, beside our hardest setting, where our margin is at its largest. If anything the benchmark sits where the method should do best.
Not the time pressure. Widening the time windows moves the courier-time ratio from 1.77 to 6.01, across and beyond the benchmark’s 2.61. The margin does not shrink; it grows, from −9.1% to −14.9%. At the width whose courier-time ratio matches the benchmark exactly the margin is −14.9%, six times the benchmark’s. How much time the fleet has is not the explanation, and we had expected it to be.
The spatial structure. What does explain it is where a request’s delivery lies. Our default generator puts the delivery near its own pickup, so the locality defined in Section 4.1, the fraction of requests whose pickup and delivery lie within 10 of each other, is 0.85. Sending the delivery to a different hub gives 0.03, and the benchmark sits between the two at 0.29. The margin against the strengthened rules collapses from −9.1% to −2.0% (7/8, $p = 0.109), and against ALNS from −3.6% to −0.2%, within noise of the −2.4% and −0.9% measured on the benchmark itself.
The mechanism is the one Section 3.2 argues for, seen at its boundary. When a delivery sits near its pickup, a request is effectively a point, the freedom lies in which points travel together, and what a group costs is exactly the chaining the marginal cost measures and a centroid cannot. When the delivery is across the city, every request is a long mandatory traversal, the route is dominated by edges no grouping can avoid, and the choice of partition matters much less: any sensible grouping followed by a good descent reaches a similar place. The benchmark lies towards that end, which is why our advantage there is real but small.
Courier dispatch sits at the other end of the same axis. In meal delivery, the setting whose operational conditions this paper takes as its model [51, 68, 63], and in comparable work such as pharmacy delivery, a customer orders from a vendor already close by and the platform serves the order within a bounded radius, so a request’s pickup and its delivery are near each other. That is why the generator of § 4.1 places each delivery near its own pickup, and it is the regime in which the grouping criterion rather than the unavoidable edges decides what a solution costs. The boundary is stated here because the margin is not uniform across instance structures, and because the structures in which it is largest are the ones the application presents.
Comparison with the metaheuristic reference
Table 3 also lists an adaptive large neighbourhood search under the budget of § 4.1, our own wall-clock on each instance with a ten-second floor. Under that budget the decomposition is −14.2% against it, winning 18 of 18 instances (), and Table 4 splits that by size. The difference is not the fleet, since the two dispatch within 3.7% of each other at every size. It is travel, where our margin widens as the instances grow: 4% at , 37% at , 47% at . The explanation is the budget rather than the algorithm. A ruin-and-recreate step reinserts requests into a plan spanning the whole instance, so the work per improvement grows with , while the decomposition never sequences more than requests at a time and solves each of those exactly. Given our wall-clock, ALNS has fewer useful moves the larger the instance is. Section 4.8 removes the budget restriction and measures how much more time it needs.
Time for the reference to match.
Given the same wall-clock the proposed method is ahead, and the natural objection is that ALNS would win with more time. Table 14 tests that directly, by stopping the search the moment its incumbent reaches our cost. Over every instance and both seeds it never did, inside a budget of 300 s against our 7–38 s, and the shortfall widens with size, reaching +23% at , and +21% for the better of the two seeds.
| travel | tard. | cour. | cost | time | ||
| 100 | ours | 1117 | 4 | 20.5 | 3171 | 7.6 s |
| ALNS | 1252 | 6 | 20.5 | 3307 (+4%) | 300 s | |
| 200 | ours | 1847 | 1 | 40.5 | 5898 | 18.1 s |
| ALNS | 2454 | 25 | 41.5 | 6629 (+12%) | 300 s | |
| 400 | ours | 3527 | 14 | 81.0 | 11642 | 37.7 s |
| ALNS | 6129 | 117 | 81.0 | 14345 (+23%) | 300 s |
Table 14. = 100, 200, 400 requests, = 30, 60, 120 couriers, , , . ALNS is stopped as soon as its incumbent reaches the cost of the proposed method, or after 300 s. It never reached it. Components are shown for both, so the residual gap can be attributed. Two misaligned instances per size, each searched by ALNS with two seeds; the ALNS row is the worse of the two seeds on each instance, the only one whose components were recorded. The better seed is +4%, +9% and +21% above the proposed method at the three sizes.
The components say what the residual is, and the obvious guess about it is wrong. One might expect a ruin-and-recreate search to be held back by the fleet. Closing a courier means relocating every one of its requests, and every intermediate step raises the objective, because a route with one request left still pays in full. No standard removal rule performs that transformation in a single move. That is not what happens.
At ALNS dispatches 81.0 couriers against our 81.0, so it sizes the fleet as we do. The gap is travel, 2601 units of it, about 96% of the shortfall.
The reason is the size of the neighbourhood rather than its shape, and it is the one given above: each ruin-and-recreate step works on a plan spanning the whole instance, so three hundred seconds buys proportionally fewer useful moves the larger that instance is, which is why the shortfall widens rather than closes. We would expect a longer budget to close it eventually; what we can report is that it does not close within the 300 s cap, which is eight to forty-four times our own runtime depending on the instance.
Two caveats keep this in proportion. First, the effect depends on : § 4.5 repeats the whole comparison with dispatch free, and there the two are indistinguishable at matched wall-clock, so ALNS would be expected to pass us given more time. Second, the comparison uses the standard operator set of Ropke and Pisinger [54]; an implementation tuned for these sizes, or one carrying a route-elimination operator, would be expected to do better than this.
The parallel assignment
Section 3.8 replaces the one coupled program by one subproblem per courier. Table 15 reports what that costs, in components rather than a single percentage, on the same 18 instances as Table 3.
| assignment | travel | tard. | cour. | cost | assign. | ||
| 40 | exact program | 624 | 18 | 8.0 | 1441 | 0.2 s | — |
| multipliers only | 547 | 6 | 10.0 | 1553 | 0.1 s | +7.8% | |
| + fleet refit | 593 | 13 | 8.7 | 1472 | 0.1 s | +2.2% | |
| + shortlist refit | 614 | 10 | 8.3 | 1457 | 0.3 s | +1.1% | |
| 100 | exact program | 1121 | 67 | 20.7 | 3255 | 3.3 s | — |
| multipliers only | 1078 | 11 | 24.5 | 3539 | 0.3 s | +8.7% | |
| + fleet refit | 1057 | 17 | 23.7 | 3441 | 0.3 s | +5.7% | |
| + shortlist refit | 1096 | 81 | 21.2 | 3294 | 1.5 s | +1.2% | |
| 200 | exact program | 1874 | 231 | 40.8 | 6189 | 10.5 s | — |
| multipliers only | 1830 | 34 | 46.5 | 6515 | 0.5 s | +5.3% | |
| + fleet refit | 1850 | 72 | 46.0 | 6522 | 0.6 s | +5.5% | |
| + shortlist refit | 1870 | 204 | 41.2 | 6191 | 6.6 s | +0.1% | |
| all | exact program | 1206 | 105 | 23.2 | 3628 | 4.7 s | — |
| multipliers only | 1152 | 17 | 27.0 | 3869 | 0.3 s | +7.3% | |
| + fleet refit | 1166 | 34 | 26.1 | 3812 | 0.3 s | +4.5% | |
| + shortlist refit | 1193 | 98 | 23.6 | 3647 | 2.8 s | +0.8% |
Table 15. requests, couriers, , , . The cost of distributing the assignment, on the instances of Table 3 at . Assign. is the time in the assignment step, the only step that couples couriers; is the paired cost difference against the exact program. Each block is one problem size; all pools the instances of every size, which is what the text quotes.
The multipliers of (15) coordinate one of the two decisions well and the other badly: which courier takes a request, and how many couriers open. The components separate them. The Lagrangian variant travels less than the exact program (1152 against 1206) and is more punctual (17 against 105); it loses only on the fleet, opening 27.0 couriers against 23.2, and that one term turns a better route plan into a +7.3% worse solution (0/18 wins, ). This is the expected behaviour of a Lagrangian relaxation of a fixed-charge problem: a multiplier on the covering constraint tells a courier which requests are cheap for it, and nothing tells the couriers collectively how many of them should open.
Two repairs take the multipliers as a starting point rather than as the answer, and both appear in Table 15. The fleet refit keeps the set of couriers the multipliers opened, together with the two sizes either side of it, and assigns requests to each of those fleets in turn; with the open set fixed the dispatch charge is a constant and what remains is a transportation problem, so each trial is a linear program. The shortlist refit leaves the fleet decision open and uses the reduced costs only to narrow the problem, keeping for each request the three couriers of lowest reduced cost and solving the exact assignment program on what is left.
The second recovers most of the loss, +0.8% pooled, and more of it the larger the instance: +1.1% at against +0.1% at $|R| = 200. That confirms which term carries the gap rather than removing it. That repair is not free: the program it solves is smaller than the original but still an integer program, and still coupled, which costs 2.77 s against the exact program’s 4.66 s pooled, but only because it is cheaper at the two larger sizes; at , where the exact program closes in 0.17 s, the repair is the dearer of the two at 0.26 s. What the distributed form buys is the coupled step: 16 times less serial time pooled, and a saving that grows with the instance, from 1.5 times at (0.17 s against 0.11 s) to 21 times at , in a step that needs no information about other couriers. We therefore use the exact assignment in the proposed method, and report the Lagrangian variant as the option for a setting where the assignment must itself be distributed.
Conclusion
A cluster-first decomposition is only as good as the quantity its grouping optimises. We have argued, and measured, that the natural choice, proximity in space and time, is wrong in its temporal half: a courier serves its group sequentially, so requests that fall due together are in contention rather than in affinity. We replace that criterion with the marginal cost of the induced routing subproblem, and we let the one integer program that groups the requests also decide which couriers to open.
Against the best of six published clustering rules, taken instance by instance, our proposed method is 29% cheaper with those rules as published and 12% cheaper once they carry our own improvement step, on every one of the 18 instances in both comparisons, and the margin widens as the fleet grows. It does not rest on the dispatch charge, and with couriers free it is wider still. Because the grouping confines sequencing to a few requests per courier, we keep the expensive work decomposable by courier, a structure we measure but do not exploit, since every runtime we report is single-core. With candidate lists we solve a thousand requests and three hundred couriers in about a minute, sixteen times faster than the strongest clustering alternative and 34% cheaper. We return the same answer whatever the random seed.
We bound the claim in three ways. Our margin is smaller on benchmark batches we did not design, and § 4.7 traces the reason to instance structure rather than to size, since the gain is largest where a request’s pickup and delivery lie close together, which is the regime courier dispatch operates in and not the one those batches represent. Against a large-neighbourhood search we are ahead at matched wall-clock when dispatch is charged and level when it is free, and we do not see it reach our cost within eight to forty-four times our budget, which says that one improvement costs a search over complete solutions rather than where either method’s quality ceiling lies. Distributing the assignment through multipliers costs 7.3%, all of it in the fleet decision.
Declaration of generative AI and AI-assisted technologies in the manuscript preparation process
During the preparation of this work the authors used Claude (Anthropic) to generate the tables and figures from the simulation results that the authors coded and ran, to improve the phrasing of the manuscript for clarity and readability, and to screen the manuscript for typographical and grammatical errors. After using this tool, the authors reviewed and edited the content as needed and take full responsibility for the content of the published article.
References
References
- [1]Agatz, N., Campbell, A., Fleischmann, M., Savelsbergh, M., 2011. Time slot management in attended home delivery. Transportation Science 45, 435–449.DOI
- [2]Agatz, N., Erera, A., Savelsbergh, M., Wang, X., 2012. Optimization for dynamic ride-sharing: A review. European Journal of Operational Research 223, 295–303.DOI
- [3]Akeb, H., Bouchakhchoukha, A., Hifi, M., 2015. A three-stage heuristic for the capacitated vehicle routing problem with time windows, in: Recent Advances in Computational Optimization. Springer, Cham. volume 580 of Studies in Computational Intelligence, pp. 1–19. doi:10.1007/978-3-319-12631-9_1.DOI
- [4]Aziez, I., Côté, J.F., Coelho, L.C., 2020. Exact algorithms for the multi-pickup and delivery problem with time windows. European Journal of Operational Research 284, 906–919.DOI
- [5]Baldacci, R., Bartolini, E., Mingozzi, A., 2011. An exact algorithm for the pickup and delivery problem with time windows. Operations Research 59, 414–426.
- [6]Baldacci, R., Hadjiconstantinou, E., Mingozzi, A., 2004. An exact algorithm for the capacitated vehicle routing problem based on a two-commodity network flow formulation. Operations Research 52, 723–738.DOI
- [7]Bello, I., Pham, H., Le, Q.V., Norouzi, M., Bengio, S., 2016. Neural combinatorial optimization with reinforcement learning. arXiv preprint arXiv:1611.09940 .arxiv.org/abs/1611.09940
- [8]Berbeglia, G., Cordeau, J.F., Gribkovskaia, I., Laporte, G., 2007. Static pickup and delivery problems: a classification scheme and survey. TOP 15, 1–31. doi:10.1007/s11750-007-0009-0.DOI
- [9]Berbeglia, G., Cordeau, J.F., Laporte, G., 2010. Dynamic pickup and delivery problems. European Journal of Operational Research 202, 8–15.DOI
- [10]Bradley, P.S., Bennett, K.P., Demiriz, A., 2000. Constrained k-means clustering. Technical Report MSR-TR-2000-65. Microsoft Research. Redmond, WA.
- [11]Clarke, G., Wright, J.W., 1964. Scheduling of vehicles from a central depot to a number of delivery points. Operations Research 12, 568–581.
- [12]Cordeau, J.F., 2006. A branch-and-cut algorithm for the dial-a-ride problem. Operations Research 54, 573–586.DOI
- [13]Cordeau, J.F., Laporte, G., 2001. A tabu search algorithm for the site dependent vehicle routing problem with time windows. INFOR: Information Systems and Operational Research 39, 292–298.DOI
- [14]Cordeau, J.F., Laporte, G., 2003. A tabu search heuristic for the static multi-vehicle dial-a-ride problem. Transportation Research Part B: Methodological 37, 579–594. URL: https://www.sciencedirect.com/science/article/pii/S0191261502000450, doi:https://doi.org/10.1016/S0191-2615(02)00045-0.
- [15]Curtois, T., Landa-Silva, D., Qu, Y., Laesanklang, W., 2018. Large neighbourhood search with adaptive guided ejection search for the pickup and delivery problem with time windows. EURO Journal on Transportation and Logistics 7, 151–192.DOI
- [16]Dantzig, G.B., Ramser, J.H., 1959. The truck dispatching problem. Management Science 6, 80–91.DOI
- [17]Dumas, Y., Desrosiers, J., Soumis, F., 1991. The pickup and delivery problem with time windows. European Journal of Operational Research 54, 7–22.
- [18]Dupas, R., Hsu, T., Taniguchi, E., 2024. A clustering-routing approach for assigning customers to depots in last mile delivery. Transportation Research Procedia 79, 13–20.DOI
- [19]Fatemi-Anaraki, S., Mokhtarzadeh, M., Rabbani, M., Abdolhamidi, D., 2022. A hybrid of k-means and genetic algorithm to solve a bi-objective green delivery and pick-up problem. Journal of Industrial and Production Engineering 39, 146–157.
- [20]Fisher, M.L., Jaikumar, R., 1981. A generalized assignment heuristic for vehicle routing. Networks 11, 109–124. doi:10.1002/net.3230110205.DOI
- [21]Gendreau, M., Hertz, A., Laporte, G., 1994. A tabu search heuristic for the vehicle routing problem. Management Science 40, 1276–1290.
- [22]Gendreau, M., Laporte, G., Séguin, R., 1996. Stochastic vehicle routing. European Journal of Operational Research 88, 3–12. URL: https://www.sciencedirect.com/science/article/pii/037722179500050X, doi:https://doi.org/10.1016/0377-2217(95)00050-X.
- [23]Gillett, B.E., Miller, L.R., 1974. A heuristic algorithm for the vehicle-dispatch problem. Operations Research 22, 340–349.DOI
- [24]Gronalt, M., Hartl, R.F., Reimann, M., 2003. New savings based algorithms for time constrained pickup and delivery of full truckloads. European Journal of Operational Research 151, 520–535. doi:10.1016/S0377-2217(02)00650-1.DOI
- [25]Hruschka, E.R., Campello, R.J., Freitas, A.A., et al., 2009. A survey of evolutionary algorithms for clustering. IEEE Transactions on Systems, Man, and Cybernetics, Part C (applications and reviews) 39, 133–155.DOI
- [26]Jozefowiez, N., Semet, F., Talbi, E.G., 2008. Multi-objective vehicle routing problems. European Journal of Operational Research 189, 293–309.DOI
- [27]Kool, W., van Hoof, H., Gromicho, J., Welling, M., 2022. Deep policy dynamic programming for vehicle routing problems, in: International Conference on Integration of Constraint Programming, Artificial Intelligence, and Operations Research, Springer. pp. 190–213.arxiv.org/abs/2102.11756
- [28]Kool, W., van Hoof, H., Welling, M., 2019. Attention, learn to solve routing problems!, in: International Conference on Learning Representations (ICLR).arxiv.org/abs/1803.08475
- [29]Laporte, G., Louveaux, F., Mercure, H., 1992. The vehicle routing problem with stochastic travel times. Transportation Science 26, 161–170.DOI
- [31]Lenstra, J.K., Kan, A.R., 1981. Complexity of vehicle routing and scheduling problems. Networks 11, 221–227.
- [33]Li, H., Lim, A., 2003. A metaheuristic for the pickup and delivery problem with time windows. International Journal on Artificial Intelligence Tools 12, 173–186.
- [36]Lloyd, S.P., 1982. Least squares quantization in PCM. IEEE Transactions on Information Theory 28, 129–137. doi:10.1109/TIT.1982.1056489.DOI
- [38]Mankowska, D.S., Meisel, F., Bierwirth, C., 2014. The home health care routing and scheduling problem with interdependent services. Health Care Management Science 17, 15–30.DOI
- [39]Mitrović-Minić, S., Krishnamurti, R., Laporte, G., 2004. Double-horizon based heuristics for the dynamic pickup and delivery problem with time windows. Transportation Research Part B: Methodological 38, 669–685.
- [41]Naccache, S., Côté, J.F., Coelho, L.C., 2018. The multi-pickup and delivery problem with time windows. European Journal of Operational Research 269, 353–362. doi:10.1016/j.ejor.2018.01.035.DOI
- [42]Nanry, W.P., Barnes, J.W., 2000. Solving the pickup and delivery problem with time windows using reactive tabu search. Transportation Research Part B: Methodological 34, 107–121.DOI
- [43]Nasir, J.A., Kuo, Y.H., 2020. A decision support framework for home health care transportation with simultaneous multi-vehicle routing and staff scheduling synchronization. Decision Support Systems 138, 113361. URL: https://www.sciencedirect.com/science/article/pii/S0167923620301160, doi:https://doi.org/10.1016/j.dss.2020.113361.
- [44]Nazari, M., Oroojlooy, A., Snyder, L., Takác, M., 2018. Reinforcement learning for solving the vehicle routing problem. Advances in Neural Information Processing Systems 31.arxiv.org/abs/1802.04240
- [45]Osman, I.H., Wassan, N.A., 2002. A reactive tabu search meta-heuristic for the vehicle routing problem with back-hauls. Journal of Scheduling 5, 263–285.DOI
- [46]Pankratz, G., 2005. A grouping genetic algorithm for the pickup and delivery problem with time windows. OR Spectrum 27, 21–41.DOI
- [47]Parragh, S.N., Doerner, K.F., Hartl, R.F., 2008a. A survey on pickup and delivery problems. part I: Transportation between customers and depot. Journal für Betriebswirtschaft 58, 21–51. doi:10.1007/s11301-008-0033-7.DOI
- [48]Parragh, S.N., Doerner, K.F., Hartl, R.F., 2008b. A survey on pickup and delivery problems. part II: Transportation between pickup and delivery locations. Journal für Betriebswirtschaft 58, 81–117. doi:10.1007/s11301-008-0036-4.DOI
- [49]Potvin, J.Y., Rousseau, J.M., 1993. A parallel route building algorithm for the vehicle routing and scheduling problem with time windows. European Journal of Operational Research 66, 331–340.DOI
- [50]Qin, Z.T., Zhu, H., Ye, J., 2022. Reinforcement learning for ridesharing: An extended survey. Transportation Research Part C: Emerging Technologies 144, 103852.DOI
- [51]Reyes, D., Erera, A., Savelsbergh, M., Sahasrabudhe, S., O’Neil, R., 2018. The meal delivery routing problem. Technical Report. Georgia Institute of Technology. Atlanta, GA. Optimization Online 6571.
- [52]Ropke, S., Cordeau, J.F., 2009. Branch and cut and price for the pickup and delivery problem with time windows. Transportation Science 43, 267–286.DOI
- [53]Ropke, S., Cordeau, J.F., Laporte, G., 2007. Models and branch-and-cut algorithms for pickup and delivery problems with time windows. Networks 49, 258–272. doi:10.1002/net.20177.DOI
- [54]Ropke, S., Pisinger, D., 2006. An adaptive large neighborhood search heuristic for the pickup and delivery problem with time windows. Transportation Science 40, 455–472.DOI
- [55]Savelsbergh, M.W., Sol, M., 1995. The general pickup and delivery problem. Transportation Science 29, 17–29.
- [56]Selim, S.Z., Ismail, M.A., 1984. K-means-type algorithms: A generalized convergence theorem and characterization of local optimality. IEEE Transactions on Pattern Analysis and Machine Intelligence PAMI-6, 81–87.pubmed.ncbi.nlm.nih.gov/21869168
- [57]Shaw, P., 1998. Using constraint programming and local search methods to solve vehicle routing problems, in: Principles and Practice of Constraint Programming — CP98. Springer Berlin Heidelberg. volume 1520 of Lecture Notes in Computer Science, pp. 417–431. doi:10.1007/3-540-49481-2_30.DOI
- [58]Shi, J., 2024. Optimization of frozen goods distribution logistics network based on k-means algorithm and priority classification. Scientific Reports 14, 22477.DOI
- [59]SINTEF, 2026. Li & Lim benchmark. https://www.sintef.no/projectweb/top/pdptw/li-lim-benchmark/. Accessed 15 September 2026.
- [60]Solomon, M.M., 1987. Algorithms for the vehicle routing and scheduling problems with time window constraints. Operations Research 35, 254–265.DOI
- [61]Steever, Z., Karwan, M., Murray, C., 2019. Dynamic courier routing for a food delivery service. Computers & Operations Research 107, 173–188.DOI
- [62]Ulmer, M.W., Mattfeld, D.C., Köster, F., 2018. Budgeting time for dynamic vehicle routing with stochastic customer requests. Transportation Science 52, 20–37.
- [63]Ulmer, M.W., Thomas, B.W., Campbell, A.M., Woyak, N., 2021. The restaurant meal delivery problem: Dynamic pickup and delivery with deadlines and random ready times. Transportation Science 55, 75–100.DOI
- [64]Vinyals, O., Fortunato, M., Jaitly, N., 2015. Pointer networks, in: Cortes, C., Lawrence, N., Lee, D., Sugiyama, M., Garnett, R. (Eds.), Advances in Neural Information Processing Systems, Curran Associates, Inc. URL: https://proceedings.neurips.cc/paper_files/paper/2015/file/29921001f2f04bd3baee84a12e98098f-Paper.pdf.
- [65]Wang, H., Chen, S., Yin, X., Meng, L., Wang, Z., Wang, Z., 2025. A hybrid fuzzy c-means heuristic approach for two-echelon vehicle routing with simultaneous pickup and delivery of multi-commodity. IEEE Transactions on Fuzzy Systems 33, 218–230.
- [66]Wang, Y., Ran, L., Guan, X., Zou, Y., 2021. Multi-depot pickup and delivery problem with resource sharing. Journal of Advanced Transportation 2021, 5182989.DOI
- [67]Ward, J.H., 1963. Hierarchical grouping to optimize an objective function. Journal of the American Statistical Association 58, 236–244.DOI
- [68]Yildiz, B., Savelsbergh, M., 2019. Provably high-quality solutions for the meal delivery routing problem. Transportation Science 53, 1372–1388. doi:10.1287/trsc.2018.0887.DOI
- [69]Zhou, Y., Xie, R., Zhang, T., Holguin-Veras, J., 2020. Joint distribution center location problem for restaurant industry based on improved k-means algorithm with penalty. IEEE Access 8, 37746–37755.DOI



