min activities in a building

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

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Liviu Lalescu

Quote from: Benahmed Abdelkrim on March 22, 2026, 08:20:02 AM
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.

OK!

Benahmed Abdelkrim

#256
...maybe one option, such as a dialog box in the new constraint; room(s) max activities per teacher could solve this problem.
This option ensures that the activities of several teachers do not share the same building with other activities.
If this option is possible, we can think about a suitable name.
B.A/krim

Liviu Lalescu

I will add your words in the TODO and think of them.

YOUSSEF HOUIET

@Benahmed Abdelkrim

I have another idea that we might need:
Introduce a constraint for the minimum number of activities in a building from a given set of activities.
This would help ensure placing, for example, at least one activity from a specific teacher category in a building (e.g., at least one male teacher, or a teacher of a certain professional grade).
But now, however, we let Liviu focus on improving the current features.

Liviu Lalescu

I will add your suggestion in the TODO list, Youssef, thank you!

Benahmed Abdelkrim

Quote from: Liviu Lalescu on March 22, 2026, 01:40:57 PMI will add your words in the TODO and think of them.

I've been thinking about this; I tried to solve this problem manually, but there's no solution. We can't avoid having 3 teachers per building. I was only able to avoid 4 teachers per building by using tags. You can remove my suggestion from the TODO file.
 
thank you dear Liviu!  :)
B.A/krim

Liviu Lalescu

Dear Benahmed,

We should keep your suggestion in the TODO. The TODO is a file where I gathered all the suggestions from the users over the years and sometimes (rarely) I check it and think if an item is possible.

I removed your tags suggestion, but not the reported problem. Here is the current (latest, updated now) TODO item:

---
843---------------------------------------------------------
From Benahmed Abdelkrim (on forum):

https://lalescu.ro/liviu/fet/forum/index.php?topic=6772.msg37930#msg37930

We should consider cases where we find 3 teachers in a building, and cases where the user no longer wants more than 2 teachers per building.
Maybe a new building constraint could be considered, or maybe a workaround that could simplify the solution?!
---

Benahmed Abdelkrim

B.A/krim

Benahmed Abdelkrim

#263
I think I've found a solution to this problem. We should calculate the activities correctly to avoid having 3 or 4 teachers per building. And the interaction of the last two exam constraints will do the trick. Here's the file after a few necessary modifications...

In this context, the previous file with its data state has no solution, unless necessary modifications are introduced as shown in the attached file below...
B.A/krim

Liviu Lalescu

OK, Benahmed, I removed your previous file (Benahmed-6) and added this one instead.

Benahmed Abdelkrim

I think we should leave it so the user can compare the two and understand the solution, with the addition of a small note: the solution can accommodate 3 or 4 teachers per building.
B.A/krim

Liviu Lalescu


Benahmed Abdelkrim

B.A/krim

Liviu Lalescu


Benahmed Abdelkrim

Now I'm going to hit the road and be away for 1 or 2 days...
B.A/krim