Core and side lessons

Started by ckar, June 14, 2019, 01:07:08 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


Hello! I work  in an educational business and i face the following problem while generating the timetable.
In my school in Class C there are some core subjects that are taught to every student but there are some other courses which are more special and are taught to different students of the same class. So the problem is that a student may be in the C1 Math class and also in the C2 English class. How can i set FET so that these two classes will not happen together?
Thanks in advance!

Liviu Lalescu

I am tired and it is late, I might be wrong. I hope other users will correct and maybe give better solutions, if any.

Maybe you could obtain a better solution by dividing the year by categories.

My solution, maybe bad: add year Class C, with 4 groups, C1 Math, C1 English, C2 Math, C2 English. Add a subgroup S1 to both groups C1 Math and C2 English (and agree to FET saying that there are overlapping groups sharing subgroups).

Also, another solution (I think worse than the above): you have the constraint activities not overlapping.


Thanks for your quick reply! I attach the .fet file, because i also have some other questions.
1. The room timetable isn't generated.
2. In my school there are lessons with duration 1.5h. How can i set this to fet?
I am not in a hurry, take your time.
Thanks again.

Liviu Lalescu

You are welcome!

a) I would recommend you Year C, Year D, and so on. Not year 2019. Year means students of the same age.

1. Add space constraints.

2. duration 0.5=1 FET hours, 1=2 FET hours, 1.5=3 FET hours.

b) I am not sure you added correctly the students sets. Each students set should have more activities, like Math, English, Greek - which are subjects.

About your first post - I am still puzzled. I will leave it for tomorrow. Please see how FET divides a year automatically by categories, and how you can work with overlapping groups or years (subgroups are not overlapping).

Liviu Lalescu

To see a nice example (old, but good), see fet-5.37.5/examples/Germany/secondary-school-1/using_subactivities_constraints. It shows dividing the years and space constraints and subjects and years of students.


Thanks again for your answer. Here is also a bit late but a i ll try to give you an example going to students level. Let's say that S* are different students. Math, CS , Greek and Physics are subjects that are taught in two different classes. The state of the school may be like this:
MATH C1: S1,S2,S3,S4,S5
MATH C2: S6,S7,S8,S9,s10
GREEK C1: S1,S2,S6,S9,S11
GREEK C2: S12,S13,S14,S15
Computer Science C1: S1,S2,S6,S14
Computer Science C2: S4,S7,S16,S17.
So i understand that all these students are in the same year C, but i don't see who are in the same group or subgroup or even division.


If you have so many combinations, then I fear, you may have to choose each student roll number as a subgroup.


Year: Year C

Year C is divided into 7 groups
Groups: M-C1, M-C2, G-C1, G-C2, C-C1, C-C2, P-C1 (Here the first letter represents the subject you mentioned)

Each group is divided into subgroups as given below.

M-C1: S1,S2,S3,S4,S5
M-C2: S6,S7,S8,S9,s10
G-C1: S1,S2,S6,S9,S11
G-C2: S12,S13,S14,S15
C-C1: S1,S2,S6,S14
C-C2: S4,S7,S16,S17.

For example, check latest FET snapshot 5.38.0 : examples-> India-> Kurukshetra-> Institute of Technology -> MED_2019-20-1.Fet
I too had a similar requirement, then I decided to have individual roll numbers as subgroups and finally came-up with above example. Check the years, B.Tech 3rd Year or B.Tech 4th Year, they have electives (side lessons)

If I have to draw a correlation between your and my student set

Year: B.Tech 3rd Year -> Year C

5ME 1-4 -> C1   (This I used for compulsory lectures Group-1)
5ME 5-8 -> C2   (This I used for compulsory lectures Group-2)
5ME MEPE16 -> G-C1
5ME MEPE17 -> G-C2
5ME MEPE18 -> C-C1
5ME MEPE20 -> C-C2

Replace the roll numbers with S1, S2..... as per the requirement

What I don't understand is which one is your core (compulsory) subject and which one is your elective (side) subjects.

Let me know if you need any further help in understanding this example.

PS: Don't be afraid of adding so many subgroups. I have a MATLAB program written exclusively for generating student sets for this type of combinations.

Liviu Lalescu

Indeed, I think Nagendra is right. Also, you can import the students from a CSV file (export a small example from FET to see how it should look like).

You will have overlapping students groups.


Guys, thank you both! It seems that it works although it was hard that i had to manually enter all the students as subgroups.
I still have some questions so that the timetable to be perfect.
1. I still don't get the rooms timetable. I remember that Liviu told me about constrains but there are not really any constrains except the the groups have to fit in the room.
So to check that shall i enter the number of students in every activity or since each sub-group is a student make them count 1?
2. The second problem i have is that i haven't found how to make the teachers have activities consecutive.
For example: 10:00 - 11:30 Teacher1
                    11:30 - 13:00 Teacher2
                    13:00 - 14:30 again Teacher 1
In the organization where i work, when teachers  don't have an activity they are not obliged to stay in place.
So in the former example, teacher1 has to leave work for an hour and a half and return at 13:00 for his second activity.
3. Finally, i see that although i have set some time constrains, for example teacher1 begin activities in the interval 10:00 - 11:00, not always, but sometimes the generated timetable ignore me! The constrain isn't obligatory?
Thanks in advance.


1) Add an activity tag for each activity and then use space constraint "an activity tag has preferred rooms"
2) use the time constraint "Max gaps per week for all teachers" set it to "0". You might want to use this in combination with "Max span per day for all teachers". So that the no of teaching hours for teacher will be almost uniform for all days without any gap
3) Use the time constraint Activities -> set of activities has a preferred starting times and then select "teacher-1", and mark the allowed and not allowed times.

Liviu Lalescu

I think Nagendra got 1 and 2, but not 3. To force a teacher have activities at a certain time, you can use the constraint activities occupy max time slots from selection (press the Help button there).