OperationsResearch / README.md
Kacemath's picture
Feat: Project Deployment on huggingface spaces
bb1c643

A newer version of the Gradio SDK is available: 6.4.0

Upgrade
metadata
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)

Operations Research Web Application

INSAT Logo

Try it on Hugging Face Spaces

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

git clone https://github.com/KacemMathlouthi/OperationsResearch.git
cd OperationsResearch

2. Create and activate a virtual environment

Linux/macOS

python3 -m venv venv
source venv/bin/activate

Windows

python -m venv venv
venv\Scripts\activate

3. Install dependencies

pip install -r requirements.txt

Running the Application

Ensure you are in the project root directory and your virtual environment is activated:

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.