Grouping a subject

Started by Matsumoto, March 20, 2017, 07:53:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.



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?
Addicted to Timetables, Mathematics, Coffee and Cute Things!

Liviu Lalescu

I am afraid your situations are too complicated. However, you could try:

For situation 1: Constraint min gaps between activities or constraint teacher activity tag max hours continuously;

For situation 2: Maybe use constraint three activities grouped, in conjunction with constraint activities same starting day. It is too difficult for me to implement constraint four activities grouped.


I see, perhaps the best solution to the first problem is indeed the constraint Min. Gaps between activities, by adding each pair of activities into the constraint.  ;D

I guess that to correctly solve the first scenario it would be needed to set all the Biology classes in the 1-Q year from Mrs. A's example in group 1,  for example, and then all of her Math classes in Group 2 and set them to not be consecutive. That should be monstrous work, though.  :o

Addicted to Timetables, Mathematics, Coffee and Cute Things!

Liviu Lalescu

Situation 1: You could add only one such constraint, for all 7 activities of Mrs. A, if the first 4 cannot be on the same day and the last 3 cannot be on the same day (I assumed that you have min days constraints with 100%).