""" Script 03 – Run the full optimisation pipeline. Loads data, builds the network, runs Column Generation + B&B, and prints the solution. All outputs are saved to outputs/ automatically. """ import sys from pathlib import Path ROOT = Path(__file__).resolve().parents[1] sys.path.insert(0, str(ROOT)) from src.routing_engine import RoutingPipeline, DEFAULT_CONFIG cfg = DEFAULT_CONFIG # Adjust parameters here if needed: # cfg.tat_minutes = 60 # cfg.mip_time_limit_seconds = 120 pipe = RoutingPipeline(cfg) result = pipe.run(save_outputs=True) print("\n" + "=" * 60) print("SOLUTION SUMMARY") print("=" * 60) s = result["summary"] for k, v in s.items(): print(f" {k:<35} {v}") print("\n-- Schedule ----------------------------------------------") sched = result["schedule"] if not sched.empty: print(sched[["aircraft", "ofrag_id", "departure", "arrival", "flight_hours", "maintenance_before"]].to_string(index=False)) print("\n-- Maintenance events -------------------------------------") maint = result["maintenance"] if maint.empty: print(" No forced maintenance events.") else: print(maint.to_string(index=False)) print("\n-- Fleet utilisation --------------------------------------") print(result["fleet"].to_string(index=False))