Please help me create constraints

Started by saladv, September 02, 2020, 09:15:35 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

saladv

Attached is a teacher's schedule.

Help me create a constraint , if that teacher teaches Period 5, then I don't teach period 6, teach period 6, then not teach period 5 in a day.

Because periods 1-5 are in the morning, periods 6-10 are in the afternoon. Teachers need to have a lunch break

Thanks you very much

Liviu Lalescu

#1
There are possible more approaches:

1) The nicest solution, but it involves a lot of work to input the constraints: add n_teachers*n_days_per_week constraints activities occupy max time slots from selection. All activities of a teacher, selected slots 5 and 6 of a day, max occupied = 1.

2) Add dummy activities for each teacher, each one divided in n_days_per_week, 1 min days between them with 100%, and preferred times for them hours 5 or 6.

3) Use FET-MA (mornings/afternoons or Morocco/Algeria), and use the constraint teacher(s) min resting time between mornings and afternoons.

Please let me know.

To all the users: should I think of adding a constraint teacher(s) selectable break or something like this, allowing the user to select the possible break slots on each day? How to consider this constraint, exactly? Also, unfortunately, to consider these breaks not to be a gap seems very difficult.

saladv


saladv


Liviu Lalescu

Do you mean for (1)? See Time constraints -> Activities.

Liviu Lalescu


saladv



I cannot install the constraint like that,
Please help me upon request.
if that teacher teaches Period 5, then I don't teach period 6, teach period 6, then not teach period 5 in a day.
The nicest solution, but it involves a lot of work to input the constraints: add n_teachers*n_days_per_week constraints activities occupy max time slots from selection. All activities of a teacher, selected slots 5 and 6 of a day, max occupied = 1.
Not found this constraint

Liviu Lalescu

Please see activities time constraints, a set of activities occupies max time slots from selection.

saladv

I attach file
period 5 6 Highlignt
I want only period 5 or period 6 in one day if 5 and 6 continue