2

I'm scheduling an exam for a course (using R).

I have 36 students, which all need to be fitted with time-slots to 8 teachers on the exam day (1:1 exams).

Each student or teacher can obviously only be in one place at a time.

How do I run an optimisation to find a solution using the least amount of time slots?

# Teachers
examiners <- c(seq(from=1, to=8, by= 1))

#students
students <- c(seq(from=1, to=36))

Some packages of interest: ompr, ROI?

Many thanks!

2
  • If each teacher supervises one student so that there can be 8 students supervised at any one time then clearly we have ceiling(36/8) time slots so no optimization routines are needed. Commented Jan 8, 2021 at 14:58
  • If I understand the problem correctly you could do: x <- matrix(rep(1:36, 8), ncol = 8, byrow = TRUE) and then rename the columns colnames(x) <- paste("Teacher", LETTERS[1:8], sep = "_") and rows rownames(x) <- paste("Session", 1:36, sep = "_")
    – Roccer
    Commented Jan 8, 2021 at 15:06

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.