Code and data for: Timing over routing – carbon-aware truck–drone delivery with swappable batteries under hourly grid carbon intensity

Published: 3 November 2026| Version 1 | DOI: 10.17632/9g4gdh5n78.1
Contributor:

Description

This dataset contains the complete code, the processed open input data and the raw results behind the article "Timing over routing: Carbon-aware truck–drone delivery with swappable batteries under hourly grid carbon intensity". The study examines whether the carbon footprint of electrified last-mile delivery depends on the hour in which electricity is drawn, and whether carbon-aware operation requires new routes or only re-timing. A mixed-integer model for parallel truck–drone delivery decides the van tour, the drone-or-van assignment of customers, sortie launch times, the charging start of every swappable battery pack and the van's overnight charging, and prices each kilowatt-hour at the hourly carbon intensity of the grid. The model is solved exactly by a logic-based Benders decomposition (HiGHS 1.15.1). All inputs are open: benchmark delivery instances on the road networks of Buffalo and Seattle (multiple flying sidekicks benchmark, Murray & Raj, 2020), hourly lifecycle and direct carbon intensity for 13 grids in 2021 (CarbonCast, Maji et al., 2022), the 2026 UK greenhouse gas conversion factors (DESNZ) and a summary of the Electricity Maps signal coverage file. Folders: code/ (model, decomposition algorithm, experiment drivers, analysis and figure scripts in Python), data/ (processed instances and hourly intensity series), results/ (one row per instance-day and planning policy, about 15,000 instance-day runs), tables/ (stats.json holds every number quoted in the article, plus summary tables), figures/ (TIFF at 1000 dpi and PNG). The files reproduce the main findings: annual-average factors misstate the emissions of a delivery day by more than 10% in 46% of cases and understate year-round emissions in 12 of 13 grids, and carbon-aware timing lowers realized emissions by 7.8% on average (up to 55%), almost entirely by re-timing charging and sorties rather than by re-routing.

Files

Steps to reproduce

1. Unzip the archive and install Python 3.10 or later with: pip install numpy pandas scipy matplotlib pillow highspy==1.15.1 2. Change to the code/ folder. 3. Statistics and tables from the supplied results: run "python analysis.py" and then "python make_tables.py". Outputs go to tables/ (stats.json, tables_results.md). 4. Figures 1–8: run "python fig_framework.py", "python fig_ci.py", "python fig_schedule.py" and "python fig_results.py 3 4 6 7 8". Outputs go to figures/. 5. To re-run the experiments from scratch, first move the supplied results/*.csv files elsewhere (the drivers skip runs that already exist). Then run "python run_exp.py <E1|E2|E3|E5|E6|E7> <worker_id> <n_workers> <deadline_seconds>", for example "python run_exp.py E1 0 1 1000000", and "python run_val.py V1 0 1" for the exactness check. Each instance-day is solved on one thread with a 600 s limit; the full set takes many CPU hours and can be split over parallel processes with worker_id and n_workers. Then repeat steps 3 and 4. Experiment codes: E1 main factorial, E2 pack inventory, E3 day-ahead information, E5 diesel van, E6 direct intensity, E7 year-round days, V1 exactness check.

Institutions

Categories

Operations Research, Mixed Integer Programming, Unmanned Aerial Vehicle (Space Vehicle), Environmental Impact of Carbon Emission

Licence