NOTICE: THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. THE PROGRAM IS DISTRIBUTED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
------------------------
This program is the result of years of work. Born to have a program capable of running on Linux to build a school timetable, I initially wrote it in php, basing my searches on a MYSQL database (the program can still be found on my site https://www.alessandroxbrunelli.com ), but required some complicated - at least for Windows users - configuration (an Apache server, the MYSQL database).
For this reason I decided to rewrite it in java: it is sufficient to install java> = 8 to use it in any operating system.
The program is open source, so you can find the source codes in the archive (folder /src; it was written using Netbeans). Feel free to modify them and compile the program again.
INSTRUCTIONS
1) Install java version> = 8 from https://www.java.com/
2) To use the program go to the folder Orario_Elettronico-j.0/dist and run the file Orario_Elettronico-j.0.jar. In some systems just double click on it, if it doesn't work you have to run a bash (a dos prompt on windows), go (cd) to /my/path/Orario_Elettronico-j.0/dist and type:
java -jar Orario_Elettronico-j.0.jar
the program will start. The first window will be empty and filled with contents only when you set the language (Italian or English) from the drop down menu. Enter it.
After that, everything should be self-explaining: create a project (a timetable) or launch an already-done one. I left you a demo to practice. Feel free to delete it at any time. Then follow the order of the operations that you find on the starting page of the project:
a) feed it with the raw data: names of classes, subjects, teachers. When working at the project, drop-down menus will suggest them: a simple typing error would ruin everything.
b) Create the classes: insert teachers and their related subjects, the weekly amount of hours and any other preference.
- ATTENTION: here you establish the conditions that must be met by the automatic assignment of hours: how many hours per week, if you want consecutive hours for class tests, if you want them before a certain time, if the lessons can all fall on consecutive days or you want at least one gap day between one lesson and another. BE CAREFUL NOT TO IMPOSE CONDITIONS THAT CANNOT BE SATISFIED!
A PARTICULARLY IMPORTANT CONSIDERATION ON "CONSECUTIVE HOURS" AND "GAP DAYS": THE TWO CONDITIONS MAY COME INTO CONFLICT.
If the same teacher teaches more than one subject, we'll build the required consecutive hours using the different subjects assigned to that teacher.
I try to explain myself with an EXAMPLE:
case A: prof. Rossi teaches Italian in the 1st class for 4 hours a week. In my experience I have to give him two consecutive hours for the class tests, so he will see the class 3 days a week, a day with 2 hours, the others with an hour. Always in my experience it is good that these three days are not consecutive. So when you insert a 4-hour weekly load for a subject in the class building page, the program will suggest you to give a double-hit and leave an empty day between classes. Normally it works.
BUT case B: our prof. Rossi teaches Italian for 4 hours a week and Latin for 3 hours a week; the program will suggest the same solution, but the scenario is completely different. In making the "double" the automatic assignment script will use one hour of Italian and one of Latin (we don't want to give him on the same day and in the same class 2 hours of Italian for the class tests + 1 hour of Latin: heavy for him and for the students). So the 4 hours of Italian will fall on 4 different days and the request for a gap day - with 5 days of weekly work - becomes very heavy: if repeated for many teachers it makes the automatic assignment of hours very long, perhaps impossible.
So when filling in the construction page of the classes use your head and don't blindly trust the predefined solutions I offer you for convenience: in case B it will be reasonable to say NO to the request not to use consecutive days, even if the default answer is YES.
c) Set the teachers’ preferences: you’ll be asked if they have days off, which ones and other preferences.
- NOTE: in the general settings we ask you how long the daily-lesson lasts and on which days a teacher is not available. Obviously every class has different daily-lesson length as well as different working days. By using the wildcard ###, you can lock the hours not to be used in the timetable of each single class. For example, if some classes have 6 h/day and others 5, you’ll have to set a six-hour working day and the go to the ‘short’ classes timetable and lock the 6th hour by hand. The same goes for teachers: save time indicating Tuesday as a day off - we’ll lock all the hours of the day. If you don’t want him/her to work on the 1st or last hour on Saturdays, open his/her timetable and lock the unnecessary hour. Locked hours will neither be moved by the automatic allocation function nor will you be able to move them by hand. You’ll have to unlock them before (the item is in the menu) – you should really prevent errors.
d) You are now ready to compile the timetable. The automatic allocation function should run correctly. I’ve tried it on three different timetables. Provided that you don’t have fed restraints that cannot be met, the timetable should be completed successfully. You can choose to work at deeper levels, but I highly advise you not to go beyond level 10. The processing time would be very long and you’d probably deal with an impossible timetable. It will be necessary to modify or violate some restraints - days off, request for double hours, co-presence prohibition on the same day, vacant days - between one lesson and another. You can violate them working by hand: the automatic allocation won’t do that – at least it shouldn’t; if so, there is a bug in the program. I recommend not to violate the conditions: it’s better to modify them by making the constraints less strict. In this way you can re-launch the automatic allocation function to complete the timetable. Above all, you can rely on the verification utilities. The ‘ control panel’ is a rather refined function: everything should be green (all hours allocated) or yellow ( non-allocated hours without errors). If something goes wrong, you’ll find different colors that allow you to identify which error was made for either the class or the teacher. If you voluntarily feed constraints violations, errors will be reported and it will be difficult to distinguish between those you willingly made and the missed ones.
e) You also have a function to remove off-hours. The script works on absolute values; it tries to reduce the total number of off-hours to no more than three per week for each teacher in the school. Then you’ll have to finish by hand, but it should do a good ‘cleaning-job’ for you.
f) At this point you still have to balance the timetable by hand. Of course you can do everything by hand since the beginning, but it is very tiring. Anyway if you keep the control panel open and updated, you can easily spot a mistake.
g) After this step, you finally have your baby-timetable 😊 and it’s time to publish it. The menu ‘file’ has two functions: you can either export the timetable in cvs format and then import it into a spreadsheet to refine, adjust and print it, or you can print directly from the program. I tried to find an easily readable graphic layout once printed. ATTENTION: I can’t guarantee that the print function will work, since it depends either on your OS or on java ability to find the default printer. You’ll find some suggestions on the ‘print’ page.
LATEST NOTES
From the start page you can duplicate or delete projects. When some work is done, it’s highly recommended to duplicate the project with a new name. So you won’t lose it and can go on experimenting. The program does not offer UNDO functions.
All your projects are inside the folders with the same names as the projects you create. You will find these folders in the 'projects' folder. The data are stored in xml files. You can also copy the folders on a safe place: just put them back to the ‘projects’ folder to use the stored projects again.
Good luck! Feel free to contact me and if can’t keep yourselves from showing some gratitude, please make a paypal donation: it would be a pleasant surprise!
email: alessandroxbrunelli@gmail.com
home page: https://www.alessandroxbrunelli.com/