Automatic classroom assignment

Automatic classroom assignment assigns a classroom to a set of selected lessons in one go. You choose a set of candidate classrooms, the algorithm proposes an optimal assignment, and you validate after review — row by row if needed.

It is a tool for classroom allocation only. It does not move lessons in time, does not change their duration, does not assign resources and does not rerun the full timetable generation. To have classrooms placed during generation, see Automatic generation instead.

Where to find it

This tool lives in the listing view of the Distribute the hours and create the lessons screen (the table view, one row per lesson).

  1. Display the lessons in the listing view.
  2. Tick at least two lessons (selection column). If needed, use sorting and column filters to isolate the lessons to process — for example those awaiting a classroom.
  3. Open the grouped classroom action in the header, Assign a classroom.
  4. In the classroom selector, enable Automatic classroom assignment mode.

Remote or self-study lessons (according to their modality) are ignored: they need no physical classroom. Hybrid lessons remain taken into account. Leave lessons whose classroom is locked out of the selection: the tool does not override a lock.

Choosing the set of candidate classrooms

In automatic mode, the selector displays classrooms grouped by site then by building, with checkboxes at three levels:

  • ticking a site takes all its eligible classrooms;
  • ticking a building takes all the classrooms of that building;
  • ticking a classroom adds it individually.

Classrooms already assigned to the selected lessons are pre-ticked. A classroom whose specialization matches none of the selected lessons, or that is too small for all the compatible lessons, is disabled. The capacity turns red when the classroom cannot host any of the compatible lessons, orange when it can host only some of them.

Confirm the set to start the computation.

What the algorithm does

From the chosen set, the algorithm assigns one classroom per lesson, respecting strict rules and optimizing the rest:

  • the specialization required by the lesson, otherwise by its subject (see special classroom);
  • the classroom's capacity, compared with the minimum the lesson requires: its headcount — the expected headcount if one is set, otherwise the headcount computed from the class and its groups — or its desired capacity when that is required or lower than the headcount. Lessons that wish for more seats choose before the others, the largest desired capacity first, without taking a classroom that a lesson in the same time slot needs to house its headcount;
  • the classroom's existing occupancy on the time slot — lessons from other timetables or other linked accounts, events, classroom time constraints, shared large rooms;
  • the lesson's classroom needs, which take priority: lessons that have some choose first and, among the classrooms of the chosen site, those that meet them are offered first. A need that no classroom of the site can meet is not taken into account;
  • the classrooms to prioritize of the class — the classrooms carrying one of the campus values or one of the tags kept on its record — which are then used to rank the compatible classrooms. When they are all taken, the algorithm picks another compatible classroom;
  • a preference for the lesson's reference site;
  • alternate weeks: two lessons that never fall in the same week can reuse the same classroom.

The algorithm chooses classrooms in the same order as the generation, the one the stars of the classroom selector show: the class's classroom when it suits, the lesson's needs, the desired capacity, the class's classrooms to prioritize, a teacher's classroom, then the smallest suitable classroom. It can reshuffle classrooms among the selected lessons to house them better. When the current classroom already suits and another would gain only a few seats, it keeps it rather than producing a needless change; a classroom ranked higher for another reason — a need, the desired capacity, a preference — wins whatever the gain. If no classroom in the set suits, the lesson is left without a solution.

Lessons outside the selection moved to another classroom

A selected lesson may need a classroom — wheelchair access, a projector… — that, in its time slot, is occupied only by a lesson outside the selection that does not need it. The algorithm then gives that classroom to the lesson that needs it and moves the other one to a free classroom of the set, as the generation would. This happens only:

  • if no free classroom of the site already meets the need;
  • if the lesson being moved is shown in the listing (its class is selected) and occupies that classroom alone;
  • if it finds another free classroom; otherwise, it keeps its own.

A lesson that has been moved never moves another one in turn.

In the preview, it appears with the status lesson outside the selection moved to another classroom, an orange icon, and its previous cell shows the lesson that took its classroom and the need that motivated it. The summary at the top of the window counts these lessons separately. To leave it in its classroom, untick it: the lesson that needed the classroom immediately receives another one.

Review, adjust, apply

The computation opens a preview window: as long as it is open, the actual timetable is not modified. Each row carries a status — assigned, unchanged, no solution, manually adjusted, or lesson outside the selection moved to another classroom — along with the previous classroom and the proposed one.

  • Unticking a row excludes it from being applied: it keeps its current classroom, and the other rows are immediately recomputed around it, so that none receives the classroom it occupies. Ticking it again puts it back into the computation.
  • Adjusting a row: click its proposed classroom to open the regular selector. The manual choice is not limited to the initial candidate set; the row switches to the "adjusted" status, the other rows are recomputed around that choice and any conflicts are updated.
  • Resetting: a button restores the algorithm's proposal on the adjusted rows, then recomputes the others.
  • Validate applies the ticked rows to the timetable; Cancel closes without changing anything.

The rows that change during a recomputation flash. After applying, the modified lessons flash in turn and a summary shows the number of modified lessons, of lessons outside the selection moved to another classroom, of unchanged lessons and of lessons without a solution.

Notes

  • A lesson that carried several classrooms can be brought down to a single one by the automatic assignment.
  • A lesson with no positioned time slot can still receive a classroom (by set, specialization, capacity and site), but no time conflict can then be checked for it.
  • To simply set the default classrooms (the class's or the teacher's, excluding special classrooms) or clear assignments, the Actions menu offers dedicated mass actions — see Distribute the hours and create the lessons.

See also