haileyhalimj@gmail.com
πŸ—‘οΈ Remove PostgreSQL database dependencies and related files
d45fa12
---
title: Supply Roster Optimization
emoji: πŸ“Š
colorFrom: blue
colorTo: green
sdk: streamlit
sdk_version: "1.28.0"
app_file: ui/app.py
pinned: false
---
# Supply Roster Optimization
A comprehensive Streamlit application for optimizing supply roster management using OR-Tools with improved code organization and readability.
## πŸš€ Quick Start
### Option 1: Using Main Entry Point (Recommended)
```bash
python main.py
```
### Option 2: Direct Streamlit Command
```bash
streamlit run ui/app.py
```
## πŸ“ Project Structure
```
SD_roster_real/
β”œβ”€β”€ main.py # Main entry point
β”œβ”€β”€ README.md
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ setup.py
β”‚
β”œβ”€β”€ src/ # Core business logic
β”‚ β”œβ”€β”€ config/ # Configuration management
β”‚ β”‚ β”œβ”€β”€ constants.py
β”‚ β”‚ β”œβ”€β”€ optimization_config.py
β”‚ β”‚ └── paths.yaml
β”‚ β”œβ”€β”€ models/ # Optimization models
β”‚ β”‚ └── optimizer_real.py
β”‚ β”œβ”€β”€ preprocess/ # Data preprocessing
β”‚ β”‚ β”œβ”€β”€ data_preprocess.py
β”‚ β”‚ β”œβ”€β”€ extract.py
β”‚ β”‚ β”œβ”€β”€ transform.py
β”‚ β”‚ └── ...
β”‚ └── visualization/ # Chart generation
β”‚ β”œβ”€β”€ hierarchy_dashboard.py
β”‚ └── kit_relationships.py
β”‚
β”œβ”€β”€ ui/ # Streamlit UI components
β”‚ β”œβ”€β”€ app.py # Main Streamlit app
β”‚ β”œβ”€β”€ pages/ # Page components
β”‚ β”‚ β”œβ”€β”€ config_page.py # Settings page
β”‚ β”‚ β”œβ”€β”€ optimization_results.py # Results page
β”‚ β”‚ └── __init__.py
β”‚ β”œβ”€β”€ components/ # Reusable UI components
β”‚ β”‚ └── __init__.py
β”‚ └── __init__.py
β”‚
β”œβ”€β”€ data/ # Data files
β”œβ”€β”€ notebook/ # Jupyter notebooks
└── venv/ # Virtual environment
```
## πŸ”§ Features
- **Multi-page Interface**: Clean separation of settings, results, and validation
- **Real-time Optimization**: OR-Tools powered workforce scheduling
- **Data Validation**: Comprehensive demand data validation and visualization
- **Cost Analysis**: Detailed cost breakdown and analysis
- **Hierarchy Management**: Kit dependency tracking and visualization
- **Flexible Configuration**: Extensive parameter customization
## πŸ“Š Usage
1. **Settings Page**: Configure optimization parameters, workforce limits, and cost rates
2. **Optimization Results**: View detailed results with charts and analysis
3. **Demand Validation**: Validate input data and identify potential issues
## πŸ› οΈ Development
The project follows a clean architecture with:
- **Separation of Concerns**: UI logic separated from business logic
- **Modular Design**: Reusable components and clear interfaces
- **Git-friendly**: Proper file organization with preserved Git history