A teacher works in an hourly interval max days per week

Started by pervezshaikh, April 14, 2018, 03:34:55 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pervezshaikh

I used the subjected constraint for a teacher (Mr. S Bhanbhan). But FET ignores the constraint. Am I doing certain mistake?
Edited note: I am not able to upload <Even_Semester_CED_data_and_timetable.fet> file as its size is 540 kB.

Volker Dirr

please compress (zip) the final solution file (from the fet-results folder). (So do a right click and press sent to compressed file).

Volker Dirr

Please also exmplain a bit more detailed about what constraint you are exactly talking. i can't see it in your dataset.

pervezshaikh

Read the subject again. It will explain you the constraint. However, I used <A teacher's not available times> constraint alternatively, and got my results. (I think it is duplication of constraints.) Here is the zipped file attached.

Volker Dirr

I generated the timetable. All is fine. I can't see an incorrect constraint.

i guess you are talking about
FET -> Data -> TIme constraints -> activities -> a set of activities have prefered time slots -> constraint numer 9 and 10.
So you talk about the constraints with activity tag "(*)" or "(T)", don't you?

You allowed that those constraints might be broken, since you set weight with less then 100%. You must increase weight up to 100%, only than the constraints won't be broken.

pervezshaikh

Volker!
No. I am talking about the following constraint:
FET->Data->Time constraints->Teachers->A teacher works in an hourly interval max days per week
The concerned box will show you:
Time constraint
A teacher respects working in an hourly interval a maximum number of days per week
Weight (percentage)=100%
Teacher=Mr. S Bhanbhan
Interval start hour=09:00-10:00
Interval end hour=11:00-12:00
Maximum days per week=5

but the results are out of bound. His six hours are not respected out of 12.
I hope you understand now. Earlier I have told that I did it alternatively.

Volker Dirr

yes, that constraint is respected. it is fine. it isn't broken. i fear you missunderstood that constraint. he is wokring max 5 days in that limit. he is allowed to work in other periods.

Liviu: looks like users missunderstood this constraint. i suggest to set the max days per week only to (max days per week -1), because if you set it to max days per week the constraint is useless and will always be respected.

Liviu Lalescu

Quote from: Volker Dirr on April 14, 2018, 08:14:04 PM
Liviu: looks like users missunderstood this constraint. i suggest to set the max days per week only to (max days per week -1), because if you set it to max days per week the constraint is useless and will always be respected.

Maybe. I'll think about this. We have constraints like min days between activities which use your style, and constraints like max hours per day, which use my style.

Let me know if you want it in the TODO.

pervezshaikh

I am not pointing towards max days. read carefully
Quote from: pervezshaikh on April 14, 2018, 06:02:32 PM
Interval start hour=09:00-10:00
Interval end hour=11:00-12:00

the start and end times are violated 6/12 times.

rodolforg

Quote from: pervezshaikh on April 15, 2018, 12:39:17 AM
I am not pointing towards max days. read carefully
Quote from: pervezshaikh on April 14, 2018, 06:02:32 PM
Interval start hour=09:00-10:00
Interval end hour=11:00-12:00

the start and end times are violated 6/12 times.

The mentioned constraint states:
The teacher can only work [5] days in this time range [9:00~12:00]

In your case, the week has 5 days, so the teacher can teach every week day.

pervezshaikh

rodolforg!

But the FET is not respecting  time range [9:00~12:00]!

rodolforg

Yes, it is.

I really believe you misunderstood the constraint.
There can be any number of activities from 9:00-10:00 until 11:00-12:00, as long as they do not use more than 5 days of the week (according to your parameters).

What activities exactly would have broken this constraint?

pervezshaikh

rodolforg!
Quote from: rodolforg on April 15, 2018, 03:55:18 AM
What activities exactly would have broken this constraint?

Monday: 14-15
Tuesday: 12-13 and 13-14
Wednesday: 14-15 and 13-14
Thursday: 8-9

rodolforg

OK. Now I get what it though the constraint means.

This constraint name is:
A teacher works in an hourly interval max days per week   - The focus is to limit the number of busy days in that time range

not:
A teacher only works in an hourly interval

You should use instead:
Teacher Not Available Times

And mark when teacher cannot work (each hour/period specifically) ;)

pervezshaikh

 rodolforg!
OK. Then explain me the following also.
There is a constraint:
FET->Data->Time constraints->Teachers->Min days per week for a teacher

How this constraint is different from the constrain under discussion?