Hello!
The problem:
Teacher John has the following activities:
Group A1 x 2 hours per week - split 2
Group A2 x 2 hours per week - split 2
Group A3 x 2 hours per week - split 2
Group B1 x 2 hours per week - split 2
Group B2 x 2 hours per week - split 2
Teacher Mary has the following activities:
Group B3 x 2 hours per week - split 2
Group C1 x 2 hours per week - split 2
Group C2 x 2 hours per week - split 2
Group C3 x 2 hours per week - split 2
Group D1 x 2 hours per week - split 2
Group D2 x 2 hours per week - split 2
Group D3 x 2 hours per week - split 2
What I need: I need to ensure that teacher Mary does not teach the same hours with AT LEAST ONE (actually JUST ONE is fine) of the activities of teacher John (for example EITHER A1 x 2 hours, OR A2 x hours, OR A3 x 2 hours etc.). Is there any direct or indirect way to achieve this result?
Thanks a lot!
It would be nice if you explain why you need that constraint. I guess there might be an other/better easy solution.
If Mary has no gaps constraints or a max gaps constraint > 0, then there is a easy workaround. (It isn't so easy if Mary has got a max 0 gaps constraint)
Add a pseudo activity to Mary. (Only the teacher. no students.)
Then use "a set of activities occupy max timeslots": Add all activities of John and the pseudo activity of Mary. Set max 10 hours (number of hours of John).
Don't forgot to reduce the number of max gaps of Mary, since she has got a pseudo activity now.
If Mary already have got a max 0 gaps constraint, then you might allow only the last and the first hour for Marys pseudo activity. (In fact this constraint is a bit to strict in your case.)
I think that this approach might result in the pseudo-activity to coincide for example with one hour of John's A1 and one hour of John's B1. I need it to coincide wither with the two hours of A1 OR the two hours of A2 OR the two hours of A3 etc. Are you sure that your approach is the correct one? Actually I had already thought of this type of solution but I didn't even try it, because I was afraid that it's not going to result in what I need. Thanks!
ah... you need 2 hours. i thought only 1 hour. my suggestion care about one hour only.
if you need it with 2 hours, then one variant might be simply adding Mary into one activity of John.
i guess there are other/better solutions; but i still don't understand why you need that constraint. Maybe explain the reason and i might find a better solution.
OK. The reason. What I need exactly is to present (in the timetable) a (non-existent) activity. Thus, it's not important which activity is this one.
So, forget everything I wrote up until now.
I need to present that one group (ANY of A1, A2, A3, B1, B2) is divided into two sub-groups (which is not real), so the lesson is taught (in virtual reality) by two teachers (John and Mary) at the same time. As I wrote John and Mary have already got their (real) lessons. So, I don't care which group is this one (it can be either A1, or A2, or A3, or B1, or B2). I don't want to constrain FET for just one group, but I need to find potential solutions with all available groups (A1, A2, A3, B1, B2). For example a solution with A2 might be better than the one with A1). Thanks a lot!
ah. ok. now i understand.
sadly there is no constraint like that right now.
i think you should select the group that can benefit from 2 teachers most.
So you already said A2 can benefit more then A1. I think you should simply write down a list which group can benefit most. Select the "best" one (maybe group with most students, "weakest" students, "difficult" students, ...) and just add Mary into that group.
If this constraint is really important, I could try to think of a custom version just for you. Let me know.
I prefer not to add in the official version, because it is a peculiar constraint, and also the solution should be tested much.
Quote from: Liviu Lalescu on November 11, 2015, 10:35:27 AM
If this constraint is really important, I could try to think of a custom version just for you. Let me know.
I prefer not to add in the official version, because it is a peculiar constraint, and also the solution should be tested much.
Thank you Liviu, but I solved the problem in another way. It's not necessary to make a custom version for me. It's far better to keep developing your masterpiece of software than spending your time with very strange situations!!!
Thank you for the appreciation! :)