Files
Enterprise/t_alns_rrd_reproduction/README.md
huangfu 8ff9715fb7 Initial commit: T-ALNS-RRD paper reproduction project
- Paper: Optimizing urban last mile delivery efficiency (Liu & Wang, 2025)
- 5 algorithms: Static-VRPTW, TA-Greedy, ALNS-Base, T-ALNS, T-ALNS-RRD
- v1 baseline + v2 calibrated experiments with full results
- Tabu memory ablation study with convergence analysis
- Comprehensive final report (FINAL_REPORT.md)
2026-06-02 21:11:00 +08:00

4.8 KiB
Raw Blame History

T-ALNS-RRD Reproduction

Reproduction of the paper "Optimizing urban last mile delivery efficiency through dynamic vehicle routing heuristics and traffic flow analysis" (Liu & Wang, 2025).

Overview

This project reproduces the core algorithmic framework of T-ALNS-RRD using a custom synthetic dataset (methodological reproduction). The reproduction validates the following trends:

  1. Traffic-aware cost reduces congestion exposure
  2. ALNS provides further cost reduction over greedy heuristics
  3. Tabu memory improves solution stability
  4. RRD real-time dispatch handles disruption events

Project Structure

t_alns_rrd_reproduction/
├── configs/default.yaml         # All parameters (aligned with paper)
├── src/
│   ├── data_generator.py        # Synthetic data generation
│   ├── problem.py               # DVRPTW-TA formulation
│   ├── cost.py                  # Cost functions (Eq.1, Eq.16-17)
│   ├── baselines/
│   │   ├── static_vrptw.py      # Static VRPTW greedy
│   │   └── ta_greedy.py         # Traffic-aware greedy
│   ├── alns/
│   │   ├── operators_destroy.py # Destroy operators (random/worst/related)
│   │   ├── operators_repair.py  # Repair operators (greedy/regret2/time-window)
│   │   ├── acceptance.py        # Simulated annealing
│   │   └── alns_base.py         # ALNS-Base (Algorithm 1)
│   ├── tabu/
│   │   ├── move_tabu.py         # Move-based Tabu (Eq.22-23)
│   │   ├── solution_tabu.py     # Solution hash memory (Eq.24)
│   │   ├── frequency_memory.py  # Frequency matrices (Eq.25-26)
│   │   └── t_alns.py            # T-ALNS (Algorithm 2)
│   ├── rrd/
│   │   ├── event_generator.py   # Event detection (Eq.35)
│   │   ├── candidate_actions.py # Action generation
│   │   ├── rollout.py           # Rollout simulation (Eq.36-39)
│   │   ├── dispatch.py          # Dispatch decision (Eq.40-42)
│   │   └── t_alns_rrd.py        # T-ALNS-RRD (Algorithm 3)
│   ├── experiments/
│   │   └── run_main_comparison.py
│   └── visualization/
│       └── plot_results.py
├── data/synthetic/              # Generated datasets
├── results/                     # Experiment outputs
└── requirements.txt

Quick Start

# Install dependencies
pip install -r requirements.txt

# Generate data and run quick test
python3 -c "
from src.data_generator import DataGenerator
from src.problem import ProblemContext
from src.cost import CostCalculator
from src.alns.alns_base import ALNSBase
from src.tabu.t_alns import TALNS

data = DataGenerator(seed=42).generate_all()
ctx = ProblemContext(
    customers={c.customer_id: c for c in data['customers']},
    depot=data['depot'], traffic=data['traffic'],
    n_vehicles=data['n_vehicles'], vehicle_capacity=data['vehicle_capacity'],
)
cc = CostCalculator()

alns = ALNSBase(ctx, cc, config={'max_iterations': 100, 'time_limit_sec': 60})
result = alns.run(seed=42)
print(f'ALNS: Cost={result[\"total_cost\"]:.1f} OTDR={result[\"otdr\"]*100:.1f}%')

talns = TALNS(ctx, cc, config={'max_iterations': 100, 'time_limit_sec': 60})
result2 = talns.run(seed=42)
print(f'T-ALNS: Cost={result2[\"total_cost\"]:.1f} OTDR={result2[\"otdr\"]*100:.1f}%')
"

# Run full comparison experiment
python3 src/experiments/run_main_comparison.py

Key Algorithms

Algorithm Description Paper Reference
Static-VRPTW Greedy with static travel times Baseline 1
TA-VRPTW-Greedy Greedy with time-dependent costs Baseline 2
ALNS-Base Adaptive destroy-repair with SA Algorithm 1
T-ALNS ALNS + 3-layer Tabu memory Algorithm 2
T-ALNS-RRD T-ALNS + rollout-based dispatch Algorithm 3

Experiment Configurations

  • Dataset: 47 customers, 1 depot, 4 vehicles (120kg capacity)
  • Traffic: 12 one-hour intervals, 6:00-18:00
  • Area: 8 × 10 km² urban zone
  • Complete graph: 2,256 arcs, 81,200+ traffic data points

Results should show progressive improvement:

Static-VRPTW (highest cost, lowest OTDR)
  → TA-Greedy (reduced congestion)
  → ALNS-Base (further cost reduction)
  → T-ALNS (better stability)
  → T-ALNS-RRD (best under disruptions)

Reproduction Statement

Since the original dataset requires reasonable request to the authors and is not yet publicly available, this project constructs a custom synthetic dataset matching the experimental scale and structure described in the paper to reproduce its core algorithmic framework and comparative experimental logic. This is a methodological reproduction focused on verifying the relative impact of different algorithmic modules, not an exact numerical replication.