Skip to content

slavagorch/football_scheduling_optimization

Repository files navigation

Football Schedule Optimization with Pyomo

This repository contains code for optimizing football league schedules using Pyomo, a Python-based optimization modeling language. The optimization model is demonstrated using the example of Bundesliga schedule planning.

Medium Article

Here is a Medium article that describes what we are going here with football league schedule optimization :)

Quick start

Run the model with the following:

  • Option 1: python main.py
  • Option 2: streamlit run streamlit_app.py

Introduction

Crafting a football league schedule involves various considerations such as fairness, balance for each team, international competitions, and minimizing travel. This project explores how mathematical optimization can tackle these challenges, focusing on the Bundesliga schedule.

Data

Bundesliga results from 1993–2022 are utilized to define team characteristics, while season 21–22 serves as the basis for building the league schedule. Additionally, the coordinates of each club's stadium are used to consider distances while constructing the optimization model.

Optimization Model

The goal of the optimization model is to assign match round numbers for each fixture, ensuring fairness and adherence to various constraints. Pyomo is employed to formulate the model's constraints and objective function.

Schedule

The optimized Bundesliga schedule is reconstructed using boolean variables generated by the optimization model, ensuring fairness, minimized travel, and an exciting season for football fans.


Feel free to explore the code and adapt it for your own scheduling projects! If you have any questions or suggestions, please don't hesitate to reach out. Let's optimize football schedules together! 🏆⚽

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published