FET Forum

FET Support (English) => Get Help => Topic started by: athar on August 30, 2016, 12:15:52 AM

Title: constraint to limit number of activities per timeslot
Post by: athar on August 30, 2016, 12:15:52 AM
hi

i having a nightmare trying to generate a timetable. For a year 10 class, we have one class, but then separate classes (max 2) that meet for different activities. For example there is a maths set 1 and maths set 2. We need both of these lessons to run in the same timeslot. I have managed to do that by using the constraint (a set of activities has same starting time).

I created one Year 10 class under Year, then a separate class for each subject as a group under Year 10, e.g. 10Maths 1, 10Maths 2 (Year 10 Maths Set 2), and also for science and a few other subjects. Some year 10 lessons are collective.
The only problem I have is that in some timeslots I am getting 4 different activities, whereas there should be no more than 1.

I have spent hours and hours on this and not getting much further. I think I might try to create general activities such as Maths, Science for Year 10, and then create subactivities for each group. Would that work?
Thanks in advance for any kind of help and suggestions.
Title: Re: constraint to limit number of activities per timeslot
Post by: Darren McDonald on August 30, 2016, 03:12:35 AM
FET treats groups within a year (or subgroups within a group) as completely disjoint* (i.e., no overlap), which is responsible for the behaviour you're seeing; FET thinks it's permissible to run, for example, a science lesson with group 10science1 and a maths lesson with group 10maths1 concurrently, since it's not aware that the groups overlap.

The solution is fairly easy—decide on the maximum number of Year 10 lessons that you'll want to run concurrently (sounds like it's two in your case), then create exactly two groups, say 10-1 and 10-2, within the 'Year 10' year. Lets say that you want two sets for maths running concurrently, and two sets for science running concurrently, and one geography lesson that isn't split into set groups. When you create the activities, assign group 10-1 to both Year 10 Maths Set 1 and Year 10 Science Set 1, assign group 10-2 to both Year 10 Maths Set 2 and Year 10 Science Set 2, and assign Year 10 (the whole year group) to Year 10 Geography. Add the constraint you've used for starting times for the two maths lessons and the two science lessons (otherwise FET might allow, e.g., Maths set 1 to run opposite Science set 2), and you should start getting timetables of the sort you're after.

*This is true unless the groups have a subgroup in common, which you can introduce by creating a subgroup within each using exactly the same subgroup name (similarly with years and groups). This, I think, would needlessly complicate your timetable.
Title: Re: constraint to limit number of activities per timeslot
Post by: Liviu Lalescu on August 30, 2016, 06:38:27 AM
Quote from: athar on August 30, 2016, 12:15:52 AM
The only problem I have is that in some timeslots I am getting 4 different activities, whereas there should be no more than 1.

I have to admit I did not read the first post thoroughly, neither Darren's answer, but for this particular problem I think constraint activities max simultaneous in selected time slots might work.
Title: Re: constraint to limit number of activities per timeslot
Post by: athar on August 30, 2016, 10:53:46 AM
THanks Darren and Liviu. I got it to work by creating two groups of year 10 and it works fine. But it's not quite over yet!
I am getting 6 of the same activities for a class in one day, which is just wrong! There should not be more than 3 of the same lessons in a day for any class. I can't use the minimum days between activities, because having two or three lessons in one day are ok, just not more than that.
If anyone could help me with this constraint, I'd be really grateful.

Thanks
Title: Re: constraint to limit number of activities per timeslot
Post by: Liviu Lalescu on August 30, 2016, 11:33:37 AM
I think you can use constraint teachers (students) activity tag max hours daily (enable it and add some activity tags to the involved activities).
Title: Re: constraint to limit number of activities per timeslot
Post by: Darren McDonald on August 30, 2016, 03:19:18 PM
Are you entering those as split activities?

If you've got 6 maths lessons, you could enter it as split activity with sub-activities of length 2+1+1+1+1 (or 2+2+1+1, etc., since at least one double would be required), and then still use the minimum days between activities constraint (enabled by default for split activities).
Title: Re: constraint to limit number of activities per timeslot
Post by: athar on August 30, 2016, 03:38:26 PM
thanks again. I got it all sorted now  ;D
I decided to group some activities together and then use minimum days constraint between one activity from each group. So 6 science lessons were put into two groups of three. and a constraint of minimum days between the the first lesson of each group.