2020-11-10: Requested by forstera by email: New constraint two activities together: In our school, we have 22 periods a day but in our sister school they will have 24. According to the fact that for oral exams, there's 1 period used per student. So if we have a class with more than 22 students, we have to split it in 2. In this case, we make a first group of 17 students and another group of 6 to 11 students (depends of the size of the class but it's not possible to have more than 11 students in that 'small' group). So, for classes of more than 22 students, we'll have 2 groups per branch. 1 'full day' group and 1 'half day' group. In this case , these 2 groups have to be consecutive on 2 days. For the group of 17 students, it can be anywhere in the day and for the 'small group' of [6 to 11] Student, it has to placed only in the morning or only in the afternoon: this depend if it is placed before or after the group of 17 students. If before, this will be in the afternoon and if after, It will be in the morning. So, you'll input either a non-split activity, or an activity split into two. You know exactly the duration of each activity. The number of hours per day is 22 or 24, and the middle of the day is the number of hours per day / 2. -> Yes exactly .. but we found a way to solve this 😉 (22 or 24) .. We are going to define 24 periods a day and the first and last periods of the day are not going to be used when the periods are 22 For that, we are going to use the 'preferred starting time for a group of activities' If you add an activity split into two, you also need to add a constraint two activities together. 2020-11-13: The next thing we should have is the constraint about teacher's time > : > > After a block of exam, a teacher should be free the next half day off. > For example, a teacher has group of English exams for class 21A that > finishes at 2 pm, he should be free next morning. > Yes, 2 PM is in the afternoon, in fact, we should count in blocks. From 1 to 11 it's the morning and from 11 to 22 it's the afternoon. But to integrate the other school I'll have to change theses values because the other school works with 24 periods : 12 in the morning and 12 in the afternoon... >I am thinking of adding this to your latest custom version, forstera5. >Should I consider that this constraint is to be ignored between activities which are forced "together" by our custom constraint? ---> yes, you are perfectly right, In that case, the constraint will be ignored between these 2 activities... 2020-11-13-2: I managed to make your file solvable, I modified the code using a trick: if the activity tags of two activities begin the same (only the last 3 digits are different), they are considered from the same component. It solves fast. 2020-11-13-3: Import special constraints activities occupy max time slots from selection, as in the file of forstera 2020-11-13-4: modified students (set) min resting hours: circular is ignored, and only activities on the same day respect the constraint for each students set. 2020-11-17: modified teacher(s) min resting hours: see 2020-11-13 change, only teachers with min resting hours are considered. !!! Not done, because practically it is worse!!! optimized internally activities occupy max time slots from selection, for the exact case of forstera (a hack). the import of the activities occupy max time slots from selection from a CSV file: the exact details are very important 2020-11-17-2: activities can have more tags, but the first one is the important one. indication: if a teacher has activities "together", constrain the real ones with max days between activities = 1. 2020-12-07: modified students min resting hours: the circular can have only 100% weight, the noncircular can have 0%-100% weight. 2020-12-09: forstera5-14: applied a speed improvement which until now seemed not to work, but with it the generation is now even 10 times faster! See the file generate.cpp, search for the text "2020-12-09" without quotes. You can test on the files liviu-95perc.fet, liviu-98perc.fet, and liviu-99perc.fet (this last one solves rarely and takes much time). 2021-01-18: bug fix in import of forstera.