Update warehouse digital twin and robot fleet optimization
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from warehouse_twin.optimization.layout_optimizer import (
|
||||
LayoutOptimizer, LayoutVariant
|
||||
)
|
||||
|
||||
def main():
|
||||
opt = LayoutOptimizer()
|
||||
orders_p = "data/input/demo_orders.csv"
|
||||
print("=== Testing Stage 3 Hybrid Optimal (Unmodified) ===")
|
||||
res_a = opt.run_variant_experiment(
|
||||
variant=LayoutVariant.HYBRID_OPTIMAL,
|
||||
duration_seconds=3600.0,
|
||||
seed=42,
|
||||
output_dir="results/experiments/test_cand_a",
|
||||
orders_file=orders_p,
|
||||
preventive_traffic_coordination=True,
|
||||
)
|
||||
rep_a = res_a.kpi_report
|
||||
print(f"Candidate A (Stage 3 Baseline):")
|
||||
print(f" Throughput: {rep_a.throughput_tasks_per_hour:.1f} tasks/hr")
|
||||
print(f" Completed: {rep_a.tasks_completed}/{rep_a.tasks_created}")
|
||||
print(f" Turnaround mean: {rep_a.turnaround_time.mean:.2f}s | p90: {rep_a.turnaround_time.p90:.2f}s")
|
||||
print(f" Total Distance: {rep_a.total_travel_distance_meters:.2f}m (Loaded: {rep_a.loaded_distance_ratio_percent:.1f}%)")
|
||||
print(f" Total Energy: {rep_a.total_energy_consumed_kwh:.4f} kWh ({rep_a.energy_intensity_kwh_per_task:.4f} kWh/task)")
|
||||
print(f" Conflicts: {rep_a.conflicts_detected} | Unresolved: {rep_a.unresolved_conflicts} | Wait: {rep_a.total_yield_wait_time_seconds:.1f}s")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user