Hi Liviu. Thank you again and again for all the help. You cannot imagine how helpful your software is to me. I decided to start a new thread about this topic, so that people can find it easily from the title. For me, I think what I need is a bit different from what ghani1990 needs. Every student set in my school has a subject called "Mowakaba" (one hour only) once a week. But this subject is optional. Sometimes students do not have to do it. To avoid having gaps for students or teachers, we would like this activity to be the first or last activity during a Fet day, not a normal day. If you apply the constraint to a Fet day, then this activity can be done at any hour from 8 a.m to 6 p.m. So there are 8 options (see attached image), while with a normal day, there are only 4 options. If you don't mind, we need a contraint for students and the same for teachers.MOWKABA.jpg
Hello,
Exactly how I said, you need to create subgroups/teachers to handle optional activities. For instance, for teacher T1 having this optional and T2 not having this optional (the activities of T1 are all the activities of T2 plus optional), add max gaps per day/week = 0. Max gaps will consider FET (half) days.
Similar for students (you may make a group G containing subgroups S1 and S2).
Thank you Liviu for the quick response.
You are welcome, and I hope it works.