How to create a good timetable in primary schools

Anyone who has never been confronted with the task of creating a timetable may think that it is a simple task. Nothing could be further from the truth. The head of studies knows the complexity of balancing subjects with their weekly distribution, dealing with the lengths of periods, allocating classrooms or the headache of managing to balance the timetable of teachers. It is necessary to understand that there is no magic in timetabling.

However, as always, experience is a degree. The more timetables you have created, the better you know the problems and the tricks to simplify this task. In this blog post we want to show a methodology to prepare good timetables for primary and pre-school. Of course, this is only an approximation, as each school has its own characteristics. Therefore, no one better than the head of studies will know how to extract what they can take advantage of what is presented here.

There are differences between primary and secondary (or other educational systems) timetables. Pre-school and primary education have very particular characteristics. Some of these are:

  • The presence of mentors and specialists with different profiles.
  • Difference between choosing tutors or co-tutors.
  • 30 or 45 minute sections and class units.
  • Coincidence or not of breaks for all groups.
  • Possibility of bilingualism.
  • Variations in the timetable by community or school.

Below, we will show a methodology based on the experience learned with many schools over so many years.

Pre-analysis of teaching load and teacher profiles

First of all, and before starting to create the timetable, there are two aspects to take into account: the timetable for each course, and the profiles of the teachers assigned for this academic year.

As a general rule, the timetable for each course is 30 hours per week, of which 25 are teaching hours and 5 hours are complementary activities. Among the 25 teaching hours, 22.5 hours are spent with pupils and 2.5 hours are spent supervising breaks. In addition, it is usual for the distribution between the days to be equal, with 4.5 teaching hours and half an hour of break time on each day. However, neither the timetable nor the number of hours for each subject is always the same.

Each autonomous region defines a list and number of hours for the subjects, which is usually different from the rest of the regions. In addition, as a school we have a certain degree of autonomy to make modifications. We can offer other subjects, such as a second foreign language, two co-official languages, technology and robotics… Or even make some changes to the timetable.

The other important preliminary factor is the teacher profile of the teachers who have been assigned to our school this academic year. All primary school teachers can be tutors, and teach maths, Spanish, natural sciences… But some teachers are specialists, and are in charge of teaching physical education, music, English or religion. In order to be able to teach these subjects, teachers have to accredit certain competences. Thus, depending on the number and profile of specialists available, the allocation of teachers to subjects will vary.

On the other hand, it is also essential to be aware of the restrictions that teachers have. These restrictions may be due to a reduction in working hours, or because they are itinerant teachers with other schools. In other words, some of the teachers we have in the school may also be in other schools or music schools, and we may only have them available on certain days or at certain times of the day.

Define time frame

Once the previous analysis has been carried out, the first action to be taken is to define the time frame (or time grid) in which the class units will be taught. Assuming a regular framework with the same teaching time each day (4.5 hours), the three most common options to define the time periods are:

  1. 4 sections of 1 hour, and 1 section of ½ hour.
  2. 3 sections of 1 hour, and 2 sections of ¾ of an hour.
  3. 6 sections of ¾ of an hour.

In the first two cases, we can replace any 1 hour section with 2 sections of ½ hour. The third option has the advantage that all the time slots are of the same length, so teachers, regardless of the subjects they teach, can place their class units in any position. But it has the disadvantage that there are durations that cannot be achieved (such as 2 hours), so that either there are different weekly timetables, or not all durations are achieved exactly.

Although these are the most commonly used options, we can configure the time frame according to the needs and convenience of our school.  In addition, we have other options in the configuration of the time frame: having more than one time frame to assign to different groups, or defining different timetables for each day. These actions can give us a flexibility that avoids that some teacher’s class units can only be placed in certain time periods, making it impossible to obtain a solution for a specific timetable.

Another increasingly common configuration is to have different breaks for certain groups. For example, 1st, 2nd, and 3rd grades would coincide in the playground, and then 4th, 5th and 6th grades would do the same. This facilitates, among other things, supervision by teachers, although it makes it difficult for us to obtain a timetable.

Creation of class units in phases

Once we have defined the time frame, it is time to create the class units for the students. And, as the saying goes, “divide and rule.” It is very useful not to create all the class units at once, but to create them in different phases. This will allow us to discover which conditions may cause us problems in obtaining our timetable. The idea is to start with the most difficult class units to set up, and then continue with the rest of the class units.

Thus, we recommend placing the class units in the following three phases:

  1. Specialist class units.
  2. Teachers’ class units outside their group/tutorial group.
  3. Tutor class units in their group/tutorial group.

In phase 1 we will take into account the specialist class units. The reason for this is that specialists teach different courses, so they are considered a “shared” resource. This means that the placement of their class units affects many other colleagues.

Then, in phase 2, we will incorporate class units taught by teachers outside the group for which they are tutors. Although they do not have the complexity of the class units in phase 1, these lessons affect two teachers and two groups. That is, if John teaches 1st A grade (for which he is not a tutor), then the tutor of 1st A grade and the group tutored by John are also affected.

Finally, in phase 3 we add up the class units taught by each teacher to the group he is tutor. These are the simplest class units, as only one teacher and one group are involved. In the case of having co-tutors in groups A and B of the same grade, we would take into account the class units of both at the same time, as they are strongly related.

There are alternatives and variations we can make to avoid conflicts with the class units. For example:

  • There are small variations that communities allow between the number of hours of lessons. This makes it possible, for example, to transfer 15 minutes from one subject to another, thus freeing up time periods to place teacher class units, and allowing a solution to be found in the classroom.
  • Play with the allocation of the hours of Arts Education between Music and Drama. In curricular plans, the total of the sum of both is usually defined, but it is not necessary for them to have the same duration. Depending on the number of class units the music specialist has, we may be interested in giving one duration or another to each group.

Creation of non-class units

Finally, there are other non-teaching activities carried out by teachers. These activities are not directed at pupils, but they are equally essential for our school. These activities are, for example, playground supervision, management tasks or on-call hours to ensure that we always have a teacher available to cover absences.

Other activities of vital importance in the primary and pre-school timetables are the work periods during school hours. This type of activities includes, among others, group meetings, meetings with parents, or the pedagogical coordination committee.

In addition, there are other criteria that we must take into account, such as reduced working hours, non-teaching hours for teachers over a certain age, and other school conditions or pedagogical criteria that we have defined. All of these must be reflected in the timetable that we finally submit to the relevant administration.

Using GHC

Manual is error-prone. That’s why having a tool that automates timetabling is extremely useful.

GHC allows us not only to automate the creation of the timetable, but also to enjoy a series of advantages in the generation and daily management of the timetable:

  • Exchange with academic managers: GHC exchanges with all public academic managers in Spain, and with many private ones. Thanks to this, we can easily download all the elements of the platform to create our timetable. And then upload the timetable solution, avoiding the time and possible errors when manually entering the timetable in the academic manager.
  • Search automation: By simply indicating the configuration and restrictions of our schedule, GHC will automatically search for a solution. This saves us days of work looking for valid solutions, and avoids the uncertainty of knowing whether or not there is a possible solution to our configuration.
  • Detection of errors and impossible conditions: GHC includes a validator that will warn us of errors and impossible conditions that we have defined. It also includes tools to identify class units that prevent us from obtaining a solution.
  • Quick adjustment to modifications: A change of teacher at the beginning of the academic year, or a reduction of the working day with the timetable already created, an error in the number of hours of a subject… There are many reasons that can invalidate the solution, and even make all the work done useless. With GHC, it is a matter of seconds to introduce this change, and automatically create another solution that fulfils all the previous requirements and the new ones specified.
  • Optimising the solution: What is a good timetable? One that compacts the teachers’ timetable, minimises the change of classrooms of the students, adjusts the timetables of teachers who share a car to come to the school, meets the pedagogical criteria that we have defined… There are many factors to optimise in a schedule. Fortunately, in GHC we can weigh these conditions, and the software will check among millions of options until it finds an optimal solution, within the existing possibilities.
  • Timetable management tools: Beyond the creation of the timetable and the exchange with the timetable manager, the Peñalara subscription offers us much more. Thanks to GHC Web App we can manage the day-to-day running of the school in matters relating to the timetable. It is worth highlighting these two modules:
    • Timetable viewer by profiles: Both the school and the teachers and students will have access to their timetable available on any browser or mobile device. In addition, we can configure the permissions of each user profile on the timetables that can be displayed.
    • Absence and substitution manager: This system allows teachers to inform us if they are going to be absent. We can also directly create the absences that our teachers have made or are going to make. The application will show the class units without a teacher. On them, we cannot only check which teachers are on duty or free, but also assign a supply teacher. This teacher will receive a notification on their device with all the information about the absence to be covered.

We will also receive all the help and advice from the Peñalara team on how to set up our timetable.

Optimal timetables for education

A better schedule from a pedagogical point of view can improve the quality of education. Certainly, a good school timetable can increase students’ efficiency, achieve a better use of classrooms, as well as increase the satisfaction of teachers in their work.  However, the criteria used to draw up timetables are not always obvious, nor can they be applied over and above the organisational needs that exist in each educational institution.

Schools usually try to establish one or other criteria for timetabling, adopting rules that help to achieve certain objectives. Nevertheless, in practice, these rules are only applied as far as possible. That is to say, they should be observed while being rationally balanced with organisational needs. For example, a pedagogical consideration might be that PE should be taught in the last hour of the morning, but if there is only one teacher for this subject this will obviously not be possible. Avoiding that all weekly class units of the same subject coincide in the early or late morning or after recess will also be conditioned by teacher availability.

Other criteria do not conflict so clearly with organisational constraints, but will undoubtedly be conditioned. Pedagogical guidelines applicable to the schedule, such as balancing the teaching load or avoiding too many lessons consecutively, may clash with the criterion of trying to achieve a timetable as compact as possible. In other words, the criteria for teachers’ timetables should not only be balanced between each other, but also with other preferences and within the organisational constraints that exist. Similarly, it should be kept in mind that the best use of classrooms from a pedagogical point of view should be adapted to their actual availability.

EReflection is needed to discern what criteria are applied in each school and with what priority. But once we know what we are looking for and to what extent, what is really important is to find it in practice. That is, to find solutions that satisfy an optimal compromise; those that, while meeting the academic and organisational requirements, observe as far as possible the established guidelines and preferences. So the question really is: Is there a tool that allows the weighting of certain criteria to be adapted in a flexible and optimal way to the academic organisation?

The answer is yes, there is a tool designed for this purpose and it is very effective in its usefulness. The scheduling software for educational institutions not only makes it possible to define different criteria and give them a weighting, but also to adjust the individual preferences of the elements that make up the school timetable. The best timetables will be achieved by adding flexibility to the strict order conditions. The solutions offered by the engine are optimal. We can state that GHC not only offers the necessary academic and organisational solutions with great efficiency, but also that these will observe as far as possible the guidelines and preferences established in each school.

How to collect the information to create your timetable

Drawing up timetables is a task that involves a large number of people, from the head of studies to the heads of department and other teachers at the school. A variety of information has to be gathered: the subjects that each teacher will teach to each group of students, the times at which they can or prefer to teach their class units, or the classroom where they wish to teach.

In times of pandemic covid-19 online tools avoid face-to-face meetings, making it easier to organise them, as well as favouring social distancing and the prevention of infections. Therefore, finding a tool that allows online collection of all the information necessary to obtain valid and optimal schedules is essential. But what are the main functionalities that these tools should meet?

  • Allowing the division of work into departments. The insertion of this data should be possible online and in parallel, giving each department independence, and speeding up the compilation of all the information.
  • Defining the teacher who will teach each subject. Each educational institution has certain criteria for assigning teachers to each subject and course. The software chosen must allow each teacher to be associated with the class units he/she will teach in accordance with these criteria.
  • Recording the availability of each teacher’s timetable. A teacher may have a reduction in the number of hours worked, may teach in another school, or may prefer to have part of his or her timetable free. Collecting all these restrictions and preferences is crucial in order to obtain a good timetable.
  • Collecting other preferences about the teaching staff. Gathering the preferences of the teachers will allow us to know their needs, and thus obtain a good schedule that satisfies them. Knowing which teachers want to be tutors or do on-call hours will increase the satisfaction of the teaching staff with the timetable.
  • Specifying details about the class units. Doing this process online should not be a handicap to the quality of the process. Therefore, indicating the classroom where a class unit should or is preferred to be held, or suggesting the weekly distribution of class times for each subject is necessary during data entry.

The Peñalara collection of preferences tool not only covers all these functionalities, but goes further. If you wish, it allows each head of department to take charge of the creation of the class units of his/her department, in order to free the head of studies from this task, and to speed up and distribute the work among more people. In addition, this web application is fully integrated with GHC, both to publish the timetable so that the heads of department can work with it, and to collect the data that they have entered. Thanks to this, we can achieve better schedules and save time.

You can find information about it in these video tutorials, go to the Peñalara website for more information, or sign up for any of the weekly demos.

Pedagogical criteria in timetables

Each academic institution may establish guidelines to direct the implementation of its timetables. These are not always formally expressed, but there is often a document describing the directives to be followed, in accordance with the school’s objectives. In other cases, they may be established by the school management or the head of studies during their elaboration.

Some of these criteria for class units could be:

  • Avoiding overlapping all weekly class units of a particular subject:
    • Early in the morning, late in the afternoon or after the break.
    • On consecutive days.
    • At the same time of day.
  • Preventing classroom changes for students or teachers, or follow certain preferences for the allocation of classrooms, workshops, gymnasiums, etc.
  • Ensuring that certain subjects are taught at earlier times or, by contrast, that others are more appropriate to be taught at later times. In other words, establish which subjects will be taught in certain time slots.
  • Avoiding having a subject that finishes late one day and starts early the next day.

Other pedagogical criteria attributable to the teachers’ timetable would be:

  • Balancing the teaching load or daily workload.
  • Avoiding more than a certain number of class units in a row, attendance before or after break time, etc. in order to allow for rest intervals.
  • Ensuring that teachers’ timetables are compact, etc.

Whether or not these formalised directives exist, it is necessary to consider the need for them and the weight to be given to them in each particular educational institution. Once we know what we are looking for and to what extent, we should be able to find, in practice, a timetable that satisfies an optimal compromise, which, while meeting academic requirements, observes pedagogical criteria as far as possible.

The question therefore is, can the pedagogical criteria to be followed be shaped in order to optimally fit the required academic timetable, as far as possible?

The answer is yes. With GHC, each school will be able to model its own pedagogical criteria, giving them weight and adjusting flexible preferences on the different elements that make up the timetable. The solutions provided by the GHC engine will be an optimal solution according to the criteria and preferences established in each case.

In order to achieve the best results, it is necessary to provide enough flexibility in the possible solutions. If strict conditions are used, they may make it difficult to observe the criteria when optimising the outcome. For example, if a pedagogical criterion determines that certain groups of students should preferably be taught in P.E. late in the day, but on the other hand, either the gymnasium or the teachers who teach P.E. are forbidden to do so in the curriculum, the pedagogical criterion will be impossible to satisfy.

For this reason, it is essential to define the strict conditions to be imposed on the solutions in the beginning. As a premise, we can state that no more strict conditions should be imposed than those that are really justified, otherwise the necessary flexibility to observe the pedagogical criteria will be restricted. It is important to allow the optimisation process to achieve the best solution.

In summary, we can affirm that GHC will observe the pedagogical criteria that each educational institution weighs up and will do so in an optimal way, taking advantage of the flexibility that exists in the solutions. In order to find the best timetables, it is preferable to take advantage of this capacity, avoiding more strict conditions than those that are really necessary.

Integration with other applications

Exchanging data between different software applications may seem to be something fairly simple and straightforward, but this is generally not true. First of all, software applications use identifiers that are usually not compatible. For example, using the DNI as a key to identify people, we could establish a correspondence between their data in the different applications. But if the keys are not the same, for example, if each application creates its own codes, matching becomes impossible without hard and laborious manual work. Another obvious reason is that the relationships between the data and their internal structures are also application-specific.

Integrating data between different applications requires well-designed and documented interfaces through which data can be exposed and software can interact. There is no other way. But this condition, while necessary, is not enough. In addition to an interface, it must be possible to establish a correspondence between the codes used in the two applications to identify their data elements.

In the case of an application that makes a service request to another application, the first one must provide its keys so that it can interpret the result once it has been resolved. In other words, if an application requests a task to be solved, it must provide, through the common interface, in besides the information of the request itself, the necessary keys to understand the result it receives. Let us suppose an application that requests another application for a service to resolve an academic timetable. In this case, the resolved timetable should be expressed using keys so that the requesting application can recognise it. In this way it will be able to identify teachers, subjects, etc. in the solution. The agreement of formats and keys between the two applications must be precise for it to work and both parties must necessarily collaborate in this.

There are some applications that expose their own exchange interfaces without being fully operational, with design weaknesses that prevent the output from being received correctly. It is therefore necessary to implement well-defined and documented open interfaces for inter-application communication. In fact, there are standardisation organisms that establish them. Alternatively, open interfaces associated with consolidated products published for this purpose could be adopted as standards.

Peñalara Software has published the internal GHC storage format to be used as an exchange interface. The XML-GHC format is complete. Everything that is configured with the planner, as well as the results that GHC creates, can be expressed with this model.

In addition, along with the development of a new engine that we hope to offer soon as a remote service, we have open JSON interfaces that can be consulted through the public GitHub repository and are associated with development libraries also available, in this case, in Apache Maven. With this project we intend to offer services for the creation of timetables to the academic management application ecosystem, and thus ultimately facilitate the work of users.

Is it possible to identify the presence of conditions that prevent results?

Is it possible to identify the presence of conditions that prevent results? We can happily say that we have an engine capable of finding efficiently the most challenging timetables. However, as you know, in order to optimise the timetables, it is essential to find complete results in advance. Unfortunately, when working with the planner, you will have experienced that impossible conditions are introduced. Perhaps the most controversial issue in using the software is how to determine, before using the engine, whether there are impossible conditions. What conditions prevent full timetables?

The engine is the component that finally has to find the solution, so it is not always possible to know in advance whether there are conditions that cannot be fulfilled. Indeed, this is strictly true; there are impossible conditions that are very difficult to analyse. However, it is possible to identify many of the impossible conditions; most of them are introduced accidentally, preventing the full results.

The GHC engine fits results very quickly. This is a fact. If the engine cannot find results quickly and fails to fit any class unit in repeated attempts, most of the time it is because there are some conditions that prevent it and they must be debugged. Otherwise, the engine takes a little more time and effort to find a complete solution if they are more unusual. Should we wait? And if we suspect that there is some impossible condition, what is it?

We have two processes that can help us to check if there are conditions that are impossible to fulfil before using the engine: the validation of the planner’s configuration and the analysis of minimum sets that are impossible to fit.

The validation process looks at some of the most common causes that may prevent full results. For example, that a group of students have been assigned more class units than the ones that fit into their time frame or that different class units have been set up at the same time with the same teacher.

On the other hand, the analyser tries to solve separately the timetables of each teacher, of each group of students, etc. Thus, if it cannot solve any of these subsets, it will reduce it to a minimum of class units that are impossible to fit in. If the analyser finds a minimum set of class units that do not fit, it will be easier to see what is happening, that is, what conditions overlap with each other within this reduced number of class units.

Even though it is not the most common, as we have already said, there may be timetables for which the engine does not find a solution that apparently does not involve conflicts. Indeed, there are timetables without validation errors and for which the analyser does not find conflicts, which nevertheless contain conditions that prevent solutions. In these cases we have a third tool that can help us considerably: the debugger. The debugger allows to launch the engine and also the analyser, without any of the strict conditions initially configured. The debugger is very useful to launch tests by relaxing the strict conditions and thus know which ones prevent the solutions.

There are other debugging strategies, such as trying to assign directly from the editor the class units that have not been able to fit in to see which messages appear or to check in the incomplete result where there are gaps in the group timetable, just in case the problem is a meeting or the presence of an excess of positions forbidden to teachers, coinciding at the same time.

We do not want to forget that the task of making academic timetables is complex enough so that, in addition to having the best tools, the expertise of those who use them is necessary. Be sure to ask us for all the help you need. In any case, the merit of making the best timetables will always be yours.

Is it possible to have the perfect timetable?

Fitting in the weekly timetables of a moderately big or complex school is not an easy task. This is well known to those who have faced sometimes this problem and, to a greater extent, to those who have the responsibility to make so every year; a real puzzle has to be solved. But if it is difficult to find a solution that meets the minimum requirements, finding the best solution seems like an impossible task. And this is precisely the question we ask: Is it possible to make perfect timetables?

Clearly, and unfortunately, we must say that the perfect timetable is impossible and there are several reasons to affirm it. The first and most obvious is that any model for expressing what is sought will have imperfections. Indeed, the mathematical model through which a weight function is calculated to obtain the optimum timetable and its application to the elements included in the timetable: students, teachers, class units, etc., will always be an approximation to reality which, at best, will be estimated precisely corresponding to what is sought.

The second reason, and this is not so obvious, is that the set of solutions is so high that exhaustive searching is impossible, even for the fastest computer in the world.

Do you remember the paradox of the legend of the inventor of chess?

According to legend, a Persian king, who liked the game of chess, commanded to call his inventor to reward him for his ingenuity. The king recklessly told him to ask for whatever he wanted and the inventor answered: I settle for 1 grain of wheat for the first square of the board, 2 for the second, 4 for the third, 8 for the fourth and so on up to the 64 square of the board. That is the sum of the series 1+2+4+8… until completing 64 terms in geometric progression. The king thought that what he was asking for was a trifle and ordered to prepare the prize requested but doing the calculations they realized that it was impossible to fulfill the order, because the sum of the grains of the 64 boxes was nothing less than the amount of 36,893,488,147,419,103,231 grains. If in each Kilogram of wheat approximately 25,000 grains fit, then the result would be about 1,475,739,525,896 tons. If the largest freighter could hold up to 186,000 net tons, it would take about 8 million huge freighters to transport all the wheat. More than 1000 times the annual world production of wheat.

Knights Templar playing chess

This paradox also occurs with the problem of making academic timetables; it seems that it would be relatively easy to try all possible solutions with a computer but, in fact, it is impossible. The point is that the number of combinations grows exponentially and it would take years of calculation, even with the most powerful computer, to go through them all. The processes that solve this puzzle are studied through a mathematical and computational discipline that tries to give the best possible solution, in reasonable times, to excessively complex problems.

The Peñalara GHC Timetable Generator for Educational Institutions uses a software capable of finding solutions and making them optimal in an extraordinarily effective way in short enough periods of time even in the most complicated cases. The good news is that this type of intractable problems through exhaustive search processes can be solved to a large extent using intelligent algorithms. Finally, we can state with great satisfaction and relief for those who have the responsibility of making the timetables each course, that the ‘perfect’ timetables, in practice, are possible.