FET Forum

FET Support (English) => Get Help => Topic started by: Nagendra on June 12, 2019, 10:44:09 AM

Title: Constant: Teacher has minimum one activity in the first period in a week
Post by: Nagendra on June 12, 2019, 10:44:09 AM
How do I constrain teacher(s) to have minimum one activity in the first period in a week (it can be on the first period of any day: but at least once in a week)?. i.e. All the teachers must teach in 1st-period at-least once in a week.

Also, How do I constrain teacher(s) to have maximum two activities in the first period in a week.

edit: I am not sure if constraining the split activities (as per the split activity id) to have preferred starting times would work or not
Title: Re: Constant: Teacher has minimum one activity in the first period in a week
Post by: Volker Dirr on June 12, 2019, 10:05:23 PM
1) i think it will be possible with "a set of activities occupies max slots from a selection". but it is a bit work to add it. But before adding it? Why do you want to add such a rule? I can't see a sense for this. At many schools it is even the opposite: There are several teachers that need to have free the 1st period.

2) "A teachers works in an hourly interval max days per week"
Title: Re: Constant: Teacher has minimum one activity in the first period in a week
Post by: Nagendra on June 13, 2019, 02:17:48 AM
Quote from: Volker Dirr on June 12, 2019, 10:05:23 PM
Why do you want to add such a rule?

Some teachers have always an activity at 1st period on all the days. Where as some don't even have one.

Infact no one wants to have lecture at first period itself. Just to maintain uniformity among all teachers, I thought of imposing 'a minimum one activity in the first period in a week'
Title: Re: Constant: Teacher has minimum one activity in the first period in a week
Post by: Volker Dirr on June 13, 2019, 11:04:33 AM
ah. ok. please think twice, since that might be "normal". (of course that is highly depending on your dataset)

some teacher might always have 1st period, for example if they have 5 classes with main subjects and you want that students have at least 1 time main subject in 1st hour.

some teacher might have a lower number of hours in the 1st, since they are maybe only part time teachers with a low number of activities, no main subject and maybe also with working groups in the afternoon. so if you try to force those teachers to get at least x hours in the moring you might also force them indirectly to get a very long day (with a larke span) and/or a high number of gaps. so think twice before adding such a "feature"; you might get bad results by that.
Title: Re: Constant: Teacher has minimum one activity in the first period in a week
Post by: Nagendra on June 13, 2019, 11:19:15 AM
Quote from: Volker Dirr on June 13, 2019, 11:04:33 AM
think twice before adding such a "feature"; you might get bad results by that.

Hmm... I will check.
By the way what Constraints I should use to introduce such "feature"
Title: Re: Constant: Teacher has minimum one activity in the first period in a week
Post by: Volker Dirr on June 13, 2019, 01:21:45 PM
 "a set of activities occupies max slots from a selection". so select all activities of an teacher (maybe X activities). select all slots of a day, except the first hour. allow max X-1 slots from that selection. so there will be at least 1 activity early.
Title: Re: Constant: Teacher has minimum one activity in the first period in a week
Post by: Liviu Lalescu on June 13, 2019, 01:23:34 PM
Quote from: Volker Dirr on June 13, 2019, 01:21:45 PM
"a set of activities occupies max slots from a selection". so select all activities of an teacher (maybe X activities). select all slots of a day, except the first hour. allow max X-1 slots from that selection. so there will be at least 1 activity early.

Nope, because there might be activities in other days. Select all slots of the week but the first slot of a day.
Title: Re: Constant: Teacher has minimum one activity in the first period in a week
Post by: Nagendra on June 13, 2019, 01:42:52 PM
Couldn't understand how "a set of activities occupies max slots from a selection" works. No information in documentation also. Can you throw some light on this?
Title: Re: Constant: Teacher has minimum one activity in the first period in a week
Post by: Liviu Lalescu on June 13, 2019, 01:44:20 PM
In the constraints dialog there is a button named "Help".
Title: Re: Constant: Teacher has minimum one activity in the first period in a week
Post by: Nagendra on June 13, 2019, 02:03:33 PM
Thanks. I understood it. I think it is the most difficult constraint. But it is clear that this constraint will force at-least one activity to be in the first hour of any day (as required by me). Does that mean, some teachers might have 2, some might have 3.....? Just wanted to correct my understanding. Thanks

Then, How do I constrain teacher(s) to have a maximum of two activities in the first period in a week?
Title: Re: Constant: Teacher has minimum one activity in the first period in a week
Post by: Liviu Lalescu on June 13, 2019, 02:12:21 PM
Quote from: Nagendra on June 13, 2019, 02:03:33 PM
Thanks. I understood it. I think it is the most difficult constraint. But it is clear that this constraint will force at-least one activity to be in the first hour of any day (as required by me). Does that mean, some teachers might have 2, some might have 3.....? Just wanted to correct my understanding. Thanks

Yes.

Quote
Then, How do I constrain teacher(s) to have a maximum of two activities in the first period in a week?

Again activities occupy max time slots from selection or maybe better teacher interval max days per week.