This repository contains an algorithm for allocating instructors to courses. It utilizes maximum flow algorithms in networks to solve the allocation problem. The solution's description can be found here.
The repository includes two versions of the algorithm:
- Restricted Version: This version does not take into account a preference scale and only considers the possibility of allocating an instructor to a course. It is based on the implementation of the Edmonds-Karp algorithm.
- General Version: This version considers a preference scale, allowing instructors to prioritize certain courses over others. It is based on the implementation of a minimum-cost maximum flow algorithm.
To run the algorithm, follow these steps:
-
Clone the repository:
git clone https://github.com/Joao03Guilherme/instr-aloc
-
Navigate to the
Algoritmo_Geral
folder. -
Prepare the input data by updating the following two CSV files:
-
data.csv
: This file contains the input data for instructors. Each row represents an instructor and includes the following columns: "email," "interest," "name," and "possible_months" (this column can be omitted). -
course_data.csv
: This file contains data related to the staffing requirements for each course. It consists of three columns: "course," "min_staff," and "max_staff."
-
-
Execute the
instr_aloc_flow.py
file to run the algorithm.