How optimization builds a master schedule.

Master scheduling software treats the schedule as a constraint problem: place every section and seat as many course requests as possible without breaking a firm rule. nOS works out the most any schedule could fill, builds with search and swap chains, refines with an integer-programming solver, and gives every unmet request a reason.

The problem, stated plainly.

A master schedule makes two kinds of decision. Each section gets a period, a teacher and often a room; then each course request gets a section, or goes unmet. In nOS Academy, one of the sample schools, that is 248 sections across 8 periods and 3,745 requests from 600 students. There are far more ways to arrange that than any computer could try one by one, which is why scheduling software searches rather than enumerates.

Firm rules.

Some things must always hold, and the build treats them as constraints. No student, teacher or room is in two places at once. No class goes over its size. A student never lands in a course they lack the prerequisite for, and a firm rule you wrote, such as “Keep AP Biology a singleton in period 3,” is never broken. On a rotating or A/B schedule the check is made per day of the cycle: period 2 on an A day and period 2 on a B day are different times, so two classes can share a period number without clashing.

The objective.

Within those limits, nOS maximizes the number of requests placed. Everything else breaks ties: a student’s ranks, seniority if you choose it, fairness between students, and the preferences you wrote. Each of those is weighted below a single placement, so a preference never keeps a student out of a course the schedule could have given them. The two balance goals are the deliberate exception: when you choose Balance Section Size or Hybrid, evenness can occasionally win over a seat, which is why it pays to compare goals before choosing one.

How nOS builds it, stage by stage.

Each stage starts from what the last one left, and nothing is kept unless it is at least as good.

  1. Check the data and work out the best possible.

    nOS bounds the answer before it builds: no course can seat more students than its sections hold, and no student can take more courses than the day has periods. Combining both in one network flow gives the most requests any schedule could fill, shown as “At most 3,478 of 3,745 requests can be filled.”

  2. Put sections in periods, singletons first.

    For every pair of courses, nOS counts the students who asked for both. It places singletons first, then the courses in most demand, keeping the biggest pairs apart, then improves the layout one move at a time. Periods you set yourself stay where you put them.

  3. Seat students, hardest first.

    Students with the most requests are seated first, and within each student, the course with the fewest seats left goes first, while there are still choices.

  4. Tear up part of it and rebuild.

    nOS removes a slice of the placements, rebuilds it another way and keeps the better result, many times over and from several starting points. This is how it escapes a schedule that is good but stuck.

  5. Follow chains of swaps.

    When one student fits only if a second moves, and the second only if a third moves, nOS makes the whole chain at once. It also trades one placement for two when that seats more students overall.

  6. Hand the hardest part to an integer-programming solver.

    A mathematical solver models each remaining request as a yes-or-no choice of section and maximizes placements, with first choices weighted above alternates. It first seats what search couldn’t, then repacks small groups of students. Its answer is kept only if it fills more and breaks nothing.

  7. Check every rule, then explain every miss.

    The finished schedule is tested against every constraint before you see it, and each unmet request is checked again to find its reason.

Why some requests go unmet.

A request goes unmet for a reason the schedule can name. nOS checks each one against the finished schedule in order. If no section is open to the student’s grade, it is “Not offered for this grade.” If every section is full, it is “All classes are full.” If there are open seats but every one meets when the student already has a class, it is “Conflicts with another class.” Other misses carry reasons such as a missing prerequisite or a rule that holds the student out, 12 reasons in all.

One hundred percent is often impossible, and not because the software gave up. If more students want a course than its sections seat, some go without it whatever the arrangement. If two singletons meet in the same period, every student who wants both loses one. In nOS Academy, 28 students wait for Orchestra: 5 can only take the Period 2 class, which is full, and the other 23 already have a class every time it meets.

That is what the best possible is for. When requests filled equals it, as nOS Academy’s 92.87% does, no arrangement of those sections could place more, and the only way up is to change the sections themselves. When requests filled falls short of it, the gap is the most a better arrangement could recover; the bound ignores periods, so not all of that gap is always reachable. Results can then run a deeper solve in the background and offers it only if it fills more.

What happens when you change it.

Edits after the build don’t rerun the whole search. When you add a rule in Schedule Studio, nOS releases only the seats the new rule makes illegal, locks every other seat, and asks the solver to refill just the freed ones. Typing “Keep Aaron Torres and Andre Ward out of period 4” in nOS Academy moves those two students, each to another Biology class, and requests filled stay at 92.87%.

Moving a class re-checks the students in it and names anyone who would then have two classes at once. Adding a section seats the waiting students it unblocks. Each change waits in Changes, with every student it helps, moves or leaves without a seat, until you apply it.

Questions about schedule optimization.

Is master scheduling an optimization problem?

Yes. It is a constraint satisfaction problem with an objective: place every section and seat as many requests as possible without breaking a firm rule.

Does nOS guarantee an optimal schedule?

No. When requests filled reaches the best possible, no arrangement of your sections could fill more, and Results says so. When it doesn’t, nOS shows the gap.

How does nOS calculate the best possible?

From seats and periods: no course can seat more students than its sections hold, and no student can take more courses than the day has periods. A network flow combines both into one upper bound.

Why not solve the whole schedule with the mathematical solver?

An exact model of a whole school is too large to solve in the time a build takes. nOS uses search to build the schedule and the solver where it pays off: the requests search couldn’t place and small groups of students.

Can a preference keep a student out of a course?

Not under the default goal, Max Fulfillment: a preference gives way to seat a student. A firm rule always holds.

Drafted with AI. This page was written with help from an AI model. Double-check every statistic and figure on it before you rely on it.