Catalogue app

School timetable

The solver proposes, you decide. It picks the room too, keeps lab blocks whole, honours co-teaching, and never makes a teacher change site from one hour to the next — and it can be stopped while keeping the best result found so far.

  • Head teachers
  • Timetable officers
  • School offices
  • Timetabling
  • Labs

The app travels inside the link: it opens in your browser and stays there. No account, nothing to install, and none of your data passes through a server.

The Timetable page: the weekly grid of one class with lessons coloured by subject, and below it the same grid filtered to one teacher.
One directive seen three ways — by class, by teacher, by room. A lesson moves by dragging it, and the drop writes the day and the hour together.
Room saturation: a bar chart of each room's occupancy percentage, and a table with seats, hours used and hours free.
How full the rooms are. None above 80%: there is room for a change — which is the question you ask in September when one more class arrives.
Quality per teacher: a chart of free periods by surname, and a table with hours timetabled, contracted hours, days, free periods, daily maximum, day off and site changes.
The measure that matters to whoever teaches: free periods, days on site, whether the requested day off was granted. And the site changes, which do not show on paper.
The Checks and generation page: five sliders for the generator's weights, each with its current value beside it.
Five weights and a number of moves. They change nothing until you regenerate: the block is manual on purpose, because a heuristic must not restart because somebody fixed a surname.

The app is written in Italian, for Italian secondary schools and their terminology. Everything below describes what it does.

What it does

Seven pages that follow the work as it is actually done in September.

Start seeds a fictional but coherent school — two tracks across two sites, 6 classes, 13 teachers, 11 rooms including three labs and two gyms, 13 subjects, 66 assignments over 180 weekly hours — so you can press Generate on the first run and see what comes out, instead of having to enter a whole register first.

Registers and Assignments are the tables everyone knows, with a little more: classes carry their headcount and their site, rooms their type and capacity, teachers their unavailable days, their daily ceiling and whether they teach first period. Assignments point at the real rows of those registers, so renaming a class breaks nothing.

Timetable is the same grid seen three ways — by class, by teacher, by room — because they are the same directive with a different filter. A lesson moves by dragging it, and the drop writes the day and the hour together. Pinned lessons do not drag.

Checks and generation is the heart of it. The check finds the hard clashes — a teacher in two places at one hour, a class with two lessons, a room booked twice, a forbidden cell, a day off violated, contracted hours that do not add up — and writes them into a collection the grid reads: clashing cells show up in the grid itself, not in a separate report.

Labs and quality measures what a timetable is actually worth: how saturated the special rooms are, how many free periods each teacher has, who got the day off they asked for, and who changes site during the day.

Printing produces one page per class and one per teacher in a single go, plus a single one per room — in landscape, because a six-day by six-hour grid does not fit in portrait.

The three things this version does and the last one did not

It picks the room. A subject asks for a type — classroom, lab, gym — and the generator finds which one is free in that cell, big enough for that class and on the right site. Adding a second lab is, in this app, how you give a timetable that will not close some air.

It keeps blocks whole. Lab work happens in two consecutive hours, and a block either fits whole or does not fit: it is never split to save a preference.

It puts two teachers in one cell. Support teaching follows the class, the technical-practical teacher works alongside the subject teacher: those are co-teaching, and the second teacher’s constraints bind during placement, not afterwards.

And one constraint that does not show on paper: no teacher changes site from one hour to the next. It is the first thing to break in reality, and the first thing this version enforces.

How well it works

The generator was run on the sample school: 180 of 180 hours placed in 160 blocks, zero serious violations, 202 lessons of which 22 co-taught, every lab and gym hour as a whole two-hour block, 28 free periods across the whole week for 13 teachers. Also tried with bans and pre-assignments, and with deliberately wrong drags to check that the checker sees them all. The browser’s result is identical to CPython’s on the same machine.

What it does not do, and says so inside

It is not a commercial product and does not pretend to be. It does not talk to the ministry’s systems, does not handle daily cover, does not guarantee an optimum and may leave hours unplaced. Lessons are not edited from a form: they are dragged, deleted, or pinned from the pre-assignments — which is also how you work from a phone, where dragging does not exist.

There is one constraint of the language this app explains rather than hides: a compute block rewrites the whole collection it writes to, so every collection has exactly one owner. The registers you fill in by hand live in a collection of your own, and the block merges them with the sample ones keeping their identifiers — so the assignments pointing at them stay valid. The Start page says it in a table: who writes what.

How to change it

Six hours a day instead of six and a half, no Saturday, a constraint your school needs and another does not: each is a one-line change, and the generator’s code is right there to read, in Python, inside the document.

Yours to change

An app is a Markdown document: open it, edit it by hand, or ask the assistant to change it for you. Whatever you add stays on your device.