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