Pianifica
The school timetable without sleepless nights: tools that check and prepare timetable data, and a plan for a generator built on the real rules of a school with two sites.
Pianifica (Italian for "plan" or "schedule") was born from a recurring puzzle: building the timetable for an upper secondary school with over a hundred teachers and two sites. Every year the same challenges come back: changing teaching assignments, teachers shared with other schools, part-timers, rooms to allocate, colleagues' requests to respect. Pianifica grows out of my work as the school's timetable planner: first to remove the repetitive chores, and over time to build the timetable the way my school really needs it. It is an internal tool, which is why it is only described here.
What it does today
Today Pianifica works on the files of the timetabling program we use at school: it reads them, checks them and prepares them.
- The new school year: from last year's file to the new one, with classes moving up, groups leaving, and rooms changing site.
- Checking against teaching assignments: it compares the timetable with the official list of teaching assignments and flags differences in hours, posts still to be filled, and names spelled in two different ways.
- Teachers' requests: it checks, class by class, whether the way hours are spread across the week matches the preferences collected through a form, and lists only the cases that need fixing.
- The two sites: it identifies the teachers who work at both the main site and the second one, and measures their transfers, to cut down on trips for a single hour.
- Class councils: it prepares the constraints for scheduling meeting days, based on how many classes each teacher has.
Where it is heading
The next step is a timetable generator built on the rules that general-purpose programs struggle with:
- rotating rooms assigned without mistakes, when many classes no longer have a fixed classroom;
- two sites managed together, with transfer time and visits to the second site lasting at least two hours;
- days chosen with care for teachers shared with other schools and for part-timers;
- parallel lessons, such as the alternative to religious education, without having to handle them by hand;
- free periods spread fairly, in proportion to each teacher's contracted hours.
How it is built
Python scripts that read and write the timetable file format, reconstructed by studying its structure, with one firm principle: delicate changes are made by a person. When a change could compromise the file, Pianifica does not apply it on its own, but hands over the exact list of operations to carry out. Like all my projects: zero lines of code written by hand.