Question about teacher constraints.

Started by xing, June 10, 2019, 09:49:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

xing

Assume one teacher T1 teach subject English for two groups G1 and G2, 5 times each week, each time 1 hour (1 timeslot), and five workdays each week.
Each pair of (G1, G2) or (G2, G1) is a teaching plan and T1 does not want the teaching plan to be broken, which means once a G1 is scheduled, the next activity for T1 must be G2, vice-versa. G1 and G2 don't need to be consecutive, grouped and ordered, which means between a pair of G1 and G2, there can be any activity except G1 and G2.
For example, the following timetable for T1 is not preferred

Day1 Day2 Day3 Day4 Day5
G1     G2     G2     G1     G1
G1     G1     G2     G2
G2

The not preferred place is Day 1, because there a G1 between G1 and G2, so the teaching plan is broken.
The preferred one is

Day1 Day2 Day3 Day4 Day5
G1     G2     G2     G1     G1
G2     G1     G2     G2             
G1

The most preferred one is

Day1 Day2 Day3 Day4 Day5
G1     G2     G1     G2     G1
G2     G1     G2     G1     G2

Can I make it happen using the constraints or combinations of these constraints provided in the latest FET?

Liviu Lalescu

Maybe you could add two activity tags, AT_G1 and AT_G2, and use constraints of type teacher(s) activity tag max hours continuously and teacher(s) activity tag max hours daily.

xing

Is there any way to make two or more activities that have identical teacher start at the same time (same day and same hour)?

Liviu Lalescu

Quote from: Xingxing on June 12, 2019, 03:24:30 PM
Is there any way to make two or more activities that have identical teacher start at the same time (same day and same hour)?

No, there isn't. You might want to remove the teachers from all but one activity and make the activities start at the same time with the dedicated constraint.