I have suggestions by more people about manual timetabling and/or drag-and-drop over finished timetable. Please let's have a conversation here. For private matters, you can write me and Volker by our emails.
I need ideas on how to do this. In what view, how to allow drag-and-drop, etc.
May the basic constraints be broken? Then how can I show multiple activities in a single cell?
I want this feature so much that I started to code myself.
My idea is something similar to "Activity planning": the grid can have different contents, for example different grids in different tabs, using the view/model so that they stay in sync...
The one I prefer is rows for teachers, columns for periods and in the cells the name of the students/class. Cells may be QLabel so that you can use html to style the text. If you need to put two student groups just use html to force a break... < br >
Another way is rows for classes, columns for periods, cell with subject/teacher, but it must be wider...
There should be QDocks so that they can be detached and put on another screen (I have two screens) to have more space for the main grids.
On these QDocks all the useful informations we need, like stats, a list of broken constraints, or penalties, or things to do.
One QDock should contain the weekly timetable of the teacher and another the weekly timetable of the class currently selected on the grid, so that it is easy to understand the situation.
One Qdock should contain the teachers list: a QTableWidget with two columns, the first a checkbox the second the name, when no row is selected, the main grid should display all the teachers, otherwise the main grid should list only the selected teacher. This should clean the grid when you need to exchange classes between few teachers.
Another QDock should contain the class list and work as the previous one. When you select a class, the main grid should list all the teachers that teach in that class.
Another QDock should contain the history.... well, I need to explain...
Changes should never be "final", we should record the movements of the cells as a sequence of instructions, something like SQL transactions. A lot of times we try to, for example, remove a gap for a teacher, start to move lessons around and discover that we created a gap for other 2 teachers... and we want to revert all the changes... we could have saved the original timetable or we can apply the changes in reverse order, like a sql rollback... Only if the changes are ok, we should commit, but also the commit is not final, is just a confirmed (and named) group of moves, so that they can be rolledback too... there are some pitfalls to take care but this message is already long.
About drag/drop... why add complications? The are several different and easier to implement methods... the first step in my program was to implement a QLine where to write commands:
<rownumber:teacher>, <columnnumber:period1>, <columnnumber:period2>
Lessons moves should always be inside one teacher... (at least in Italy school system...) so that in a cell there won't be two classes... remember that a move is actually a swap between the cells...
The second step can be to implement a right-click menu to specify the target of the move, or ... ok there are several ways...
The most important thing is that the swap must be able to break the constraints. FET can alert the user with messages, red cells, etc, but user must be free to try to move lessons around breaking all the constraints. ALL.
The GUI must help the user, for example when two cells are exchanged, the text or background must be painted in different color - I also chenge the class name in lower case... If a swap breaks a constraint like 2 teacher in the same class in the same period, both cells shoudl turn red...
Ok, I think you understood I have some ideas :-))))
Some nice ideas.
I am not sure about the grids that you prefer.
In TiTiTo there are totally 5 grids (2 very similar to your suggested one, the teachers timetable, the students timetable and the room timetable).
You can modify and move activities in each of that 5 grids.
It's depending on the situation you want to change. In most cases i noticed that the teachers, students or rooms timetable is the best view to do that.
For easy moves (so you already know what you exactly want to do and you already have got the idea how to do it) seeing one of those grids is enough.
But if you have "difficult moves" (so you know the problem, but you don't know how to fix it exactly, you want to do some try and error to check out how to solve the problem), then only one view is not enough. In that case you need to see all 3 tables at the same time. So as soon as you click on an activity the timetables must be updated to the clicked teacher, students set and room. As long as the activity contain only max one teacher, one students set and one room all is fine. But "saldy" FET activities can contain more teachers or students. Now there is a small problem that in fact you need to see also the tables of the other teachers/rooms. Each "solution" of this problem has got different advantages and disadvantages. On the other hand i am not sure if it is worth to add such a feature, because in fact it mean you done a bug before and FET is an automatic timetabling tool. The real bug is that the user forgot to add a constraint. If you want to do a manual timetable you can use other timetabling tools.
In TiTiTo i currently skip nearly all constraints, i only care about teachers, students and rooms basic constraint. I can disable the students basic constraint, in a few situation it is useful (if you are too lazy to split the groups, since a splitted group mean more subgroups -> more needed memory -> slower generation of a timetable. That is why i split it after generating the final timetable sometimes.)
If you want to to a manual timetable i think there are 2 variants needed:
1. Variant with caring about basic constraints (rooms, teachers, students) by that the user can't do a mistake. Adding checkboxes to disable that constraints, so a user can place 2 into the same slot if that is useful (for example for the not splitted students i wrote above. Or for activities that share a room if the activities are fortnightly.)
2. Variant: Very similar to the 1. Variant, but as soon as you move/drop an activity it should kick out the "problematic" activity into an "inactive activity" list like i done it in TiTiTo. The advantage of that kind of movement is that you will see the problems faster and the is easier to drop activities from cells, since in normal case will be only 1 activity in a cell than (instead of 2. The "old" that you want to move in the next step and the "new" that you just droped there)
have you thought about space constraints?
I remember when I had to make some manual changes on a few tables of teachers, I put three tables under my eyes:
Teacher tables
Student tables
and the tables of the rooms
Of course TiTiTo care about the room. So you can't move the activity into a cell if the room is already used at that time. But i think i will improve the way of kicking automatically activities in the next days like i wrote it in "2. Variant", since currently you can only select an activity yourself to move it into the "inactivity list" (and of course back from there into an allowed slot). I will maybe do a small video tonight since some user might not know what i am talking about. But i must do other stuff right now.
I think there is no need to add this manual functionality to FET. because this is contradictory to the "philosophy" of FET, namely the automation of timetables.
so it is better to leave things as they are in FET. and make these "manual tables" with other software such as TiTITo as presented by Volker.
I think that manual timetabling contradicts with the real functionality of FET. I mean that the real power of FET relies on an excellent automated timetabling algorithm. On the other hand, sometimes schools might prefer to modify an existing timetable instead of generating a new one (from scratch). Although mathematically, the modification of an existing timetable is not the best solution, sometimes for practical reasons, it's better to keep the major part of a timetable untouched.
Examples:
1) A new teacher arrives at school: Most of the time, (at least Greek) schools start the school year with many teachers missing. When a new teacher arrives, it's better to modify the existing timetable, so both teachers and students will not be confused.
2) Scheduled (planned) tests: Most of the time, teachers schedule their tests. So, its better to preserve the day (not necessarily the exact hour) of an activity which is going to be actually a (written) test. If one generates a new timetable from scratch for any reason, most likely these activities are going to be placed in a "better" position (regarding the entire timetable), but this is going to cause problems to the teachers who have planned their tests.
I could mention some more examples, which would lead to the same conclusion:
Automated timetabling is superior to the manual one. But, we should bear in mind that the partial modification of a timetable might be a better solution for a school (for practical reasons). This is the very reason that I suggested Liviu to make some GUI enhancements in order to facilitate the partial modification of an existing timetable, and of course we should thank him for implementing successfully this new working environment. I also "suspect" that further enhancements regarding the partial modification of an existing timetable could be implemented, but... these enhancements should also rely on the automated solution of a timetable.
Vangelis
i don't have the problem with 1), but in opposite if a teacher is ill for a long time it is the very same problem. so in those situations it might be useful.
i don't agree with 2). Because:
a) even if you manually change the timetable i noticed in the past that (some; in worst case even many) teachers also need to rethink/reschedule the test days.
b) in fact it was never a problem. even if we totally generate the timetable, because finding a new test date is easy; and even if it was hard to find we simply swapped the teachers. i remember years ago we even done that without saying that the staff team. So that guys even didn't notice that we swapped and there was never a problem with that. Some years ago i added a "swap" feature for this in TiTiTo. So now even the satff team can see/care about it very easy.
i use that manual changes normally only in 2 cases: if the activity is placed in the afternoon. So in fact i can place it at every day without a problem. but doing that is even easy with the current FET version.
b) if a move supervision activities. But FET won't help me with that, since FET doesn't support supervision activities. That is why i do that with other tools.
i reread mercurialuser suggestion. if you read carefully i guess he even suggest more than this. He also want to swap teachers in a timetable while caring about activity planning. I guess that is a feature that can be used at primary schools or at (small) university departments. But on the other hand in fact it is also not needed, since i can do perfect timetables just with pen & paper in very short time for those schools. If secondary school will mix activity planning and scheduling i bet most guys will get into big trouble. I know several guys that have got big problems just to do the activity planning. And i also know a few of those guys will try to do both at the same time; they will totally fail. A very skilled users might to that., but not "normal" users. It will be much easier for them to not to mix activity planning and scheduling.
So overall i think the manual scheduling might be useful in FET if guys don't need supervision planning, substitution planning or overtime payroll accounting, since you can do manual scheduling of FET timetables with such tools. But like i said in my opinion it need all 3 tables (teachers, students and rooms) and it need 2 variants (one that allow to place only if basic constraints are not broken and one that remove the activity that break a basic constraint)
Volker you are perfectly right, I forgot room constraints...
Yesterday night I just wrote down some of the ideas I was thinking in the last days, so I'm sure they are confusing... sorry about this.
I want to make clear that I'm not saying that FET is not good, actually it is very good ! I also don't want to create a timetable from scratch.
Yesterday was the official school opening day in my city. Teachers had the timetable wednesday and 3 of them (out of 47) voiced for problems. One was able to exchange periods with another teacher, the second teacher request was denied, but the third, actually has big reasons to voice... Her timetable is not good and needs to be changed. He also agree to add another gap hour... believe me, it is very complex to do changes for this teacher. I found one that needs 6 different swaps to just move one of her lessons...
So I'd like to have a tool that can help me to test changes and check constraints without blocking my actions. Is TiTiTo able to do this? It seems it is. It also does a lot of other things that are probably useful in Germany and other countries but not in Italy, due to different staffing rules for teachers.
FET is great, but as already said in this thread and as answer to a question from me in another, if the timetable is "difficult", it is not easy to unlock some periods/students/teachers and get a *different* timetable and generating a new timetable from scratch means that it all teacher will have different timetables, also radically different (also worst)... a risk they don't want to have.
It was Benahmed Abdelkrim who noticed the missing rooms, not me.
I didn't said your ideas are bad. I just want that we think before adding features. Adding those features needs days/weeks of coding and if we choose the wrong way at the beginning we might get into big trouble later.
Like the constraint interface. It is a very strict and nice implementation out of a coders / computer science view. But it isn't perfect out of a timetable maker view; i bet you noticed that already.
All designs have got advantages and disadvantages. And we should think about advantages and disadvantages first before we implement a new a new feature.
I didn't reject that idea at all. But as you can see i learned already a bit about advantages and disadvantages of that dialogs. I will upload a video in a few minutes, so you can see the advantages but also the disadvantages. We shouldn't run into trouble again if you can avoid it by thinking first.
So. My first video i done. So not so sweet. No sound, but also just 3 minutes.
see:
http://www.volker-dirr.de/moveActivity.mp4
As you can see i import a FET file and move activities. You can see in the combo boxes that not all time slots are visible. Slots with room conflicts are not visible. Slots with teachers conflicts are not visible. Slots with students conflicts are only visible if i check the "students collision" checkbox.
I can move activity not by drag and drop, but i can double click to set them inactive and place them again (So 2 steps. Drag'n'drop is of course better, since it use only 1 click, but it is also more difficult to code. I will maybe do that).
The second variant is to modify the activity directly. You can see that also in the video.
As you can see i can't set an activity if there is a room or teachers conflict. In most situations that is fine, but i think it will be useful in some other situations that it automatically kick the conflicting activity, so can/must move it into an other slot.
You can also see that it is not easy to see/understand what exactly is conflicting (teachers or rooms). I might display it as the "Students collision", but i already know that is not enough. You need to see all 3 tables (students, teachers and rooms) if you want to understand that problem and if you want to do a longer / more complex change/move of activities.
@mercurialuser:
Your suggestions are very complicated for me. I was maybe thinking of a kind of dragging an activity to other time slot. But even this is difficult for me, as I have no experience with these.
Please let me know if you can use TiTiTo for your problems.
In the FET teachers timetable view time horizontal from the FET GUI, you can work with the locked timetable, unlock some activities and generate again. Vangelis can tell you more. But this might not be what you need, since you need to relax some constraints and you don't know which, and also you don't know which activities to unlock.
I'll think about your suggestion in the next interval and let you know.
Also, besides TiTiTo there is Nouvaki's FET read ( http://fet-read.blogspot.gr/ - or see it in the Tools/Links section of the FET homepage).
@mercurialuser:
I am so sorry, but all the features you suggested look too many and too complicated for me at the moment. I have no experience in this kind of programming. I added the feature suggestion and this topic's address in the TODO, and I will think in the future about this.
I am so sorry.
This topic is not closed. We can talk some more, gather ideas, suggestions, and so on, and who knows - we might come up to something better.
I added a new direct move feature. So you don't need to set it always inactive anymore. You can move directly. I also allow to kick conflicting students, teachers or rooms if there is a conflict.
see:
http://www.volker-dirr.de/moveActivity2.mp4
(the old indirect only move is visible here: http://www.volker-dirr.de/moveActivity.mp4 )