Author Topic: Weekly occurrence of max/min hours per day for a teacher  (Read 643 times)

0 Members and 1 Guest are viewing this topic.

Vangelis Karafillidis

  • Level 1
  • *
  • Posts: 38
    • View Profile
Weekly occurrence of max/min hours per day for a teacher
« on: April 13, 2016, 10:47:06 AM »
Weekly occurrence of max/min hours per day for a teacher
OR
How can we constrain the weekly occurrence of the minimum/maximum hours per day for a teacher?


The problem is described here:
http://lalescu.ro/liviu/fet/forum/index.php?topic=1534.msg9527#msg9527

In the above problem, a teacher (for example JOHN) has
21 hours per week
(5 days per week),


and is constrained by

min hours per day = 3

and
max hours per day = 5.

The combination 3+3+5+5+5 (or 3+5+3+5+5 etc) hours should be avoided. The combinations 3+4+4+5+5 and 4+4+4+4+5 are acceptable.
The indirect solution (Tips and Tricks  ;) ):

1) Create a pseudo-teacher PSEUDO_JOHN.

2) Create 3 pseudo-activities for this pseudo-teacher each with:
    split = 5, duration = 1, min days =1, weight = 100%

3) Create 1 pseudo-activity for this pseudo-teacher with:
    split = 4, duration = 1, min days =1, weight = 100%

4) Create 1 pseudo activity for this pseudo-teacher with:
    split = 2, duration = 1, min days = 1, weight = 100%

5) Go to "A set of activities occupies max time slots from a selection"
    Select all the above activities (JOHN's real activities and PSEUDO_JOHN's pseudo ones).
    Set number of slots = 21.

    In the generated timetable, just ignore PSEUDO_JOHN and his pseudo-activities!