1. Introduction
The domain of urban last-mile logistics is growing rapidly under the influence of e-commerce and on-demand retail, and its heavy reliance on diesel road vehicles makes it a disproportionate contributor to city-centre carbon emissions and traffic congestion [
1]. Under China’s “dual-carbon” commitments (carbon peak by 2030 and neutrality by 2060) [
2], operators face mounting pressure to cut delivery emissions while preserving service quality. Road vehicles will remain the backbone of urban delivery, but two complementary low-carbon channels are increasingly available to relieve them: off-peak metro freight, which repurposes spare underground rail capacity for trunk haulage [
3], and electric last-mile drones, which bypass surface congestion on short final legs [
4]. Used together, the road fleet and these channels form a multimodal delivery system whose emissions can be substantially lower than a truck-only operation, provided the operator decides well, for each order, which channel or combination of channels should carry it. It is this real-time channel-selection decision, under a binding carbon budget and customer service constraints, that we study.
However, coordinating such a delivery operation is demanding. For every incoming order, the operator must choose a delivery channel, the transfer points between metro and road vehicles and the launch and landing sites for drones, and the resulting vehicle and drone routes, all while keeping the day’s total carbon emissions, late deliveries, drone energy use, and metro-station load within firm limits. Two families of methods are commonly applied. Mathematical-programming approaches, such as mixed-integer formulations and multi-objective evolutionary or ALNS–ACO heuristics, attain near-optimal plans at the network-design scale but assume the demand is known and struggle with decisions that must be made online as orders arrive [
5,
6,
7]. Reinforcement-learning approaches handle the online and stochastic nature of the problem naturally, but they conventionally fold every constraint into a single weighted-penalty reward (
) [
8,
9]. For an operator who must respect a firm carbon cap, this is unsatisfactory: a finite penalty can always be “paid off” by a policy that violates the cap where it is profitable to do so, so the limit holds only on average rather than reliably; the penalty weights (
) that achieve a given emissions target depend on the units and scale of cost and emissions and must be re-tuned for every city, season, or fleet, and a single scalar reward fuses the economic and environmental objectives, leaving the operator no view of how much each unit of carbon abatement actually costs.
What makes this decision genuinely hard is that the right channel is not a fixed property of a delivery; it depends on where the order is going, when it arrives, and how much of the day’s carbon budget is still available. An order bound for a district well served by metro can be carried at a very low carbon cost through a rail trunk with a short final leg, whereas the same channel is wasteful for an order near the depot, which a road vehicle can reach directly. Demand is also not known in advance: orders arrive throughout the day, the carbon already spent constrains what remains affordable, and the operator cannot re-optimize a static plan after every arrival. Therefore, a scheduler must commit to a channel for each order online, balancing immediate operating cost against the cumulative carbon and service obligations of the whole day. This is the kind of sequential decision-making under uncertainty that reinforcement learning is suited to; the difficulty is that the carbon cap and service requirements are firm operating limits rather than soft preferences, and conventional reward-shaping handles them poorly, as noted above.
We therefore take a constrained route: we cast carbon-aware multimodal dispatch as a Constrained Markov Decision Process (CMDP) [
10] in which the carbon cap and service requirements are explicit constraints rather than reward terms and solve it with a Lagrangian deep reinforcement-learning algorithm that adjusts the balance between cost and carbon automatically, without the operator hand-tuning penalty weights. Once the cost–carbon trade-off varies across the city, no single channel is the right answer for every order: the policy that best meets demand within the carbon budget routes different orders through different channels. A plain constrained policy does not arrive at this behaviour on its own; we develop a demonstration-regularized training scheme that lets it do so. The numerical experiments in
Section 5 demonstrate the algorithmic behaviour under stylised conditions and are a necessary but not sufficient step before operational deployment.
This study makes three contributions. First, we formulate real-time carbon-aware multimodal dispatch as a constrained Markov decision process that selects, for each incoming order, among road, metro-freight, and drone delivery channels under a daily carbon budget, customer time windows, and operational limits on drone range and metro-station capacity, with a carbon intensity that varies by time of day and city region. To the best of our knowledge, this is the first such formulation that treats all three channels, together with the carbon cap, as a hard constraint, and we release an open simulator of the setting. Second, we develop a demonstration-regularized fine-tuning recipe that lets a Lagrangian-PPO agent control expected emissions against a binding carbon budget online (i.e., the mean over evaluation days is honoured, though individual days may deviate) while choosing a delivery channel for each order based on its state (destination, time, and remaining budget); the deployed policy is model-free at deployment (it requires no emissions model at decision time, though the demonstrator does access the emissions model during training), and plain constrained RL does not reach such a state-dependent policy. Third, we provide a thorough empirical study: against a penalty-free scheduler, the method nearly eliminates carbon and time-window violations at a modest operating-cost premium on synthetic city instances, and on a Nanjing-inspired instance built from the city’s metro topology and population-weighted demand, it learns a near-feasible per-order policy markedly cheaper than any single-channel alternative; we further benchmark against an offline clairvoyant optimum computed by an exact mixed-integer solver, finding our online model-free policy to be within a small margin of the offline optimum, and we report honest ablations of each design choice.
This study tests three hypotheses. (H1) Constrained reinforcement learning can control expected daily emissions against a hard cap online, without hand-tuned reward weights. (H2) In a heterogeneous city, no single fixed channel serves demand optimally under a binding carbon cap, so the constraint-active policy is per-order rather than one-channel. (H3) Demonstration-regularized fine-tuning is a necessary training ingredient—plain Lagrangian-PPO does not discover the per-order policy on its own.
Section 5 tests these hypotheses empirically.
The remainder of the study is organized as follows.
Section 2 surveys related work in multimodal urban-logistics optimization, learning-based vehicle routing, and constrained reinforcement learning.
Section 3 describes the delivery setting and formalizes it as a CMDP.
Section 4 develops the solution method.
Section 5 reports the experiments, including the main comparison, ablations, per-order channel assignment, and the Nanjing-inspired case study.
Section 6 discusses when the approach is preferable and its limitations, and
Section 7 concludes the paper.
6. Discussion
The experiments draw a clear operational lesson about when per-order channel assignment matters. In a uniform city or in one whose carbon hotspots do not change which channel is cheapest for an order, committing to the lowest-carbon channel for everything is a sound policy, and our method settles there. But real cities are not uniform: proximity to a metro line, to the depot, and to congested districts varies sharply from one neighbourhood to the next, so the channel that serves an order at the lowest cost under the carbon budget differs from order to order. In such a city, the operation that best meets demand is a per-order assignment, and what a learning scheduler offers is that it can discover and apply such an assignment from experience, without the operator hand-specifying which neighbourhoods should use which channel. The contribution of the demonstration-regularized scheme is to make a constrained learner actually reach this operation, which it does not do when left to explore on its own. The operator-facing tests of
Section 5.3,
Section 5.4,
Section 5.5 and
Section 5.6 sharpen the same point along three deployment axes: the same trained scheduler tracks a
change in the carbon target, a
change in daily order volume, and a
change in city scale without per-instance tuning, whereas the conventional fixed-weight penalty PPO of
Section 5.5 collapses to a single channel at every tested weight and never finds the per-order assignment at all.
A natural question for a practitioner is when to prefer a learned scheduler over a simple rule that assigns each order to a channel via a hand-built formula. Such a rule is attractive when the carbon and cost of every channel can be computed in advance and the operating environment is stable, and in that case, it is hard to beat. However, its assumptions are exactly what fail in practice: real grid-carbon intensity, metro timetables, and traffic shift depending on the weather, the hour, and the season and are rarely available as a clean formula. The learned scheduler needs no such formula and adapts to conditions it observes as the day unfolds; it also extends without redesign if the operator later wants to decide on routes, timing, or transfer points jointly rather than only the channel.
Transferability to other cities. The CMDP formulation, the Lagrangian-PPO training loop, and the observation-space design are city-agnostic: they contain no reference to any specific city’s geometry and require no changes to move to a new city. However, four instance-level components must be re-instantiated per city: (i) the metro topology (station coordinates and inter-station connectivity), (ii) the location of the depot or urban consolidation centre, (iii) the demand distribution used at training time (either a uniform prior over the grid or, when available, a population-weighted mixture), and (iv) any city-specific carbon-intensity map (the hotspots and cleanspots that induce spatial heterogeneity in
). In the accompanying code repository, we provide a template that reduces this re-instantiation to filling in four data structures in the environment class; the Nanjing-inspired instance in
Section 5.7 was built this way in fewer than 100 lines of Python3.14. The city-scale robustness study in
Section 5.6 demonstrates that the same training recipe and hyperparameters transfer across a
scale band without per-city tuning, which is indirect evidence of transferability, but does not replace external validation on a second real city.
Deployment considerations. Four practical points arise when moving from a stylized environment to real operations.
Data acquisition: At decision time, the policy observes only state features already routinely available in a fleet-management system (order destination, remaining budget, current time, nearest metro station and pad); no additional live feed is required.
Integration with the metro operator: Our current formulation treats the per-hour metro capacity as a static budget; production use would replace this with a real-time capacity feed from the metro authority.
Operational drone restrictions: Our environment enforces range but neither no-fly airspace nor weather-based groundings. Adding a no-fly mask and a drone-availability flag to the state is straightforward and does not change the algorithm.
Unexpected disruptions: Because the policy is state-dependent, it already responds to disruptions that appear in state (an exceeded subway hour bucket triggers a reallocation away from metro); disruptions that are not in state, such as a fleet-wide drone grounding, would require an availability flag added to the observation. The broader institutional context is also relevant. Real-time AI-driven multimodal logistics depend on smart-city infrastructure, data-sharing between the operator and the metro authority, and the regulatory framework governing drone airspace and freight-metro co-use [
35]; these are pre-requisites for deployment that our algorithmic contribution does not, by itself, resolve.
Assumptions and limitations. We consolidate the study’s limitations here. (1) Order arrivals are Poisson; real order streams exhibit weekly and hourly seasonality and correlated bursts that our model does not capture. Consumer demand for last-mile delivery is also shaped by the broader digital marketplace and by the volatility of consumer attention [
36], which enters the scheduler only through the parametric arrival process. (2) Destinations are drawn from parametric distributions (uniform or Nanjing five-centre mixture) rather than from operational records. (3) Transfer-station and pad selection uses a nearest-neighbour heuristic; joint routing, timing, and transfer-point optimization is left to future work. (4) All four operational constraints are represented, but in the instance parameters reported in
Section 5.1, only the carbon and time-window constraints are tightly binding; drone range and metro-station capacity are slack. Constructing instances in which they bind is a direct next step. (5) The environment is simulated: there is no live road-network router, no metro timetable, no live grid-carbon feed, no airspace constraints, and no weather-driven disruptions. (6) The learned per-order policy leaves a residual carbon overshoot driven by day-to-day demand variance; here, the expected-value carbon constraint targets the mean at the cap and tolerates this variance, so a risk-sensitive constraint that bounds the upper tail of emissions (for example, a CVaR or chance constraint) is the appropriate tool, and it becomes especially important when emissions are non-stationary across days. We leave this risk-sensitive extension to future work. The present results validate the approach on carbon and service; they do not constitute a finished operational tool.
7. Conclusions
This study addressed how a city logistics operator can meet daily delivery demand at low cost while holding emissions and service shortfalls within firm limits, using a fleet that combines road vehicles with metro freight and last-mile drones. We framed the operator’s real-time channel-selection decision as a constrained Markov decision process in which the carbon cap and service requirements are explicit expected-value constraints on the daily budget rather than tunable penalty terms and solved it with a Lagrangian deep reinforcement-learning method that prices those constraints automatically rather than asking the operator to tune penalty weights. On synthetic city instances, the method reduced carbon-budget and time-window violations by roughly two orders of magnitude relative to a penalty-free scheduler with a modest increase in operating cost, leaving only a small residual overshoot driven by day-to-day demand variance rather than by any systematic breach.
The study’s main operational finding is that, in a city whose delivery economics vary across neighbourhoods, no single channel serves demand best. When the cost and carbon of each channel differ across the map, the policy that best meets demand within the carbon budget routes different orders through different channels, and a plain constrained learner does not discover this on its own. Our demonstration-regularized training scheme lets it do so, producing a per-order assignment that serves demand more cheaply than committing to any one channel while holding emissions close to the cap. A case study built from Nanjing’s metro topology and population-weighted demand confirmed the same behaviour on a realistic city geometry, where the learned road-and-metro per-order assignment served demand markedly more cheaply than any single-channel policy at comparable feasibility and within of an offline clairvoyant optimum while needing no demand foresight or emission model. Operator-facing tests further showed the same scheduler responds smoothly to a change in the carbon cap, a change in daily order volume, and a change in city scale, while a hand-tuned fixed-weight penalty PPO collapses to a single channel at every tested weight. Extending the study to a full road network with live metro timetables and to operational demand records and bringing the remaining operating limits into play are the natural next steps toward a deployable tool. External validation on operational data and integration with a live routing engine remain the pre-requisites for deployment.