Files
aircraftrouting_arara/scripts/03_run_optimization_pipeline.py
Eduardo Carlos 3607965c88 Add OARMP routing engine, dashboard and documentation
- Complete routing engine: ingest, optimizer (CG+B&B), maintenance
  monitor, metrics, pipeline, quality checks
- Streamlit dashboard with Input/Output tab structure, editable data
  editors, interactive Folium map with satellite layer and maintenance
  base highlights, FH stacked bar chart with TTM availability
- CSV data files: AERONAVES, CHECKS, AIRPORTS, ESCALA DE VOO
- README, CONTEXTO and CHANGELOG added
- Remove legacy pre_process scripts and raw binary files (PDFs/xlsx)
- Update .gitignore to exclude outputs/, data/, raw/*.pdf, raw/*.xlsx

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 11:52:34 -03:00

45 lines
1.2 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""
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))