An AI-powered airline operations management dashboard designed to optimize flight schedules at busy airports like Mumbai (BOM) and Delhi (DEL). This system helps operations teams identify optimal time slots, predict delays, and minimize cascading impacts through intelligent scheduling.
Due to capacity limitations and heavy passenger load, flight operations at busy airports are becoming a scheduling nightmare. Controllers and operators need to find efficiency in scheduling within system constraints and find means to de-congest flight traffic.
- Intelligent Data Transformer: Auto-normalizes uploaded Excel/CSV files into standardized format
- AI-Powered Analytics: Real-time insights using Google Gemini AI integration
- Delay Prediction: Machine learning models for predicting flight delays
- Schedule Optimization: Recommends optimal time slots to reduce congestion
- Cascade Impact Analysis: Identifies flights with highest cascading delay impact
- Runway Utilization: Optimizes runway capacity and usage patterns
- NLP Query Interface: Natural language processing for operational queries
- Interactive Dashboard: Comprehensive Streamlit-based visualization
- Python: 3.10 or higher
- Operating System: Windows / macOS / Linux
- Package Manager: pip
- Memory: 4GB RAM minimum (8GB recommended for large datasets)
Flight-Schedule-Optimization/
βββ app/
β βββ main.py # Main Streamlit application
β βββ main_updated.py # Updated version with enhancements
βββ src/
β βββ data_processor.py # Data processing and transformation
β βββ optimizer.py # Schedule optimization algorithms
β βββ predictor.py # ML models for delay prediction
β βββ anomaly_detector.py # Anomaly detection in flight patterns
β βββ peak_time_analyzer.py # Peak time analysis
β βββ cascade_delay_predictor.py # Cascade delay analysis
β βββ nlp_query_processor.py # Natural language query processing
β βββ advanced_optimizer.py # Advanced optimization algorithms
βββ data/
β βββ flight_schedule_data.csv # Sample flight data
β βββ optimized_schedule.csv # Optimized schedule output
β βββ Flight_Data.xlsx # Sample Excel data
βββ notebooks/
β βββ flight_analysis.ipynb # Jupyter notebook for analysis
βββ docs/
β βββ flight_radar_integration.md
β βββ openai_setup.md
βββ requirements.txt # Python dependencies
βββ .env.example # Environment variables template
βββ README.md # This file
git clone https://github.com/monu808/Flight-Schedule-Optimization.git
cd Flight-Schedule-OptimizationWindows (PowerShell):
python -m venv .venv
.\.venv\Scripts\Activate.ps1macOS/Linux:
python -m venv .venv
source .venv/bin/activatepip install -r requirements.txtCreate a .env file in the root directory:
GEMINI_API_KEY=your_gemini_api_key_here
OPENAI_API_KEY=your_openai_api_key_here # Optional
TIME_SLOT_DURATION=15
MIN_TURNAROUND_TIME=45
RUNWAY_09R_27L_CAPACITY=30
RUNWAY_09L_27R_CAPACITY=30
RUNWAY_14_32_CAPACITY=25streamlit run app/main.pyThe application will open in your browser at http://localhost:8501
The application expects flight schedule data with the following columns:
| Column | Type | Required | Description |
|---|---|---|---|
FlightNumber |
String | Yes | Flight identifier (e.g., AI101, 6E234) |
Airline |
String | Yes | Airline code or name |
Scheduled_Departure |
DateTime | Yes | Scheduled departure time |
Scheduled_Arrival |
DateTime | Yes | Scheduled arrival time |
Actual_Departure |
DateTime | No | Actual departure time |
Actual_Arrival |
DateTime | No | Actual arrival time |
Runway |
String | No | Runway identifier |
Origin |
String | Yes | Origin airport code |
Destination |
String | Yes | Destination airport code |
Delay_Minutes |
Numeric | No | Computed if missing |
The system includes an intelligent data transformer that:
- Auto-detects common column names and maps them to canonical names
- Parses multiple datetime formats automatically
- Computes delay minutes when actual times are available
- Fills missing required columns where possible
- Reports unmappable columns for manual review
Upload any Excel/CSV file through the dashboard - the transformer will handle format conversion automatically.
The application supports Google Generative AI (Gemini) for intelligent insights:
-
API Key Setup: Set your API key in the
.envfile:GEMINI_API_KEY=your_api_key_here
-
Response Format: The system is configured for concise metric responses by default
-
Common Issues:
- 404 models/gemini-pro: Update model name in
app/main.pytogemini-1.5-flashorgemini-1.5-pro - Rate Limits: The system gracefully falls back to local analysis mode
- 404 models/gemini-pro: Update model name in
When AI services are unavailable, the system provides:
- Built-in recommendation engine
- Local statistical analysis
- Basic optimization algorithms
- Upload Data: Use the sidebar file upload to import Excel/CSV files
- Review Mapping: Check the intelligent transformation preview
- Apply Filters: Filter by airport, date range, airline, etc.
- Get AI Insights: Click quick-action buttons for optimization, risk, and revenue analysis
- Schedule Tuning: Use the simulator to test alternate schedules
- Export Results: Download optimized schedules and analysis reports
- π Dashboard: Overview of flight operations and key metrics
- π§ Optimization & AI: Schedule optimization and AI-powered insights
- π Query Interface: Natural language queries for operational questions
- π Analytics: Detailed performance analytics and predictions
- βοΈ Advanced: ML models, anomaly detection, and cascade analysis
- Streamlit won't start: Ensure virtual environment is activated and dependencies installed
- Large file hangs: Use smaller data samples for initial testing
- AI responses too long: Adjust prompt settings in
app/main.py - Missing packages: Run
pip install -r requirements.txtagain - Memory issues: Increase system memory or reduce dataset size
- Use data filtering to reduce processing load
- Enable caching for repeated operations
- Close unused browser tabs when running large analyses
# Install development dependencies
pip install -r requirements.txt
pip install pytest black flake8 mypy
# Run tests
pytest src/
# Code formatting
black src/ app/
# Linting
flake8 src/ app/- Data Layer:
src/data_processor.pyhandles data ingestion and transformation - ML Layer:
src/predictor.py,src/anomaly_detector.pyfor predictive analytics - Optimization Layer:
src/optimizer.py,src/advanced_optimizer.pyfor scheduling - UI Layer:
app/main.pyStreamlit dashboard - AI Layer: NLP processing and Gemini integration
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Keep changes focused and well-documented
- Add tests for new functionality
- Follow existing code style and conventions
- Update documentation for new features
This project is licensed under the MIT License - see the LICENSE file for details.
- FlightRadar24: https://www.flightradar24.com
- FlightAware: https://www.flightaware.com
- Mumbai Airport (BOM): https://www.flightradar24.com/data/airports/bom
- Delhi Airport (DEL): https://www.flightradar24.com/data/airports/del
This project addresses the Honeywell Hackathon challenge for flight schedule optimization by:
- β Analyzing flight data from busy airports using open-source AI tools
- β Finding optimal takeoff/landing times through scheduled vs actual time analysis
- β Identifying busiest time slots to avoid congestion
- β Providing schedule tuning models with delay impact visualization
- β Isolating high-impact flights that cause cascading delays
- β Offering NLP interface for natural language queries