Spaces:
Sleeping
Sleeping
File size: 2,757 Bytes
a789dba bb1c643 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
---
title: OperationsResearch
emoji: π₯
colorFrom: gray
colorTo: yellow
sdk: gradio
sdk_version: 5.29.0
app_file: app.py
pinned: false
license: mit
short_description: This project demonstrates the use of Linear Programming (PL)
---
<h1 align="center">Operations Research Web Application</h1>
<p align="center">
<img src="https://insat.rnu.tn/assets/images/logo_c.png" width="100" alt="INSAT Logo"><br><br>
<a href="https://kacemath-operations-research.hf.space/" target="_blank">
<img src="https://img.shields.io/badge/HuggingFace-Space-blue?logo=huggingface" alt="Try it on Hugging Face Spaces" />
</a>
</p>
This project demonstrates the use of **Linear Programming (PL)** and **Mixed-Integer Linear Programming (PLNE)** for solving real-world optimisation problems using **Gurobi**. It uses **Gradio** to provide an interactive web interface.
## Features
- **Production Planning (PL):** Optimises the number of products to manufacture for maximum profit under resource constraints.
- **Staff Scheduling (PLNE):** Mock assignment of employees to shifts based on availability.
## Project Structure
```
.
βββ app.py # Main entry point of the Gradio application
βββ assets/
β βββ compte_rendu.pdf # Project report
βββ models/
β βββ gurobi_models.py # Gurobi-based solvers for PL and PLNE
βββ ui/
β βββ gradio_sections.py # UI layout and Gradio component logic
βββ requirements.txt # Python dependencies
βββ README.md # Project documentation
````
## Prerequisites
- Python 3.9 or higher
## Environment Setup
### 1. Clone the repository
```bash
git clone https://github.com/KacemMathlouthi/OperationsResearch.git
cd OperationsResearch
````
### 2. Create and activate a virtual environment
#### Linux/macOS
```bash
python3 -m venv venv
source venv/bin/activate
```
#### Windows
```cmd
python -m venv venv
venv\Scripts\activate
```
### 3. Install dependencies
```bash
pip install -r requirements.txt
```
## Running the Application
Ensure you are in the project root directory and your virtual environment is activated:
```bash
python app.py
```
The application will launch locally at `http://127.0.0.1:7860/`.
## Usage
### Tabs Available:
* **Project Info:** Displays team information and a PDF report.
* **Production Planning (PL):** Solve and visualise a linear programming problem using product and resource data.
* **Staff Scheduling (PLNE):** Simulated assignment of employees to shifts based on availability.
## Notes
* Visualisations are generated with `matplotlib`.
* UI built with `Gradio Blocks` using tabbed layout.
* PDF report embedded with base64 encoding.
|