Medway Student Allocation

08 Aug 2020

What is medway?

Medway João Pessoa is a preparatory course for ENEM (Brazilian SAT) and other tests (private universities). Medway has more than 200 students enrolled and counts with a system that’s different from its competitors. The difference relies on the way the company treats its students. Medway has several workers that have experience with ENEM and are responsible for advising the students in their studies and life. These employees are called assessor (some kind of Advisor/Organizer) who usually are students that have already passed the ENEM with high scores and are considered communicative.

Problem Overview

The problem here is that each advisor has normally 16 students with whom he must speak weekly, to know how they are doing on their studies, how were their grades on the mock tests, and how are they doing in general. However, these students are allocated without constraints. Therefore, some advisors get students that are not 100% compatible with them, and that need more attention during the week. These two problems are responsible for difficulting the job and for burning out some of the advisors.

With this scenario in mind, my main objective in this work was trying to make things more balanced, so the students and the advisors can enjoy their roles in the best way possible while having a maximized total compatibility.

Tools Used

Data Production

In view of this, I thought of crafting some sort of compatibility metric. With the help of my bosses and some of the college professors, I have made a Google forms with questions about different aspects of each student and each advisor’s life. Some of the information that was asked is listed below:

The main concern in asking so many questions from different life aspects was to make a good compatibility modeling.

After deciding the questions, I have sent the Google Forms link for all the 250+ students and all the 18 advisors. After that I made another document where I asked each advisor to write how much time they used to spend with each of their students in the following scale (In minutes):

The main concern in asking so many questions from different life aspects was to make a good compatibility modeling.

After deciding the questions, I have sent the Google Forms link for all the 250+ students and all the 18 advisors. After that I made another document where I asked each advisor to write how much time they used to spend with each of their students in the following scale (In minutes):

between 5 between 5 and 10 between 10 and 15 between 15 and 20 between 20 and 25 25+
0 1 2 3 4 5
As in all project that depends on too many factors, although all the advisors had responded, I ended up with 170 student responses.

Preprocessing

To compute the compatibility matrix, as the main objective of this project is to model the problem matematically and allocate the students, I chose a simple correlation function. The matrix consists of a i × j matrix, where i is the number of students and j is the number of advisors.

For each question with equal responses it was computed +1 in the pair [student,advisor].

Some of the questions were also used for constraints purposes. The preference for the advisor being from the same sex, for example, resulted in a negative M in the compatibility matrix, therefore eliminating that possibility. I also determined that each advisor could only receive students that were in a maximum one year older than them, adding new big negatives Ms in the matrix.

We joined three data sources: the IBGE code table and the cities latitude/longitude table, together with the ApoiaSUS website export, to compute approximate distances.

The result was a table like:

A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 ...
S0 11 -10000 -10000 15 -10000 13 -10000 13 -10000 16 -10000 ...
S1 12 13 10 13 14 10 12 13 16 15 14 ...
S2 14 -10000 -10000 18 -10000 13 -10000 16 -10000 20 -10000 ...
S3 -10000 14 -10000 -10000 -10000 14 12 -10000 17 -10000 -10000 ...
S4 12 16 11 16 13 13 13 15 15 13 10 ...
... ... ... ... ... ... ... ... ... ... ... ... ...
S152 12 11 9 11 13 14 13 14 11 13 11 ...
S153 11 10 13 10 11 13 12 10 11 12 11 ...
S154 14 16 13 11 13 15 9 17 17 13 15 ...
S155 10 -10000 -10000 12 -10000 11 -10000 13 -10000 13 -10000 ...
S156 14 11 12 10 10 12 8 10 10 10 12 ...

157 rows × 15 columns

The names and the preprocessing scripts were omitted since the information gathered in this project is private and was not authorized to be published.

Modeling

Sets
Data

The fixed time and fixed students were used to handle missing survey responses. Students who didn’t respond remained with their current advisors, so each advisor starts with \( f_j \) students and \( t_j \) time.

Constants
Decision variables

\( x_{i,j} \in \{0,1\} \), indicating whether student \(i\) is assigned to advisor \(j\).

Objective function

Maximize total compatibility:

\[ \sum_{i \in S} \sum_{j \in A} c_{i,j} \, x_{i,j} \]

Constraints
  1. Each student must have exactly one advisor:
    \[ \sum_{j \in A} x_{i,j} = 1 \quad \forall i \in S \]
  2. Bound students per advisor (use band \(\{N-1, N, N+1\}\) if needed):
    \[ f_j + \sum_{i \in S} x_{i,j} \approx N \quad \forall j \in A \]
  3. Limit advisor time (or bound within an interval):
    \[ t_j + \sum_{i \in S} w_i \, x_{i,j} = T \quad \forall j \in A \]

Results and Comparisons

Using the model that I have made led to an optimal solution to the problem. Apart from having the maximum compatibility possible (using the metric previously presented), the problem also tackled the imbalances in the previous allocation.

The average time is 60 (in the scale of time mentioned in data production). However, before using the model, the standard deviation of each advisor's time was 11.65, which was reduced to 0.8. In addition, the number of students for each advisor's standard deviation was 1.18 and ended up being 0.5.

In summary, the modeling was able to distribute the students to maximizing the compatibility and balancing the job for each advisor, since they all get paid the same.

The optimization code can be found here

Improvements and Future Works

Improvements:

Future works:


Questions?

You can reach me out on any social media at the end of the page.