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.

rodolforg

> Min days per week for a teacher

The teacher must work X days at a minimum.

Suppose a week has 5 days: Mo, Tu, We, Th, Fr.
Teacher has 8 activities.
That constraint is set to 3 minimum days.

His activities can be placed as:
Mo: 2 activities no matter at what time
Tu:  2 activities no matter at what time
We:  2 activities no matter at what time
Th:  2 activities no matter at what time
Fri: none

(4 work days)

or

Mo: 5 activities no matter at what time
Tu:  none
We:  none
Th:  2 activities no matter at what time
Fri: 1 activity no matter at what time

(3 work days)

or

Mo: 3 activities no matter at what time
Tu:  1 activity no matter at what time
We:  1 activity no matter at what time
Th:  2 activities no matter at what time
Fri: 1 activity no matter at what time

(5 work days)

but NOT this case:

Mo: 4 activities no matter at what time
Tu:  none
We:  none
Th:  4 activities no matter at what time
Fri: none

(< 3 work days)




The other constraint is completely unrelated:
Start time: 9h
End Time: 11h
Max days: 3
Number of activities assigned to teacher: 8

This is a valid solution:
Mo [9h, 10h, 11h]: 2 activities
Tu [9h, 10h, 11h]:  none
Tu (rest of day) : 1 activity
We [9h, 10h, 11h]:  none
We (rest of day) : 1 activity
Th [9h, 10h, 11h]:  4 activities
Fri [9h, 10h, 11h]: none

working days: 4 (Mo, Tu, We and Th)
working at 9~11h: 2 days only (Mo and Th)

this is NOT a solution:
Mo [9h, 10h, 11h]: 2 activities
Tu [9h, 10h, 11h]:  none
We [9h, 10h, 11h]:  1 activity
We (rest of day) : 1 activity
Th [9h, 10h, 11h]:  2 activities
Fri [9h, 10h, 11h]: 1 activity
Fri (rest of day): 1 activity

working days: 4 (Mo, We, Th and Fri)
working at 9~11h: 4 (Mo, We, Th, Fri) > 3 allowed days in 9h~11h timeslot window

pervezshaikh

rodolforg!
Thank you for such long and comprehensive explanation. Here I sum up my misconception or in adequate explanation in the FET.
I thought about the teacher: Max days (available)
FET schedules the teacher: Max days (working)

Thanks once again.

Benahmed Abdelkrim

Quote from: pervezshaikh on April 15, 2018, 06:36:58 AM
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?

if you set min days = 3 it means that the teacher must not have less than 3 working days a week. that is, he can have 3 days, 4, days, or more. but it is not allowed to have 2 days, or less.
B.A/krim

Volker Dirr

Quote from: Liviu Lalescu on April 14, 2018, 08:24:01 PM
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.

I think i prefer the strict variant. So allow only (max days üer week -1) since the other is useless. So also max hours per day should have only a maximum of (hours per day - 1).
I suggest to add it into the TODO.

Liviu Lalescu