All projects

Holiday course planner

Sizing courses and assigning student coaches across dozens of schools, with a search algorithm and a live map.

Under the state’s post-pandemic catch-up programme we ran free week-long holiday courses at schools: mornings and early afternoons for five days, in groups of eight to fifteen students of the same year group. Before each season, three problems had to be solved in a few days.

Cutting registrations into courses

Families registered per school and year group, and every school had a funded maximum number of courses. The course sizer sized the final-year exam preparation courses first, then tried every way of splitting the remaining students into valid group sizes. It kept the splits that produced the most courses, and among those picked the one that skipped the fewest year groups. Exam preparation ran all day, everything else for half a day, which set how many coaches each school needed.

Assigning coaches

The planner, internally called “Dijkstra”, is really a best-first branch-and-bound search over partial assignments. Each search node means “the first k courses have a coach”.

  • Inputs: courses per school and week; for every coach, their days available, experience, preferred year groups, wish to lead, and interview score; and a coach-to-school travel time matrix.
  • Hard rules: two half-day slots per coach and week, full-day courses take both, only coaches who want to lead can lead, and a coach stays at one school.
  • Cost: total travel time, plus three times every minute over a 30-minute commute, plus penalties for giving a lead to a first-timer, a course outside the coach’s preferences, or a lower-rated coach.
  • Symmetry breaking: coaches within one school are tried only in increasing order, so the search never explores two orderings of the same team.

The search wrote a snapshot of its best solution every ten seconds. Later versions solved each week separately, kept several queues ranked by different heuristics, and capped commutes at three hours.

Seeing it on a map

The result went onto a map of every school and coach for planners and support staff. Lines were coloured by travel time, and popups showed missing coaches per school. The specification for the next version used the same map during the course week: who had called in sick, who was on their way, who had arrived, and which standby coach was closest.

Easter 2023 in numbers

1,747 registrations from 147 schools, 35 host schools, 136 course groups with an average of ten students, and 81 coaches, all assigned in the last days before the holidays.