Skip to content

JonathanDoanePhD/Student-Schedule-Grouping-with-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Files

Your own csv (or my SAMPLE_Rosters.csv)
BLACK_BOX.ipynb

This file contains all of the functions/code to generate groups for you.

Group_Generator.ipynb

This file is a guide which collects the required inputs from you, then outputs a group assignment for you to vet.

Group Generator

Overview

INPUT:

CSV of students with their available meeting times and preferred partners
(and accompanying column names, keywords, and similar information).

BLACK BOX:

(See Methodology, below.)

OUTPUT:

Optimally sized groups which share a common meeting time and includes preferred partners whenever possible.

Methodology

We use an adapted version of the following:

https://stackoverflow.com/questions/67391919/algorithm-to-group-people-together-based-on-their-available-timeslots-calendar

Based on the number of students you have and the maximum number of groups you would like formed, calculate the optimal group sizes.

For each student, record which time slots are marked available and which partners are preferred.
Sort students from the least number of availabilities to the most.

For each time slot, record how many students are available at that time.
Sort time slots from the least number of availabilities to the most.

We connect students with their preferred partners; considering connections as transitive, we form connected components.
(Try to keep the connected components as large as possible, but especially try to keep the double-connections where two students both request to work with the other.)

Execute the following pseudocode:

while not an impossible grouping:

remove 0, or 1, or 2, or... weak/single connections in order to make student groups more flexible

if all weak/single connections are removed:

remove 0, or 1, or 2, or... strong/double connections in order to make student groups more flexible

group the (smaller) connected components into Group 1, Group 2, ...

fill Group 1, Group 2, ... with students who have few available times first, then with students who have many available times, as needed
(any student who cannot fit into an already established group goes on to establish a new group)

if the number of groups exceeds the maximum number acceptable, or if a group size is too small/large:

this grouping is considered impossible and we will retry by removing even more connections than on this try

if that fails:

randomly shuffle students/time slot and try the while loop again

if every attempt has still failed:

accept the best recorded attempt

About

Forms student groups based on availability and preferred partners from input CSV. Outputs optimally sized groups (4-7 students) with shared meeting times and preferred partner inclusion. Easy student group organization.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors