Hello there,
first of all: Thank you very much for your good work!
I have a little suggestion - or maybe rather a "wish":
I am a teacher at a vocational school (Berufsschule). Here, every four weeks a new "activity planning" and then a new timetable is needed.
I know the "activity planning" (appointing teachers to classes/courses mainly depending on their hour contracts) is a responsible job, which maybe should not be done automatically by a computer but with a lot of wisdom.
But as it is needed every four weeks at our school, I wondered if it is possible to automatically generate some suggestions for this "activity planning". Of course there would have been some constraints, that need to be defined, like:
- individual contracts for each teacher regarding hours/week (workload)
- general approach, that the teachers stay "in their classes"
- every teacher with only one subject in the same class
- some teachers may only be appointed to "lower" courses
- some teachers may not be appointed to class XYZ
etc.
What do you think? Is that somehow possible?
Many greetings from northern Germany,
Christoph
Hello, Christoph, and welcome to the forum!
So, apart from the tedious handmade activity planning, did you use FET with success in your institution?
I think that if you have decided on a definitive activity planning, FET will find a better optimized timetable (such as lower gaps number) than if you would create an automatic activity planning and scheduler. But I might be wrong.
There is FET mapr, where a real teacher = a FET room. I hate it, really. Because in some cases it did not produce useful results. Because it is difficult to work with. Because it is old. Because each time I use it I need to read again its documentation, as it is difficult and I forget how to use it.
With FET mapr your 5 requests might be manageable. For the first one, a FET room = a real teacher has a constraint of maximum load per week. It might be sufficient (without the minimum load per week)? For the second approach, I am not sure I understand correctly, but it might be possible. The third - might be possible with a new constraint or as it is now. The 4th and 5th, I think it is possible with preferred FET rooms = real teachers constraints.
It might be possible with other tricks. Recently, I worked with Peter B from the forum, with success. Please see https://lalescu.ro/liviu/fet/forum/index.php?topic=3961.0 (only the beginning is in German). Unfortunately, I cannot show you his file, it is private. I devised these tricks: FET hours = real teachers, FET days = real hours (he has a timetable for only a day, but it might be possible to extend for 5 or more days). Then allocate activities with students to these time slots, and having time preferences.
Or maybe other tricks. You might also have some ideas.
I am willing to continue this discussion and try to help, as possible. I am also willing to make some customizations, as possible. But I do not promise anything (in both).
You might want to share your data or model of timetable with us. If it is private, you can send it by email.
Hello Liviu,
thank you very much for your answer.
Apart from playing around - I didn't use FET for serious timetabling in our institution yet. We actually use "Untis" for this purpose - and a big Excel sheet for the "activity planning".
You asked about my second request for the wanted "automatic activity planning" (the general approach, that the teachers stay "in their classes") - so I will write a little about our institution:
The students make a "dual education". They normally work at their business, but within 3 years, the students will have to visit our school for altogether 8 times - always for 4 weeks. That means, every 4 weeks we need a new activity planning and a new timetable.
On average we have 30 classes simultaneously at school. They are all different regarding their progress ( course 1 to course 8 ). I guess this would be "years" in FET.
For example, let's say we have 5 classes there for the first time (course 1), none for the second course, ...
5 classes in course 1
0 classes in course 2
5 classes in course 3
10 classes in course 4
8 classes in course 5
2 classes in course 6
0 classes in course 7
0 classes in course 8
4 weeks later it will look very differently. And another 4 weeks later, a class will maybe return, but is now in the next course.
Now let's talk about the subjects. They depend on the course number. For example, in course 1 you have "audiology" with 4 hours, and "psychology" with 2 hours. In course 2, you maybe have "audiology" with 6 hours and no "psychology" at all, but another subject.
And now concerning the teachers: It is desired, that the same teacher teaches the same class in the same subject for all the 8 courses. This is sometimes not possible, because of the teachers "target hours". And also because of the teacher's qualified subjects. For example, a teacher can teach "audiology" in course 1-4, but not from course 5 upwards.
So maybe it would be helpful to define the subjects together with the course number? For example "audiology1", "audiology2" etc.?
So, I just wanted to add these information to make the wish maybe a bit more handy.
So - what could we check out first? FET mapr, that you hate? :)
Or maybe the FET Peter B. version?
Many greetings and thanks,
Christoph
I will now read more thoroughly, but it is difficult, since I was never involved in real-life timetabling.
Please tell me what is a class. A student, a set of students? Let's try to use FET notation, as students set, room, teacher, subject, activity and activity tag. The students in FET are organized in years, groups and subgroups. Does not matter too much, you can think of a tree. You can even input only years, but adding years like V, VI, VII, and VIII containing groups is easier.
Are students' gaps or teachers' gaps constraints necessary?
I would find very useful some pages of your final timetable, and maybe the list of activities, to be attributed to teachers.
It is best if we consider the smallest students set (maybe FET group, and not use FET subgroups) as all the students having the same activities (I don't understand exactly what is a block, I will read more carefully).
I don't know yet if we could try Peter B method, mapr or another new method with tricks. Let me read/think some more and maybe you can send me some pictures, tables, and schemas.
Hello,
I will attach a screenshot of an old "activity planning". These plans build always the base for our time table.
You will see the data for 12 classes (18.Q-B7 to 19.E-B5). The list in real is longer, it contains 32 classes.
A class like "18.Q-B7" is a "set of students", about 30 real young wonderful persons consisting of flesh and blood :)
The "18" means that they will make their exam in 2018.
As we have many, many classes, that will make their exam in 2018, we have 18.A to Z and also 1-9.
The "B7" means that they are in the 7th course. As I wrote earlier, each class has to come to school eight times for eight courses, B1 to B8.
Back to the attached graphic:
Each class has a class teacher, e.g. the 18.Q-B7 has teacher "CocU".
Sometimes this changes: The 18.O-B6 now has MueD, but in the course 5 (B5), it was SchC. That is what # before a name means.
Now to the subjects:
You see 6 subjects: a) PO/WiPO, b) BW/GA - in the table columns.
And you see the teachers, that teach these subjects with how many hours in the table cells.
For example, teacher Fues teaches AK/SI in 18.Q-B7 with 8 hours.
You can also see, that in course 5 (classes with *-B5), the subject AK/SI is not needed, because the cell is empty.
To make it more complicated, for many subjects, we have "theory lessons" and "practical lessons", which sometimes the same teacher does (which is wanted). Sometimes this is not possible because of teachers target hours, then another teacher does the practise lessons.
For example: KolA teaches AL theorie in 19.B-B5 (8 hours) and KolA also teaches AL practise in 19.B-B5 (4 hours).
So, I guess I will need a program to fill the table cells with teacher names. Generally trying to keep the teachers in the class and respecting the other constraints that I wrote in my first post.
Thanks a lot for the offer to think this through.
Many greetings :)
Thank you for the clarifications! Very on-target ones, and clear.
One question: you said there were 32 rows (real classes = FET students sets). But A..Z and 1..9 is 26+9=35 > 32?
I will try. Maybe we'll obtain something. Maybe like Peter B's used tricks. I also thought of another FET custom version with tricks which was very successful: https://lalescu.ro/liviu/fet/forum/index.php?topic=1782.0 and which resembles your data. In fact for dolphins I used FET official, only customized the output HTML files.
I will be back tomorrow. Now it is late in Romania :)
PS: Of course I need to re-read your post. I think I will print the picture and your post.
Hello,
regarding your question:
The activity plan with xxx rows changes every 4 weeks. The xxx (e.g., 32) stands for the classes, that are actually physically present in the actual 4 week-slot. This number xxx changes every 4 weeks. For example in May, we might have 32 classes present, in June maybe 34 or 31.
The other thing (A-Z, 0-9) was regarding the *notation* of the classes. We have 18.A to 18.Z and numbers and even some special characters. This only means, that we have many many classes, that will make their exam in 2018.
So, two different things: a) amount of actual classes present for 4 weeks and b) total amount of classes in one exam year.
Thanks and good night for now :)
Please tell me:
1) The thing with # in your previous post, it is for 18.O-B6, and you say course 5 (B5). I do not understand. I thought this class (=FET students set) has course 6.
2) Maybe you could post the picture in a better format, so I can see the print better (this point is not critical).
3) Please tell me the maximum number of students sets and teachers you can have in the table. There are always n_students_sets rows and 6 (n_subjects) columns?
4) For instance in 18.Q-B7 and AL. There are 3 rows in that cell. Can we consider only 2 rows (KauM with 8 and BabA with 4)?
5) I don't understand the role of column KLehr.
6) Very important: teachers have a _maximum_ limit on the number of hours they teach per week. I think I cannot devise a constraint for the _minimum_ number of hours they teach per week. Is that OK?
I am thinking now of two possible approaches.
a) One follows the idea of FET-mapr but is simpler: allocate n_students_sets*6 activities which are fixed in time to n_teachers rooms, permitting maximum 2 activities in a room at the same time. An activity will have the number of students equal to the duration in hours and the FET rooms = real teachers will have a capacity in number of students.
b) The other one follows the idea of Peter B and dolphins custom versions, but is a bit more complicated because of the fact that cell activities have a duration. Consider FET number of hours = n_students_sets, and FET number of days = 2*6*n_teachers (2 times because of practical and theoretical). Put the n_students_sets*6 activities to these slots, careful not to overwhelm teachers.
Hello,
5) every class (=every group) has a "KLehr" , the "class teacher". the class teacher has some extra tasks/duties with his/her class. Maybe it can be defined as a subject, but with 0 hours, I don't know. The class teacher also has to teach the group in one (real) subject.
1) True, 18.O-B6 means, that this group is actually in course 6. But before that, this group was in course 5. And when they were in group 5, they had SchC as class teacher. The # always means that there is some kind of change with respect to the previous course. Because the class teacher (and all other teachers) are supposed to stay the same for each group over the 8 courses, but this is sometimes not possible. This means that somehow FET must know about the past when making an automatic activity planning(?).
2) I will send you an actual activity planning as a pdf privately.
3) The max number of groups is actually 33. sometimes we only have 32. that depends on another planning regarding the whole school year.
The n_subjects should maybe be 7*2+1 = 15. This should lead to the following, that we will only have one teacher per cell.
4) Let's try to increase n_subjects, so we will have only one teacher per cell (see point 3).
6) I think this minimum_ number is not a problem for now.
I hope this cleared some stuff. Wow, but while I wrote these lines, I realized, that this whole task might be quite complicated :(
Many greetings!
Hello,
Please tell me the maximum number of total teachers (who can appear in the timetable). It was a question in my previous post in (3), but you might not have seen it.
Ah, sorry, you mean the total amount of actual teachers at our school? I guess, we have something like 90 or so. Maybe you should set the maximum to 100 ???
It might be possible, but we need to work a bit on this.
I think maybe in a manner similar to Peter B's and dolphins' tricks.
We need 33 FET hours = real students sets. But the number of FET days will be very large. n_subjects * n_teachers. So 1500. But don't be scared too much. This might be done automatically. I need maybe to add one or a few new simple time constraints. And increase the maximum number of FET days per "week" to 1500.
The output will be made smaller, you won't see 1500 columns, but 15, like I did for dolphins. Or directly output to a .fet XML file to be opened by the official FET and solved (I did not think of this, yet, it might be more complicated).
Each activity will have a number, which represents the real duration (4, 8, 2, or 6, or ...). I think we could use the FET's activity number of students, so that I don't need to implement a new variable. And a teacher will have the target number of hours, and implement a constraint so that the sum of the table 33 rows x 15 columns for this teacher will be maximum this teacher target number of hours.
You can add preferred time constraints from previous years. You can use the constraint activities preferred time slots with weight under 100%. So that FET will try to keep previous course teachers for the students sets.
I think the class teacher can simply be ignored, since you can have duplicates like for students sets 20.7-B5 and 20.A-B3 in your private file? (I did not write here the name of the teacher on purpose).
It is a very large matrix, 33x1500. Say activity A (students set 19.1-B8, subjet WiPo, no FET teacher) will have real duration 4 and can be scheduled only on the columns with heading WiPo for all teachers. So 100 columns will be allowed in the preferred times constraint for this activity and 1400 columns will be forbidden. And the sum of the real durations of activities in the 15 columns of each teacher must be at most the number of total working hours per week for this teacher (I think I need to add a new constraint for this, might not be that difficult). And on each row (students set), a teacher must teach a single subject (so can occupy only one or two columns - these two columns for theory and practice).
These tasks might (in fact should, we can't really think of clicking the mouse inside a matrix with 1500 columns!) be automated, from another program outputting the .fet XML file for this custom FET.
It is a large matrix, but mainly empty. So the solving time might be acceptable. I cannot know for sure.
Please tell me what you think.
Hello there,
first of all, it sounds good what you write. And I even might begin to understand what's going on :) But my head is buzzing ... :o
This time we don't want to have a 3-dimensional time table (FET days x times/periods (FET hours) x group) with teachers in each cell.
This time we need another (2-dimensional?) table: groups x subjects - also with teachers in each cell.
Still a table is a table, so the algorithm to solve it, should work here aswell. Is that kind of right?
But when I read your post again ... and again ...
Well, I understand 33 FET hours as real student sets (="y-axis"). But then you write: FET days ("x-axis") would be 1500. From my understanding, it would be only n_subjects (like 15 or so).
It seems like I have not fully understood. The new table will maybe be also 3-dimensional, right? My head buzzes ...
Anyway ...
Regarding the "class teacher": Yes, one teacher can be the class teacher for group A (actually in course X) and also for group B (actually in course Y). Like the class teacher from 20.7-B5 and 20.A-B3.
I'm not sure if we can ignore this feature. Each group needs a class teacher. And this class teacher extra duty shall be uniformly distributed over all teachers.
Thanks a lot Liviu for the whole brain work.
I want to show you how I did with dolphins. The custom version (old) is on https://lalescu.ro/liviu/fet/download/custom/dolphins/ . There is an example file there.
I attach the outputs of FET for dolphins. The first one is "compressed" for human reading (generated with FET-dolphins custom version), the second one is output using FET-5.37.6 unreleased yet from my hard drive - uncompressed (the two timetables are not equal - I could not do this, since the algorithm changed a bit between the versions). Open the 2 HTML files with the internet browser.
It allocates patients to dolphins in time slots. Please let me know if you need more details to understand the idea. Only the idea, not the exact details. You can also see the constraints list.
What I have in mind is having a 2 dimensional matrix, but in which columns are like: "first_teacher WiPo theory", "first_teacher WiPo practice", "first_teacher GA theory", ..., "first_teacher OP/Engl/OP practice" (7*2=14 until now), then for second_teacher, then ..., then for the 100th teacher. The rows are simply the students sets.
About class teachers: isn't it very easy to choose a teacher from the 7 (subjects) for each students set?
Let me know what you think now.
Thank you very much! This made it very clear for me. So, many many columns!
And inside the cells will be the hours, right? But then 7x2=14 rowsums must be build for each teacher. And this sum(rowsums) must be fit to the target hours of each teacher, right? is that possible?
And we will of course have many cells with a 0.
--------
About class teachers: isn't it very easy to choose a teacher from the 7 (subjects) for each students set?
--------
Well. Maybe yes.
I just had a look at the dolphins .fet file and I remembered better.
The matrix n_students_sets x 14*n_teachers will contain in each cell an activity or nothing/void. An activity will have no students specified, no teachers specified, only the subject specified. There will be at most 14*33 activities to be placed based on the preferences, specified by constraints preferred time slots, and by validity constraints (so that a teacher respects his maximum working hours and a students set studies with only a teacher a separate subject).
Please let me think a bit more. We might make only 2*n_teachers = 2*100 columns and 33 rows, if we consider a column for each teacher theory and practice, and the subjects (a subject for each activity) will be in the cells, or a cell will be empty. I will write after some thinking. It is a bit different from dolphins and Peter B, because (real) time is not important for you. This is why I did not think of this from the beginning.
And each activity in a cell will have a separate number, which is the real life duration, and the maximum for each teacher must be respected. I plan to use the activity number of students for this, and add a new constraint.
Yes, it seems possible with 33 rows and "only" 2*100 columns. Each teacher will have 2 columns, like: "Teacher t1 theory", "Teacher t1 practice", there are 33*7*2 activities. Each activity will have no students, no teachers, and only the subject specified (and the real duration and maybe activity tags for helping in the scheduling). Allocate these activities in the matrix. Each cell of the matrix will have an activity or will be void.
I will send you a small drawing I made by hand, let me know if you understand it. If you want (if there are no privacy problems), please post my drawing here.
Thank you for your drawing, which I will attach here ...
Still I wonder how it is realised, that FET will know the "past activity plannings", because the actual activity planning shall be based on past ones. Do you know what I mean?
Maybe ALL groups (classes) from our school need to be included - so the groups x teacher will not be forgotten? And only these groups that need an actual activity planning get a tag or something?
Quote from: Christoph Voelker on May 12, 2019, 06:36:45 PM
Still I wonder how it is realised, that FET will know the "past activity plannings", because the actual activity planning shall be based on past ones. Do you know what I mean?
In my drawing, A1, A2, A3, and A4 are for students 19.1-B8. These activities will get preferred time slots 100% for the first row. So 100% forbidden for the rest of the rows.
Now you can add more preferred times constraints, strictly less than 100%, for say A1. If last time 19.1-B8 learned WiPo from PalM, you will add something like 95% (or less, or more, this is practically decided) for A1, slots "PalM t" and "PalM p" (so 95% forbidden for all the other 33*2*100-2 slots, and in fact 100% stronger forbidden wins for rows 2..33).
Preferred time slots constraints work by forbidding with the highest percentage from all the constraints for that activity and the opposite slots.
I hope I am not mistaking.
Please let me know if this is an acceptable method of working.
Quote
Maybe ALL groups (classes) from our school need to be included - so the groups x teacher will not be forgotten? And only these groups that need an actual activity planning get a tag or something?
So 8*33 rows? I am not sure I understand exactly, but if the above method does not work I will try to think about this.
Hi there,
I think I will have to sleep over this as my head still buzzes.
For the last hour I was googling timetable stuff and found out that one can write PhD theses about this topic.
Just a little question: Your algorithm for solving - is it a genetic algorithm approach?
Good night! :)
Quote from: Christoph Voelker on May 12, 2019, 07:28:49 PM
I think I will have to sleep over this as my head still buzzes.
I am sorry :) . I did not know from the start the best solution (which I hope we found). It is a new situation, and we need to apply tricks and customize.
Quote
For the last hour I was googling timetable stuff and found out that one can write PhD theses about this topic.
I did not yet meet a teacher to propose me for that, and also I am maybe more on the practical side. But I tried to describe the algorithm and to write clear code.
Quote
Just a little question: Your algorithm for solving - is it a genetic algorithm approach?
FET version <5.0.0 (2002-2007) was genetic, very weak algorithm, could not solve real-life timetables. Volker joined the project in 2006 and convinced me to hunt for a better algorithm to solve his real-life data file which could be solved by another program. And I found the good algorithm in 2007. It is heuristic, but a more clever heuristic, and you can read about it on the documentation page of the FET homepage.
Quote
Good night! :)
Good night! :)
Hi there,
I am still not sure if I can image what will go on there ...
A1 to A4 are activities? And what do you mean by "time slot"? A table cell? Or a multidimensional table cell?
Maybe we should just try this out with some data and try to reproduce an activity planning?
Maybe we will then find out, that defining the contraints etc. will take as much time as doing a manual activity planning :) But maybe not!
In the order of your questions:
Yes, A1...A4 are activities. These activities will have no students sets, no teachers, a subject, real duration (as a new variable to be added by me or using a trick: use for this the number of students, which is unused in real-life), and possibly activity tags to help us with the constraints.
(FET) "time slot" is a single table cell, from the 33 x 2*100 table.
OK, I will try to make a very small example for you, I think I will l do it now, for my example with A1...A4. I can also do a larger example, let me know.
I think I need to add two constraints: one so that the working hours of the teachers will not be higher than the limit, and one so that the theory for an activity will be preferred to be taught by the same teacher as the practice, if there are defined both activities.
I hope not. We can derive some automatic tools to create the .fet XML file for FET (you can open one example with a text or XML editor to see it). Then FET will generate the activity planning, which can be converted to another .fet XML file to be fed into FET official for the final scheduling.
I did a very small example, for my drawing. I attach it here. Please open it with FET official (neglect the warning, I have on my hard disk 5.37.6 unreleased yet) and generate. Then open fet-results/index.html, and see the activities.html. You cannot see the timetable from the FET interface, since there are no FET teachers or students sets.
Please see the data that I added in FET. And remember that I need to implement two new constraints, as I wrote previously.
The preferred times constraints with 95% weight are preferences from your timetable. You can use similar to keep the teachers from the previous timetable to the same students sets.
Well, this sounds all good. Is the time ready that I can feed it with some more realistic data and check if something useful is generated?
Thanks and good night :)
You are welcome! :)
So you need to add maximum 2*7*33 activities, with maximum 33 rows (FET hours) and maximum 2*100 columns (FET days).
Hmm, the maximum number of FET days is 35, in FET official. I will need to increase these to 200. I will let you know when such a version is ready (I hope soon, it is an easy change).
You can add the data, but you miss the two constraints: teachers total number of working hours (and each activity will have a "real" duration) and that if a teacher teaches theory (or practice) for a students set and subject, it is preferred to teach practice (or theory) for the same students set and subject. These will take longer to implement.
Did you understand everything in my small example? Every activity and time constraint?
I made a version with max 200 FET days per week. You can get it from https://lalescu.ro/liviu/fet/download/custom/christoph-voelker/
I forgot a constraint: all activities are not overlapping. I added this constraint in my latest file (liviu2.fet, attached here).
Also, in this file, I thought of an improvement. The number of columns is 100 (one for each teacher), and the number of rows is 2*33 (two rows for each students set - theory and practice). See the attached file. In this way, a constraint is already implemented, so that a teacher prefers to teach both theory and practice to the same students: constraint activities same starting day, <100% (like 95%).
I need to increase the maximum number of FET hours to 2*33=66.
Please tell me what you think and I'll also do this (increase max FET hours to 66) soon.
Run the example and see activities timetable HTML.
Dear Liviu,
thank you very much for the effort and my own custom version.
I will try to find some time in between to fully understand your example and how to use it. This might take a little as I am "back in school mode" :)
Thanks again,
Christoph
OK, I will wait for you. But meanwhile I created a new custom version, with max 70 FET hours per day, as I said. The same location: https://lalescu.ro/liviu/fet/download/custom/christoph-voelker/
Thank you!
Can you read *.xlsx files?
I would like to send you one privately and ask some questions :)
I hope so. I have LibreOffice (working under openSUSE Tumbleweed GNU/Linux).
Yes, please send :)
Hello,
in your example file liviu8.fet you defined 8 ConstraintActivitiesSameStartingDay.
They were all for the hour (= real group) 19.O-B7 connecting theory and practice for each subject.
Do I have to define these 8 constraints for each real group (8*33 = 264 times)? As I can write code to do this automatically, this wouldn't be a problem ...
But can we maybe make a more general constraint about this? Maybe using the activity tags theory and practice?
Thank you ...
Hello,
To the other people: Christoph is referring to a private file I sent him by email. If it is not really private, Christoph, you might want to share it here.
Yes, it can be made simpler. But it is more general in the current way, and also I prefer to use the official FET features as much as possible. It is very easy to add such a constraint in the generating code, but in the GUI it is more difficult.
Also, you can make some constraints with say 99.75% and others with 95% (fine tune).
Hello Liviu et al,
generally I'm totally fine with sharing this. But maybe at a little later stage?
I can imagine sharing the Excel file as well, which then was (for me) the base for the FET automatic activity planning. In that Excel file will then be teacher names like AAAA, BBBB, and randomly distributed "target hours". Maybe we could have a FET custom version, which is then not called "christoph-voelker", but "automatic activity planning" :)
But we will first have to get it working with the Target hours. Or is it working already? :)
Quote from: Christoph Voelker on May 17, 2019, 04:47:45 PM
Hello Liviu et al,
generally I'm totally fine with sharing this. But maybe at a little later stage?
Of course!
Quote
I can imagine sharing the Excel file as well, which then was (for me) the base for the FET automatic activity planning. In that Excel file will then be teacher names like AAAA, BBBB, and randomly distributed "target hours". Maybe we could have a FET custom version, which is then not called "christoph-voelker", but "automatic activity planning" :)
Yes, very nice. If you want I can change the name of your custom version right now, but I am not sure so many people use this organization of data. Or am I wrong? Usually I create a new version with the name of the person who proposed it and in case it is very useful maybe rename to something more general. But "automatic activity planning" is too long (in character count) and also claims to solve all such problems.
Quote
But we will first have to get it working with the Target hours. Or is it working already? :)
Actually, I wanted to check that everything else is working. But I can begin working on target hours, and in fact I think I will. It was best if we could synchronize, me finishing the new constraint and you providing me a real test file.
Explanation for the others: We decided that the real duration of activities will be stored in the number of students for an activity, and generalize the constraint "activities occupy max time slots from selection" to constraint "activities occupy max
real time slots from selection" or something like that, selecting all the activities, all slots of a FET day = a real teacher, and specifying the maximum real total duration.
I made this custom constraint and it hopefully works as expected. The new version, 3, is on the same location: https://lalescu.ro/liviu/fet/download/custom/christoph-voelker/
We updated this custom version. It is now called AAP (automatic activity planning). We have a nice anonymized example.
The new location of this custom version is: https://lalescu.ro/liviu/fet/download/custom/aap/
Hello there,
I just played around with your feature to also make a normal timetable afterwards.
So I add real days and hours (5 days x 4 hours) in normal FET and import groups and activities from phase 1 (FET-AAP [pretty good! :)]).
When I now try to solve the timetable, I get: Cannot optimize for subgroup 19.O-B7 Automatic Group Automatic Subgroup, because the number of hours for subgroup is 23 and you have only 5 days x 4 hours in a week.
So, do I maybe need 8 hours per day?
Our hours/lessons are always 90 minutes and they count as "two".
Hello,
When I export to activities.csv I divide the real duration of the activity by 2. So you need only 4 FET-phase2-official "hours". But if I look at that private timetable that you sent me, these students are divided to make 8 hours in 4 for a set of activities, so you will have only 23-4=19 hours in total.
There are two solutions for this: either divide the students year, or combine the activities.
This will require either further customization of the export of FET-AAP-phase1, or a manipulation of the files between phase1 and phase2.
In my example .fet file to be fed to the official-FET-phase2, I just increased the number of hours per day so that the imported file will work. I forgot or did not want to write this in the readme (because it refers to your private data).
Okay, thanks for the clarification. I can imagine to do some more GNU Octave tricks between phase1 and phase2 then :)
My pleasure! :)
If you opt for the division of years: divide a year automatically according to categories in FET (or just add 2 groups in it? - I am not sure about your structure - we need to clarify this). Then see how FET exports the CSV students. Then the activities will need a bit of modification (the number of activities will remain the same, but the students for the divided activities must be modified). Hmm, I think maybe you could add the divisions in the Excel file, in another sheet, then I can customize further phase1-AAP-FET, then it will output the correct students and activities.
If you opt for the combination of the activities: the phase2 output might not look as you want/so nice. In each combined activity you need to consider a new subject, add a single students set, and two teachers. Again the same things as above might apply.
To choose one of the above, you might want to make a small simulation of both methods, from the official-FET interface.
Hello there,
the visible output of phase one (Einsatzplan_students_subjects_table.html) is already really nice.
But as we didn't care about a *minimum* of target hours yet, but only that the maximum is not passed over - is there a possibility to sum up the actual hours for each teacher and show it in another output?
Something like:
Teacher TargetHours ActualHours
AAA 26 20
BBB 24 24
...
Or is this information in some other file that I could import/convert with GNU Octave?
Greetings and thanks a lot,
Christoph
Hello,
I will think of the minimum target hours for teachers, but I think it is very difficult to impossible.
What you ask should be very easy.
The information could be derived from _activities.csv file which is generated by phase1 in fet-results. This file is CSV and on each line you have a teacher and a total duration.
But I could very easily write the code to output what you need as an HTML file.
Let me know what you choose.
If you can "easily" write code to generate another HTML file like:
Teacher TargetHours ActualHours Difference
AAA 26 20 -6
BBB 24 24 0
...
... well, Dear Liviu, how could I say "no" to such an offer?!?
:)
OK, beginning work. The order of teachers in this table should be the order of the FET days in the phase1 file?
Wohooo :)
Yes, please.
It is ready and seems to work. The usual location: https://lalescu.ro/liviu/fet/download/custom/aap/
Thanks a lot. This is looking very good. I can make multiple tables and then check manually the Einsatzplan_teachers_working_hours_table(s).html for negative differences.
I think I can maybe also make this automatic: I could start FET from GNU Octave and generate timetables until no teacher has a difference which is maybe < -6 or so ... while ... do ...
Or is there a possiblity to make this an "overall" contraint?
I think that what you suggest (an "overall" constraint) is equivalent to min working hours for each teacher.
Please allow me to think at it.
It is possible to customize FET so that it will generate timetables and dropping them until finding a good one. But I don't like the idea.
Hey, I think there is good news! :)
Just think of the negative/inverse of the constraint activities occupy max real time slots from selection. Add all the activities, select all the slots of the other teachers without the teacher in discussion (T1), and max occupied so that the minimum is respected for T1.
Say that all the activities have duration 2000 real hours in total. And T1 should have minimum occupied 18. Then max occupied for our constraint will be 2000-18=1982 real time slots, selection = all the slots without those of FET day T1, activities = all of them.
I am very curious if this will work. Let me know (if you can design such a file from GNU Octave).
A bad thing is that the .fet file will get very large, because each constraint will select many slots. I expect sizes of even 100-200 MB. If size is too large, I could devise a new constraint occupy min, but it is tedious and also I prefer to keep the number of constraints to a minimum and simplest possible.
I am not sure of the speed of generation. We need to test. I hope it will be OK, but might be slower. I hope not much slower.
If the speed of generation will be much slower, unacceptably slow, I have some ideas on how to improve it. But I am waiting and hoping they won't be needed.
Hello,
thanks for the idea, I think I managed to generate this by Octave code. The FET File is 64 MB.
So, I thought about some "general" minimum value, so I edited the Excel file that the same general value is subtracted from every individual TargetHour. The idea was to distribute the "minus hours" equally over all teachers ...
But at the moment it won't solve, it stops at 337/340 activities. I think it's a bit problematic that this ActivitiesOccupyMaxRealTimeSlotsFromSelection needs a weighting of 100%?
Many greetings!
It also doesn't solve when I have really really low values for the minimum hours. Hm, maybe I made some error in the generating code ... ???
I'll send you Excel File and compressed FET File :)
It is impossible to have <100% for occupy max constraints.
Maybe you need to lower the constraints which allow <100%.
If you want, you can send me the files.
OK :)
If the speed of generation is maybe too low with the constraints activities occupy min, I thought of a possible improvement if the selected slots are only of a FET day (so, a vertical column). It is not trivial, but it might improve things. The time for these constraints will be directly proportional to the number of columns (88) instead of with the number of active activities (~340). If you will have more activities, it might be a good idea.
Let me know if you need this.
Quote from: Liviu Lalescu on June 10, 2019, 08:54:20 PM
If the speed of generation is maybe too low with the constraints activities occupy min, I thought of a possible improvement if the selected slots are only of a FET day (so, a vertical column). It is not trivial, but it might improve things. The time for these constraints will be directly proportional to the number of columns (88) instead of with the number of active activities (~340). If you will have more activities, it might be a good idea.
Let me know if you need this.
Hmm, no, I think it won't work :( Anyway, the speed is acceptable for now.
I still do no not understand in the two custom versions fet aat and get aap what must users isert as data
in the other customs (we insert the school/days/hours of the day/teachers/students/subjects/ activities with teachers and students then constraints and we generate the timetable) the timetable is the end product,
But in these two versions our end product is normally ( specify the teachers to teach which groups)
please can you send us any explanation
Please read the readme.txt and in the examples you have some examples.