05-28-2015 08:05 AM
Hoping you guys can help get me started. I have a list of 500 students and 20 teachers and trying to allocate students to teachers based on a number of parameters such as maximum class size of 30, subject preference of student to subject specialisation of teacher, must not have had teacher in previous academic year etc. etc.
Would anyone be able to advise how I would get started on a simple allocation say on parameter of maximum class size so all classes have equal number of students. I can then take this to optimise further by building in further parameters.
Struggling at this stage to get started with a basic approach, have tired arrays but no joy.
05-28-2015 09:05 AM
Well assigning them based on sequence is very simple:
teacher="xyz"; teach=1; output;
teacher="iop"; teach=2; output;
if _n_<=3 then teach=1;
create table WANT as
from TEACHERS A
left join TEMP B
Just assign them an id, each teacher has a unique id, each student is grouped based on _n_. However I feel your other rules are going to be more complicated, i.e. if 90% of students want subject A, then how to arrive at which % of them go into one or the other.