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)
This commit is contained in:
149
t_alns_rrd_reproduction/configs/calibrated.yaml
Normal file
149
t_alns_rrd_reproduction/configs/calibrated.yaml
Normal file
@@ -0,0 +1,149 @@
|
||||
# Calibrated configuration (v2) for T-ALNS-RRD Reproduction
|
||||
# Key changes from default:
|
||||
# - 60 customers (was 47), 100kg capacity (was 120kg)
|
||||
# - Tighter time windows (30-90min vs 60-150min)
|
||||
# - θ=50 for CES scaling (was 1.0)
|
||||
# - 1000 iterations, 30 seeds, statistical testing
|
||||
# - More frequent & impactful RRD events
|
||||
|
||||
# Problem scale - HARDER THAN DEFAULT
|
||||
problem:
|
||||
n_customers: 55
|
||||
n_vehicles: 4
|
||||
depot_count: 1
|
||||
vehicle_capacity_kg: 115 # 120 → 115 (slightly tighter, still feasible)
|
||||
service_time_min: 4
|
||||
area_width_km: 8.0
|
||||
area_height_km: 10.0
|
||||
operating_start: 360
|
||||
operating_end: 1080
|
||||
n_time_intervals: 12
|
||||
|
||||
# Customer generation - MORE CONSTRAINED
|
||||
customers:
|
||||
demand_min_kg: 3
|
||||
demand_max_kg: 13 # 3 → 13 (was 15 - keep feasible)
|
||||
window_length_min: 30 # NEW: shortest window (min)
|
||||
window_length_max: 90 # NEW: longest window (min)
|
||||
time_window_categories:
|
||||
morning:
|
||||
earliest: 540
|
||||
latest: 720
|
||||
afternoon:
|
||||
earliest: 780
|
||||
latest: 960
|
||||
evening:
|
||||
earliest: 1020
|
||||
latest: 1200
|
||||
num_clusters: 3
|
||||
cluster_labels: ["residential", "commercial", "office"]
|
||||
|
||||
# Road network (unchanged)
|
||||
roads:
|
||||
types:
|
||||
arterial:
|
||||
speed_kmh: 45
|
||||
proportion: 0.25
|
||||
collector:
|
||||
speed_kmh: 30
|
||||
proportion: 0.35
|
||||
residential:
|
||||
speed_kmh: 20
|
||||
proportion: 0.40
|
||||
noise_std: 0.05
|
||||
use_complete_graph: true
|
||||
|
||||
# Traffic congestion - SCALED CES
|
||||
traffic:
|
||||
multipliers: [1.0, 1.0, 1.6, 1.6, 1.2, 1.2, 1.0, 1.0, 1.2, 1.2, 1.7, 1.7]
|
||||
congestion_scale_theta: 50.0 # 1.0 → 50.0 (CES into paper range)
|
||||
risk_aversion_beta: 0.3
|
||||
uncertainty_base: 0.05
|
||||
|
||||
# Cost function weights (unchanged)
|
||||
cost:
|
||||
lambda_lateness: 1.0
|
||||
lambda_congestion: 1.0
|
||||
lambda_stability: 0.3
|
||||
|
||||
# ALNS parameters - MORE ITERATIONS
|
||||
alns:
|
||||
max_iterations: 1000 # Always run full iterations
|
||||
time_limit_sec: 600
|
||||
destroy_ratio_min: 0.1
|
||||
destroy_ratio_max: 0.4
|
||||
initial_temperature_factor: 0.05
|
||||
cooling_rate: 0.99975
|
||||
reaction_factor: 0.1
|
||||
segment_length: 100
|
||||
stall_limit: 400 # 200 → 400 (allow longer search)
|
||||
max_attempts: 5
|
||||
reward_global_best: 1.0
|
||||
reward_improvement: 0.5
|
||||
reward_accepted: 0.2
|
||||
reward_rejected: 0.0
|
||||
|
||||
# Tabu memory parameters (unchanged)
|
||||
tabu:
|
||||
move_tabu:
|
||||
tenure: 7
|
||||
tenure_min: 3
|
||||
tenure_max: 12
|
||||
overlap_threshold: 0.5
|
||||
stall_for_increase: 50
|
||||
solution_tabu:
|
||||
tenure: 15
|
||||
buffer_size: 1000
|
||||
hash_prime: 1000000007
|
||||
frequency:
|
||||
normalization_factor: 2
|
||||
normalization_interval: 50
|
||||
diversification:
|
||||
delta_max: 0.7
|
||||
eta_balance: 0.5
|
||||
weights: [0.4, 0.3, 0.3]
|
||||
aspiration:
|
||||
beta_threshold: 0.3
|
||||
gamma_threshold: 0.8
|
||||
|
||||
# RRD parameters - MORE EVENTS
|
||||
rrd:
|
||||
rollout:
|
||||
horizon_min_min: 30
|
||||
horizon_max_min: 120
|
||||
urgency_alpha: 1.0
|
||||
n_sim_min: 5 # 2 → 5
|
||||
n_sim_max: 30 # 50 → 30
|
||||
mc_iterations: 50
|
||||
time_overhead_ms: 10
|
||||
time_per_sim_ms: 50
|
||||
dispatch:
|
||||
weight_rollout: 0.4
|
||||
weight_stability: 0.3
|
||||
weight_recovery: 0.3
|
||||
tabu:
|
||||
penalty: 50.0
|
||||
bonus: 25.0
|
||||
events:
|
||||
urgency_threshold: 0.3 # 0.5 → 0.3 (easier to trigger)
|
||||
event_probability: 0.5 # NEW: event check probability
|
||||
event_check_interval: 5 # NEW: check every N iterations
|
||||
weights:
|
||||
E1_traffic: [0.5, 0.3, 0.2]
|
||||
E2_urgent: [0.7, 0.1, 0.2]
|
||||
E3_capacity: [0.3, 0.4, 0.3]
|
||||
E4_timewindow: [0.8, 0.1, 0.1]
|
||||
max_actions: 20
|
||||
|
||||
# Experiment settings - MORE SEEDS + STATISTICAL TESTING
|
||||
experiments:
|
||||
random_seeds: 30 # 5 → 30 (paper standard)
|
||||
seed_start: 1
|
||||
report_mean_std: true
|
||||
statistical_testing: true # NEW: run paired t-tests
|
||||
sensitivity:
|
||||
fleet_sizes: [2, 3, 4, 5, 6]
|
||||
customer_counts: [30, 40, 47, 60]
|
||||
capacities: [80, 100, 120, 140, 160]
|
||||
robustness:
|
||||
sigma_values: [0.1, 0.2, 0.3, 0.5]
|
||||
145
t_alns_rrd_reproduction/configs/default.yaml
Normal file
145
t_alns_rrd_reproduction/configs/default.yaml
Normal file
@@ -0,0 +1,145 @@
|
||||
# Default configuration for T-ALNS-RRD Reproduction
|
||||
# All parameters aligned with the original paper.
|
||||
|
||||
# Problem scale (paper §4.2)
|
||||
problem:
|
||||
n_customers: 47
|
||||
n_vehicles: 4
|
||||
depot_count: 1
|
||||
vehicle_capacity_kg: 120
|
||||
service_time_min: 4
|
||||
area_width_km: 8.0
|
||||
area_height_km: 10.0
|
||||
operating_start: 360 # 6:00 AM in minutes (0 = midnight)
|
||||
operating_end: 1080 # 6:00 PM in minutes
|
||||
n_time_intervals: 12 # H = 12 one-hour intervals
|
||||
|
||||
# Customer generation (paper §4.2)
|
||||
customers:
|
||||
demand_min_kg: 3
|
||||
demand_max_kg: 12
|
||||
time_window_categories:
|
||||
morning:
|
||||
earliest: 540 # 9:00
|
||||
latest: 720 # 12:00
|
||||
afternoon:
|
||||
earliest: 780 # 13:00
|
||||
latest: 960 # 16:00
|
||||
evening:
|
||||
earliest: 1020 # 17:00
|
||||
latest: 1200 # 20:00
|
||||
num_clusters: 3
|
||||
cluster_labels: ["residential", "commercial", "office"]
|
||||
|
||||
# Road network (paper §3.2)
|
||||
roads:
|
||||
types:
|
||||
arterial:
|
||||
speed_kmh: 45
|
||||
proportion: 0.25
|
||||
collector:
|
||||
speed_kmh: 30
|
||||
proportion: 0.35
|
||||
residential:
|
||||
speed_kmh: 20
|
||||
proportion: 0.40
|
||||
noise_std: 0.05 # base travel time noise
|
||||
use_complete_graph: true
|
||||
|
||||
# Traffic congestion (paper §3.2, Table in §4.3)
|
||||
traffic:
|
||||
# hourly congestion multipliers (6:00-7:00, ..., 17:00-18:00)
|
||||
multipliers: [1.0, 1.0, 1.6, 1.6, 1.2, 1.2, 1.0, 1.0, 1.2, 1.2, 1.7, 1.7]
|
||||
congestion_scale_theta: 1.0 # θ in Eq.9
|
||||
risk_aversion_beta: 0.3 # β in Eq.10
|
||||
uncertainty_base: 0.05 # base uncertainty proportion of travel time
|
||||
|
||||
# Cost function weights (paper Eq.1)
|
||||
cost:
|
||||
lambda_lateness: 1.0 # λ₁
|
||||
lambda_congestion: 1.0 # λ₂
|
||||
lambda_stability: 0.3 # λ₃ (for RRD only)
|
||||
|
||||
# ALNS parameters (paper §3.3.1)
|
||||
alns:
|
||||
max_iterations: 1000
|
||||
time_limit_sec: 600
|
||||
destroy_ratio_min: 0.1 # α_min
|
||||
destroy_ratio_max: 0.4 # α_max
|
||||
initial_temperature_factor: 0.05 # T₀ = factor × Z(S⁰)
|
||||
cooling_rate: 0.99975 # γ in Eq.21
|
||||
reaction_factor: 0.1 # ξ in Eq.19
|
||||
segment_length: 100 # π iterations for weight update
|
||||
stall_limit: 200 # T_stall consecutive no-improvement
|
||||
max_attempts: 5 # max attempts per candidate generation
|
||||
# Reward levels (σ₁, σ₂, σ₃, σ₄)
|
||||
reward_global_best: 1.0
|
||||
reward_improvement: 0.5
|
||||
reward_accepted: 0.2
|
||||
reward_rejected: 0.0
|
||||
|
||||
# Tabu memory parameters (paper §3.3.2)
|
||||
tabu:
|
||||
move_tabu:
|
||||
tenure: 7 # τ_move initial
|
||||
tenure_min: 3
|
||||
tenure_max: 12
|
||||
overlap_threshold: 0.5 # μ in Eq.23
|
||||
stall_for_increase: 50 # τ_stall for adaptive tenure
|
||||
solution_tabu:
|
||||
tenure: 15 # τ_sol
|
||||
buffer_size: 1000
|
||||
hash_prime: 1000000007
|
||||
frequency:
|
||||
normalization_factor: 2 # κ in Eq.33
|
||||
normalization_interval: 50 # ν in Eq.33
|
||||
diversification:
|
||||
delta_max: 0.7 # δ_max in Eq.27
|
||||
eta_balance: 0.5 # η in Eq.28
|
||||
weights: [0.4, 0.3, 0.3] # ω₁, ω₂, ω₃ in Eq.27
|
||||
aspiration:
|
||||
beta_threshold: 0.3 # β in Eq.30
|
||||
gamma_threshold: 0.8 # γ in Eq.31
|
||||
|
||||
# RRD parameters (paper §3.3.3)
|
||||
rrd:
|
||||
rollout:
|
||||
horizon_min_min: 30 # H_min
|
||||
horizon_max_min: 120 # H_max
|
||||
urgency_alpha: 1.0 # α_urgency
|
||||
n_sim_min: 2 # N_min
|
||||
n_sim_max: 50 # N_max
|
||||
mc_iterations: 50 # Monte Carlo iterations
|
||||
time_overhead_ms: 10
|
||||
time_per_sim_ms: 50
|
||||
dispatch:
|
||||
# Weights for composite score (Eq.40)
|
||||
weight_rollout: 0.4 # ω₁
|
||||
weight_stability: 0.3 # ω₂
|
||||
weight_recovery: 0.3 # ω₃
|
||||
tabu:
|
||||
penalty: 50.0 # τ_penalty in Eq.39
|
||||
bonus: 25.0 # τ_bonus in Eq.39
|
||||
events:
|
||||
urgency_threshold: 0.5 # trigger threshold
|
||||
# Event weights (α_e, β_e, γ_e in Eq.35)
|
||||
weights:
|
||||
E1_traffic: [0.5, 0.3, 0.2]
|
||||
E2_urgent: [0.7, 0.1, 0.2]
|
||||
E3_capacity: [0.3, 0.4, 0.3]
|
||||
E4_timewindow: [0.8, 0.1, 0.1]
|
||||
max_actions: 20 # |A_e| ≤ 20
|
||||
|
||||
# Experiment settings (paper §4.8, §5)
|
||||
experiments:
|
||||
random_seeds: 30 # 30 runs per configuration
|
||||
seed_start: 1 # seed range: 1..30
|
||||
report_mean_std: true
|
||||
# Sensitivity analysis ranges (paper §5.1)
|
||||
sensitivity:
|
||||
fleet_sizes: [2, 3, 4, 5, 6]
|
||||
customer_counts: [30, 40, 47, 60]
|
||||
capacities: [80, 100, 120, 140, 160]
|
||||
# Uncertainty levels (paper §5.2)
|
||||
robustness:
|
||||
sigma_values: [0.1, 0.2, 0.3, 0.5]
|
||||
Reference in New Issue
Block a user