Skip to content

samirsaci/workforce-planning

Repository files navigation

Optimise Workforce Planning using Linear Programming with Python 👷

What is the minimum number of temporary workers you need to hire to absorb your weekly workload while ensuring employee retention?

A diagram showing different aspects of the workforce planning problem, including time constraints, tasks planning, schedule constraints, workload forecasting, and workforce planning. The diagram outlines how these factors interact to optimize workforce management with Python.

Youtube Video

Find in the link below a short animated video to explain the concept behind this solution:

Explainer Video Link

Article

In this Article, we will build a linear optimisation to calculate the number of workers needed to ensure the proper resource allocation while reducing costs.

This is an image

Code

In this repository, you will find all the code used to explain the concepts presented in the article.

Files

  • Linear Optimization Examples.ipynb - Jupyter notebook with step-by-step analysis
  • workforce_planning.py - Standalone Python script

Getting Started

This project uses uv for dependency management.

# Install dependencies
uv sync

# Run the Python script
uv run python workforce_planning.py

# Or launch Jupyter notebook
uv run jupyter notebook

Dependencies

  • pandas
  • pulp
  • matplotlib
  • jupyter

About me 🤓

Senior Supply Chain and Data Science consultant with international experience working on Logistics and Transportation operations.
For consulting or advising on analytics and sustainable supply chain transformation, feel free to contact me via Logigreen Consulting.
For more case studies, check my Personal Website.