I'm facing 2 situations that require a bit of attention with certain subjects, here's they are:
Situation 1 - Mrs. A teaches 2 subjects that can't be sequential to one another.
Mrs. A teaches Biology and Mathematics, the Mathematics classes are divided into 4 activities (each of duration 1) and Biology is scheduled with 3 activities of duration 1. Mrs. A prefers that if she teaches Mathematics on year 1-Q, for example, she can not teach Biology to the same 1-Q year right afterwards (unless there is a break). The opposite is also valid, so, if she teaches Biology to year 1-Q, she can only teach Mathematics on that year immediately afterwards if a break comes between the classes.
Situation 2 - Mr. X teaches 2 subjects
Mr. X teaches both Writing and Grammar to his classes. The Grammar classes are scheduled as 4 activities of duration 1, and the Writing classes are scheduled as a single duration activity. Mr. X prefers that all of the Writing classes are scheduled in a single "group" of activities, so, if there are 4 Writing classes to be taught, those should be sequential (although the order doesn't matter). In case it is impossible, he just asks to have all of the Writing classes scheduled within the same day.
In both cases, Mr. X (as Mrs. A) does not want the Writing and Grammar classes to be sequential, for example, he shouldn't teach Grammar to the year 1-Q on the 1st period and then Writing on the 2nd period to the same year.
So, here's what I have achieved (I'll be editing this as things get done):
I have been able to group Mr. X's Writing classes within a single day, using the A set of activities has the same starting day (any hours) constraint, but this is not optimal as he prefers to have all of the Writing classes in a group.
Any ideas on how I can achieve the rest of the things I need?