Student Allocations

DesiMcK

New Member
Joined
Apr 5, 2022
Messages
6
Office Version
  1. 365
Platform
  1. MacOS
Hi

I have a tricky problem that I cannot solve and I hope someone will be able to assist me. Thank you in advance for any assistance.

We are running two sets of extra-curricular lessons and students have chosen two of out 23 options. Each option has maximum and I need to allocate fairly. If a students does not get their first choice, they should get their First Reserve Choice or teir Second Preferred Choice.

To complicate things, some sessions will only run once - details are on the attached sheet. Essentially, there are two times for the sessions to run - May and June. Some will run in May and then again in June. Some will only run once. A student who chooses an option can be placed in either the May or June sessions.

I have uploaded a sheet with the details.

Again, I appreciate everyone's help with this.

Thank you

Desi

ALLOCATIONS.xlsx
ABCDEFGHIJKLM
1NameCHOICE 1CHOICE 2RESERVE 1RESERVE 2Maximum NumberMayJune
2PUPIL 1Cake Making and DecoratingDebating clubBritish Sign LanguageDissection ClubAfrican Dance25YN
3PUPIL 2Cake Making and DecoratingFitnessAnimationMountain BikingAnimation25YY
4PUPIL 3Cake Making and DecoratingClay Name platesFitnessSketchup - 3D CAD Software used by ArchitectsBootcamp25YY
5PUPIL 4FitnessBoxerciseDissection ClubMountain BikingBoxercise25YY
6PUPIL 5Circus SkillsBoxerciseDissection ClubMountain BikingBritish Sign Language25YY
7PUPIL 6Cake Making and DecoratingAnimationFitnessMountain BikingBuild your own computer25YY
8PUPIL 7Mindfulness GardensAnimationClay Name platesCreative Writing for FunCake Making and Decorating20YY
9PUPIL 8Mindfulness GardensPsychology - Optical IllusionsCake Making and DecoratingCreative Writing for FunChanging Tides25YY
10PUPIL 9Cake Making and DecoratingMindfulness GardensMountain BikingClay Name platesCircus Skills25NY
11PUPIL 10Psychology - Optical IllusionsCreative Writing for FunBritish Sign LanguageCake Making and DecoratingClay Name plates25NY
12PUPIL 11AnimationCake Making and DecoratingCreative Writing for FunMountain BikingCreative Writing for Fun25YY
13PUPIL 12Cake Making and DecoratingSports Business and EnterpriseDissection ClubYogaCultural Appreciation Across the World25NY
14PUPIL 13Cake Making and DecoratingAnimationFitnessMountain BikingDebating club25YY
15PUPIL 14Cake Making and DecoratingDebating clubCircus SkillsClay Name platesDissection Club25YY
16PUPIL 15AnimationCake Making and DecoratingBritish Sign LanguageMandarin ChineseDon't Be Trashy25YY
17PUPIL 16British Sign LanguageAnimationMandarin ChineseCreative Writing for FunFitness25YY
18PUPIL 17AnimationBuild your own computerSketchup - 3D CAD Software used by ArchitectsMandarin Chinese25YY
19PUPIL 18Debating clubCircus SkillsBritish Sign LanguageCake Making and DecoratingMindfulness Gardens25YY
20PUPIL 19Psychology - Optical IllusionsSketchup - 3D CAD Software used by ArchitectsBuild your own computerAnimationMountain Biking25YY
21PUPIL 20Sketchup - 3D CAD Software used by ArchitectsPsychology - Optical IllusionsCake Making and DecoratingClay Name platesPsychology - Optical Illusions25YY
22PUPIL 21Cake Making and DecoratingSketchup - 3D CAD Software used by ArchitectsPsychology - Optical IllusionsDissection ClubSketchup - 3D CAD Software used by Architects25YY
23PUPIL 22Cake Making and DecoratingSketchup - 3D CAD Software used by ArchitectsPsychology - Optical IllusionsDissection ClubSports Business and Enterprise25YN
24PUPIL 23Cake Making and DecoratingDissection ClubPsychology - Optical IllusionsClay Name platesYoga25YY
25PUPIL 24Mandarin ChineseClay Name platesCircus SkillsBritish Sign Language
26PUPIL 25Mandarin ChineseClay Name platesCircus SkillsBritish Sign Language
27PUPIL 26Mandarin ChinesePsychology - Optical IllusionsDissection ClubBritish Sign Language
28PUPIL 27Mandarin ChineseCultural Appreciation Across the WorldDon't Be TrashyDebating club
29PUPIL 28Mandarin ChineseCake Making and DecoratingDon't Be TrashyMindfulness Gardens
30PUPIL 29Debating clubCake Making and DecoratingDon't Be TrashyPsychology - Optical Illusions
31PUPIL 30Cake Making and DecoratingCake Making and DecoratingCake Making and DecoratingCake Making and Decorating
32PUPIL 31Cake Making and DecoratingClay Name platesDissection ClubCircus Skills
33PUPIL 32Cake Making and DecoratingCircus SkillsBritish Sign LanguageClay Name plates
34PUPIL 33Cake Making and DecoratingClay Name platesClay Name platesBuild your own computer
35PUPIL 34AnimationBuild your own computerCake Making and DecoratingPsychology - Optical Illusions
36PUPIL 35Cake Making and DecoratingClay Name platesCreative Writing for FunAfrican Dance
37PUPIL 36Cake Making and DecoratingFitnessClay Name platesAfrican Dance
38PUPIL 37Circus SkillsCake Making and DecoratingClay Name platesBritish Sign Language
39PUPIL 38Sports Business and EnterpriseBoxerciseCake Making and DecoratingAfrican Dance
40PUPIL 39Build your own computerFitnessAnimationPsychology - Optical Illusions
41PUPIL 40British Sign LanguageCreative Writing for FunClay Name platesPsychology - Optical Illusions
42PUPIL 41Build your own computerSketchup - 3D CAD Software used by ArchitectsFitnessSports Business and Enterprise
43PUPIL 42Build your own computerSketchup - 3D CAD Software used by ArchitectsFitnessSports Business and Enterprise
44PUPIL 43Sketchup - 3D CAD Software used by ArchitectsFitnessFitnessBoxercise
45PUPIL 44Mountain BikingBuild your own computerCake Making and DecoratingAfrican Dance
46PUPIL 45Mountain BikingBuild your own computerFitnessSports Business and Enterprise
47PUPIL 46FitnessCircus SkillsBuild your own computerDissection Club
48PUPIL 47Creative Writing for FunCake Making and DecoratingCircus SkillsClay Name plates
49PUPIL 48Cake Making and DecoratingSketchup - 3D CAD Software used by ArchitectsBuild your own computerCake Making and Decorating
50PUPIL 49Build your own computerAnimationClay Name platesCreative Writing for Fun
51PUPIL 50Cake Making and DecoratingCircus SkillsMindfulness GardensBritish Sign Language
52PUPIL 51Dissection ClubPsychology - Optical IllusionsYogaBritish Sign Language
Sheet1
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
hi

Can anyone point me in the right direction to start this please?


Thanks


Desi
 
Upvote 0
I have an idea using Power Query to perform the allocations, but need to finish it (hopefully today). I have a question about your "allocate fairly" comment. "First come, first served" is one approach, but I'm assuming you receive the preferences from everyone at the same time, so a different approach is desired? I've taken the approach that if the 1st Choice cannot be granted to everyone requesting a seat in the same course, then everyone is assigned a random number, the random numbers are sorted, and if we suppose that there are only 20 seats available, then the 20 smallest random numbers are selected and that subset of students will be given their 1st Choice. The remaining students then become the group to consider for their 2nd Choice...and so on.

As I worked through an algorithm, I also wondered if there was a lower constraint on class size? You've mentioned a maximum number per session, but is there some minimum level of enrollment below which you would cancel the class?
 
Upvote 0
I have an idea using Power Query to perform the allocations, but need to finish it (hopefully today). I have a question about your "allocate fairly" comment. "First come, first served" is one approach, but I'm assuming you receive the preferences from everyone at the same time, so a different approach is desired? I've taken the approach that if the 1st Choice cannot be granted to everyone requesting a seat in the same course, then everyone is assigned a random number, the random numbers are sorted, and if we suppose that there are only 20 seats available, then the 20 smallest random numbers are selected and that subset of students will be given their 1st Choice. The remaining students then become the group to consider for their 2nd Choice...and so on.

As I worked through an algorithm, I also wondered if there was a lower constraint on class size? You've mentioned a maximum number per session, but is there some minimum level of enrollment below which you would cancel the class?
Oh my! I cannot express my gratitude for your help.

To answer your questions, minimum size 20 please.

Fairly allocate - I’d be happy with a random allocation as it was not first come first serve. All students completed the form at different times depending on computer availability.

Again, I am very grateful for your help.


Desi
 
Upvote 0
This is tricky. A minimum size of 20? So if we have 15 students signed up for the same course X as their Choice 1 (I'll call these 15 students "Group A"), you would deny all of them and say that the minimum has not been met? Choice 2 would then be considered for the Group A students. Suppose we have another group of students (Group B) whose individual Choice 1's also could not be fulfilled...so their Choice 2 would then be considered. Now suppose that 5 of the Group B students happen to have selected course X as Choice 2. Do we then step back near the beginning and check if the minimum is met by compiling all of the denials for higher preference selections to determine if a minimum class size constraint can be satisfied? If so, in this case, the 15 Group A students (Choice 1 is course X) and the 5 Group B students whose Choice 2 is course X would satisfy the minimum size constraint of 20 and therefore would be enrolled in course X. I don't know if I can get this working correctly in Power Query, but I'll have a look.
 
Upvote 0
I am so sorry - I typed my previous reply on my phone and I must have big fingers!!

Minimum should be 10, not 20. However, if easoer, ignore the minimum siz - I can manually adjust if needed.

Sorry for the confusion.
 
Upvote 0
Desi,
I have a file for you to try, but since the Power Query code is tied into multiple worksheets, it is easier to make the file available here for download:

Please review the ReadMe worksheet, as it explains the general approach, some issues encountered, and instructions for running the queries to perform the allocations to match students to courses. You may find that some students are not assigned to courses. This can occur for a variety of reasons described in the ReadMe worksheet, and those students would have been denied seats in each of the four iterations. Details of those iterations can be reviewed on a summary worksheet if you examine the [Allocation.Type] column for each iteration. Students left without a course allocation will be identified in the final results table on the Desi worksheet with a "0" for their course allocation. In the linked file, I expanded the number of students to 151 and randomly generated a weighted distribution of courses for the additional students to see how the queries performed with a larger data set. As described in the ReadMe worksheet, this approach is somewhat clunky because it requires manual intervention by the user to refresh the queries. I was getting unreliable results when I combined all of the steps in one sequence, probably because the automatic random number generation creates a feedback loop of sorts. I think I've tamed that behavior with this approach, albeit at the expense of requiring more user involvement. I'm hopeful that it works for your purposes. Let me know if you encounter any problems.
 
Upvote 0
Solution
Wow! I cannot explress my grtitude. I have been able to use your file and this has simplified the process for me.

Please accept my sincerely thanks for all the time and expertose you have dedicated to this.

Desi
 
Upvote 0
That's good to hear...thanks for the update. I'm curious about the scale of your allocation effort. Approximately how many courses and how many students signing up in total?
 
Upvote 0
295 students with 22 courses running. I had to make a few manual decisions to get things to work but your spreadsheet did most of the work.

Many thanks again


Desi
 
Upvote 0

Forum statistics

Threads
1,215,333
Messages
6,124,317
Members
449,153
Latest member
JazzSingerNL

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top