min activities in a building

Started by Benahmed Abdelkrim, February 28, 2026, 11:14:18 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Benahmed Abdelkrim

#240
The test file is attached below. In some cases, buildings are found with 3 or 4 teachers! (see tne screenshot attached below), which is unacceptable since we don't want more than 2 teachers per building in this example. A solution should be considered to resolve this situation. In this regard, I suggest adding a building constraint like the one mentioned above (Maybe these constraints could be added: max activity tags from a set per day (real) for a building(s)).

I think this constraint already exists for rooms, which makes it easy to add to buildings.
B.A/krim

Liviu Lalescu

Dear Benahmed,

The new constraint will be just in the TODO for now, since it is too complicated and we need to think.

But, could you give me an example or more with more teachers per activity and we'll check room(s) max activities per teacher?

Benahmed Abdelkrim

#242
Here are two examples where activities involving more than two teachers are not counted with the option: room(s) max activities per teacher.
B.A/krim

Benahmed Abdelkrim

#243
The example file is attached to my reply #240, It includes activities with 2 teachers per activity.
B.A/krim

Liviu Lalescu

OK, thank you! I'll see a bit later. I am working hard, and I have a bug...

Liviu Lalescu

I solved that bug and it seems to work. I'll put a snapshot, there are a few new fields to translate.

But, Benahmed, about your problem: too many teachers per building, I am not sure I understand your suggestion with tags.

Is this a big problem?

Benahmed Abdelkrim

#246
To be clearer: activities from 1 teacher are tagged with, let's say, tag1, and activities from 2 teachers are tagged with tag2. A constraint max activity tags from a set per day for a building(s), This will prevent the activities of tag1 and tag2 from taking place on the same day, thus avoiding the presence of 3 teachers in the same building, as illustrated by the screenshots attached above.
B.A/krim

Benahmed Abdelkrim

#247
It's easy to avoid having 4 teachers per building; simply apply this constraint to the rooms and choose activities tag2, max=1.
B.A/krim

Benahmed Abdelkrim

Unfortunately, applying this constraint to rooms doesn't prevent tag2 activities from meeting; we need another solution...
B.A/krim

Liviu Lalescu

But, dear Benahmed, why complicate so much? You added buildings = 2 rooms, just to avoid more than 2 activities per real room. So, add 2 activities with a single teacher each, and a constraint activities same starting time for these 2 activities.

I just put a new snapshot with 3 new fields, could you also translate them when you have the possibility?

Benahmed Abdelkrim

I corrected a minor typo. I reattach the file below...
B.A/krim

Liviu Lalescu

OK, thank you! I replaced the file (but it is not in the examples for exam, but in tests). If you want, I could place it in the examples for exam.

Benahmed Abdelkrim

#252
Quote from: Liviu Lalescu on March 22, 2026, 08:09:37 AMBut, dear Benahmed, why complicate so much? You added buildings = 2 rooms, just to avoid more than 2 activities per real room. So, add 2 activities with a single teacher each, and a constraint activities same starting time for these 2 activities.
I don't think that will solve this problem, which consists of avoiding having 3(or more) teachers meeting in the same building (real room).
B.A/krim

Benahmed Abdelkrim

Quote from: Liviu Lalescu on March 22, 2026, 08:14:38 AMOK, thank you! I replaced the file (but it is not in the examples for exam, but in tests). If you want, I could place it in the examples for exam.
Please place it in the fet/examples folder.
B.A/krim

Liviu Lalescu

For each real activity with 2 teachers, add 2 FET activities, each with 1 teacher, and same starting time for them 2. A FET room hosts a single activity, so in a FET building with 2 FET rooms -> only max 2 FET activities, each with 1 teacher.

I don't understand the problem.