Builds a mixed-integer optimisation model for assigning TA, GR, and E units across students and courses.
Usage
prepare_phd_model(
df_list,
t_max_y1 = 1,
e_max = NULL,
ta_min = NULL,
ta_max = NULL,
gr_min = NULL,
gr_max = NULL,
e_min = NULL,
alpha = 2,
beta = 1,
phi = 1,
rho = 10,
C = 4,
protected_year = 1
)Arguments
- df_list
A list of model inputs, typically from
extract_phd_info(). Required elements are:Ns: number of studentsNj: number of coursesP: preference matrix[i, j]d: demand matrix[j, r]wherer = 1:3for TA, GR, Es: student-level E-allocation score vectoryear: year-of-study vector, with values from 1 to 4t1: past TA workload vectorg1: past GR workload vector
- t_max_y1
Maximum current-semester TA load for students in the protected year before slack is used. The argument name is retained for backward compatibility.
- e_max
Optional upper bound on per-student E units in current semester.
- ta_min, ta_max
Optional lower/upper bounds on per-student TA units in current semester.
- gr_min, gr_max
Optional lower/upper bounds on per-student GR units in current semester.
- e_min
Optional lower bound on per-student E units in current semester.
- alpha
Objective weight on TA spread
(Tmax - Tmin).- beta
Objective weight on TA preference term.
- phi
Objective weight on the score-weighted E term. When
phi > 0, larger values indf_list$smake E allocation more attractive.- rho
Objective weight on protected-cohort TA slack penalties.
- C
Semester workload capacity per student. The model fixes annual workload at
2 * CviaT_i + G_i + e_i^(2) == 2 * C. Default is4.- protected_year
A single whole number from 1 to 4 identifying the year-of-study cohort that receives the soft TA-load protection. Students from all other years are included in the TA fairness spread. Defaults to Year 1.
Value
An ompr model object ready for ompr::solve_model().