FET Forum

FET Support (English) => Get Help => Topic started by: MHassanien on July 14, 2022, 12:23:55 PM

Title: How to group students with shared subjects with room capacity limitations
Post by: MHassanien on July 14, 2022, 12:23:55 PM
Hi All, I am new to FET and I have students belongs to different set of courses, e.g.
Set 1 will do course 1, course 2 and course 3
Set 2 will do course 1, course 4 and course 5
..etc.

There is a capacity limitation per rooms so students should be spitted into sub-groups to fit with the available room capacities.

So a student from Set 1, must have an available sub-group of course 2 and course 3 but can share course 1 with students from Set 2.

Any guidance/directions is greatly appreciated. Many thanks
Title: Re: How to group students with shared subjects with room capacity limitations
Post by: Volker Dirr on July 14, 2022, 01:31:32 PM
Sound like a course planing task that can be done with StElto to get FET groups.
see: https://www.timetabling.de/StElTo/manual/StElTo-manual.en.html
Title: Re: How to group students with shared subjects with room capacity limitations
Post by: Liviu Lalescu on July 14, 2022, 02:22:33 PM
I think you could use FET official or block planning, not sure: add 3 activities for each student, and there are many constraints, like activities occupy max time slots from selection and max simultaneous activities from set in selected slots.

I am not home, without computer, it is difficult to work and write, but I can write more when I'll return home. Maybe you can post your last year's timetable as pdf.
Title: Re: How to group students with shared subjects with room capacity limitations
Post by: MHassanien on July 14, 2022, 04:54:59 PM
Unfortunately, I don't have last year timetable as it consists of many pieces but I can create one manually now for a simple scenario using a simple logic.
Assume total of 300 students.
Set 1 of them of 60 students will do course 1 and course 2.
Set 2 of them of 30 students will do course 1 and course 3.
Set 3 of them of 210 students will only do course 1.
Course 1 will be divided into 15 groups, i.e. average per group of 20 students. Course 1 will have 4 sessions per week.
Course 2 will be divided into 3 groups, i.e. average per group of 20 students. Course 2 will have 2 sessions per week.
Course 3 will be divided into 2 groups, i.e. average per group of 15 students. Course 3 will have 3 sessions per week. Assume to add one teacher constraint that one teacher can teach course 3.

Assume we have 5 rooms with 25 capacity, 5 rooms with 15 capacity and 3 rooms of 20 capacity.
Possible timetable could be as on the attachment
#################
As you can see in the attached file, the students in Set 1 can still do their course 1 sessions without clashing with their course 2 regardless of their group on course 2. However, this can be more complicated with more constrains. I am not sure how to use categories/group/subgroup definitions in such scenario Many thanks for your help and guidance and your time. This is really appreciated  quick_timetable_draft.pdf
Title: Re: How to group students with shared subjects with room capacity limitations
Post by: Liviu Lalescu on July 14, 2022, 09:20:20 PM
I am not with a computer, so that is why it is difficult to answer.

I think you need to add 300 students, as subgroups in a year and group, 5 days per week and 4 hours per day, and 300 activities with subject C1 split into 4 per week, then 60 activities split into 2 per week for C2 and 30 split into 3 per week for C3. All min days between activities constraints have weight 100%, each activity with a single student. Then, to minimize the total slots used, apply a progressive aproach of all activities occupy max time slots from selection, with all slots selected.

Official mode, I think.

Rooms capacity: activities min/max simultaneous from selection.

Also useful: activities occupy min/max time slots from selection.

I hope it will work. Please let me know.

It will take me some more days to return to my computer to see exactly.
Title: Re: How to group students with shared subjects with room capacity limitations
Post by: MHassanien on July 15, 2022, 01:31:23 PM
Thanks a lot for your quick response and help. I have tried to do but I struggled with the group names, e.g. course 1 will have 15 groups while course 2 has 3 groups etc. So, I think to make entries like:
year: 2022, number: 300 students, group name:Course1-Group1, number: 20 students, subgroup: Set 1 student1, number:1
year: 2022, number: 300 students, group name:Course1-Group1, number: 20 students, subgroup: Set 1 student2, number:1
..etc.
until finishing the course1-first group, then
year: 2022, number: 300 students, group name:Course1-Group2, number: 20 students, subgroup: Set 1 student1, number:1
..etc. until finishing course 1, considering using different set students when each total number is completed.
This will mean I will end up by 300*3 = 900 entries. Then for each student I should create 3 activities (or number of courses). I am not sure if this will ensure individual students will have a correct sessions for all his/her set courses or no but I will try and will let you know. If I misunderstand anything, please let me know. I am assuming the progressive approach is the default setting as I could not find this option. For the room capacity I can only find possible to add max possible rooms so I am assuming the default is minimum. Many thanks

Title: Re: How to group students with shared subjects with room capacity limitations
Post by: Liviu Lalescu on July 15, 2022, 01:46:43 PM
I was thinking of year y group g and in it add 300 subgroups, the easiest mode might be to create a csv file and import it, and also for the activities which are many, create a cvs file and import in fet. Please see my indication on how to create the activities, add a few, export, and see the csv structure which you will replicate.

About rooms: actually I was thinking of adding them implicitly with the constraints I wrote.

I will read again your message and maybe reply more.

To see the structure of a cvs file, firstly export a small example.
Title: Re: How to group students with shared subjects with room capacity limitations
Post by: Liviu Lalescu on July 15, 2022, 02:12:37 PM
Maybe you are right: create year y, with groups c1g1...c1g15, c2g1...c2g3, and c3g1 and c3g2, add their number of students, and they are overlapping, meaning they have common subgroups of the total 300 subgroups.

Then each room has capacity.

Again, import students from csv is easier, but first add a common subgroup in the interface and export it as example.

This might be much elegant and easier.
Title: Re: How to group students with shared subjects with room capacity limitations
Post by: MHassanien on July 15, 2022, 03:24:08 PM
I think I am close. I have reduced the numbers by a factor of 10 in this example, used csv files. The only issue to get the result is the number of hours per teacher, i.e. as it adds the total number of hours per each activity and this exceeds the total available number of hours/week, it produces an warning that this data cannot be processed. I have tried to enable initial group activities in initial order but this is not solving the issue. I will try to work around this. Any idea is really appreciated. Many thanks 
Title: Re: How to group students with shared subjects with room capacity limitations
Post by: Liviu Lalescu on July 15, 2022, 03:49:50 PM
For 2 simultaneous activities add two teachers.
Title: Re: How to group students with shared subjects with room capacity limitations
Post by: MHassanien on July 18, 2022, 12:32:37 PM
Hi Liviu, I hope you had a nice weekend. Sorry for my infinite number of questions but I am still struggling to get how to use FET and I think I am missing something. I am still have the problem of generating the timetable cause the teachers hours exceeds the given available hours/week. This may mean when I am defining the activities on CSV based on each each - subgroup - FET will count them as a new group/class. I am attaching the CSVs file I am using at the moment. I went with your first suggested approach by creating subgroup for each student. Please if you spot something that is wrong in what I am doing, please let me know. I will try more to see if I have missed something. Many thanks for your time and help
PS. due to attachment limit, I attached the activities, room capacities and students groups csv files. Teachers, subjects and tags CSVs are not attached but I am using course1, teacher1, course1 Session ..etc notation.
Title: Re: How to group students with shared subjects with room capacity limitations
Post by: Liviu Lalescu on July 18, 2022, 02:01:50 PM
Thank you, absolutely no problem, i am here to help but unfortunately still away from a computer. i will let you know as soon as i will have a computer.

i saw your file. maybe the solution is to add all the students from a single group in a whole activity, with a single teacher, or add the group name instead in the activity.

please let me know.

i might have a temporary laptop tomorrow
Title: Re: How to group students with shared subjects with room capacity limitations
Post by: Liviu Lalescu on July 18, 2022, 02:55:47 PM
maybe another solution would be to not add teachers at all - the activities will have only students. in this case we will use constraints to make sure there are not too many activities at the same time or more activities over the week than real teachers. these are activities occupy min/max slots from selection or min/max simultaneous in selected time slots. but in this case a single room holds a single activity at a moment, so we need to also take care of room capacity. this method seems difficult, but might also work.
Title: Re: How to group students with shared subjects with room capacity limitations
Post by: Liviu Lalescu on July 18, 2022, 06:25:52 PM
QuoteAs you can see in the attached file, the students in Set 1 can still do their course 1 sessions without clashing with their course 2 regardless of their group on course 2. However, this can be more complicated with more constrains. I am not sure how to use categories/group/subgroup definitions in such scenario

i don't understand this, because on tuesday course 1 and course 2 collide in the second hour, and also i think on monday 2nd you mean course 1, not course 2?
Title: Re: How to group students with shared subjects with room capacity limitations
Post by: Liviu Lalescu on July 18, 2022, 08:21:41 PM
I have a good idea, but I need a computer to implement the input file. I'll let you know when ready, if you are interested, maybe tomorrow, but not sure.
Title: Re: How to group students with shared subjects with room capacity limitations
Post by: Liviu Lalescu on July 19, 2022, 05:23:18 PM
I hope I have something working. (I have a working laptop.) See the attached files in the archive.

I created the CSV files and imported and added manually the rest of constraints.

Using Block-planning mode.

Real time slots are FET hours and real rooms are FET days.

You can generate on the locked file instantly, or on the unlocked file it took 8 minutes on my laptop.

See the HTML results, the activities timetables (or others).

Please let me know what you think.
Title: Re: How to group students with shared subjects with room capacity limitations
Post by: MHassanien on July 22, 2022, 04:48:42 PM
Hi Liviu, Thanks a lot for your amazing help. I have tried to understand and run the files but I am not sure if I get the trick.

You have used the days/week as room names and hours/day as the set of dat-time slots. So the new slot will be defined by the three, i.e. added 3rd dimension which is very smart. I didn't get how the room capacity restriction will be applied as these will be labels.

For the activates, you have defined for each student a set (tag) but not group. This mean students with the same set, e.g. course 1 and course 3 (set or with a tag course13). The set number can be different from group number. e.g. course 1 may have 10 groups as a big module, while course 3 may have only 3 groups. However, I think I am missing a point in the manual setting you are using, i.e. I am not sure what is the locked file in advanced setting will do, i.e. have you added manually other space/time constrains? I think this idea is really close and should work. I am still playing around to understand it  ;D
Title: Re: How to group students with shared subjects with room capacity limitations
Post by: Liviu Lalescu on July 22, 2022, 05:12:48 PM
Hello, MH,

You might want to see the help for block planning mode. But this is not too important, except that each student in each real slot has a single activity.

Rooms constraints are represented by activities max simultaneous in selected time slots constraints.

Preferred slots are for speedup, excluding some impossible cases.

See all the time constraints.

The tags are used so that the activities with the same students are not overlapping-see constraints activity tags not overlapping... Hmmm... I must check the file again here, because not the FET slot is important, but the real slot. A customization might be needed.

The locked file is the one with data_and_timetable. It has automatically added locking constraints.

Tomorrow I'll arrive home on my computer, making things easier.

Title: Re: How to group students with shared subjects with room capacity limitations
Post by: Liviu Lalescu on July 22, 2022, 08:00:15 PM
I am having second thoughts on the necessity of adding the activity tags and constraints of type activity tags not overlapping. You must know better than me. Deactivate the two constraints on the unlocked file and generate again and check the results.

I think I wanted to keep the groups together.

Also, if the number of total used slots is too large, you could use another constraint activities occupy max time slots from selection, with all activities, all slots, max allowed = progressive decreasing as you find new timetables.
Title: Re: How to group students with shared subjects with room capacity limitations
Post by: Liviu Lalescu on July 23, 2022, 11:22:42 PM
I am home, on my computer.

I tried without the two not overlapping tags. It only solves very rarely, and slow. In the rest of time it hangs.

I tried with the two not overlapping tags. It solves fast and many times. But sometimes it hangs.

I tried to improve the code in the not overlapping tags, so that the real slots are not overlapping (a customization). It solved all the times, fast.

So you might need this customization. Let me know if you are interested and I'll provide you with it.