Main Menu

I need help!

Started by Thai Chi Phuong, September 02, 2024, 11:02:22 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Thai Chi Phuong

Hello liviu!
I have a suggestion: Can you add a constraint for a certain classroom to only study n days/(actual days)/1 actual week?

Liviu Lalescu

Hello, Thai Chi,

Do you mean constraints room max days/real days per week? For days (FET days, half days) it is also suggested and in the TODO (at the beginning), and I also added your words. Unfortunately, I don't know if it is possible or too difficult.

Thai Chi Phuong

Hello Liviu!
Have a nice day!
I mean about the subject classroom, I want in a week this classroom only allows to study n days/real days. Thank you very much Liviu!

Liviu Lalescu

Thank you, Thai Chi! You too! :)

Unfortunately, for rooms it is more difficult (compared to teachers and students) to consider the max days/real days per week. But I will think of this.

Thai Chi Phuong

Thank you Liviu!
I have one more suggestion, Can you help me add a constraint: "I have n teachers, in a real day/day only n-i teachers come to school." Thanks Liviu!

Volker Dirr

Not sure if that constraint is very useful. In guess you will get better results by adding max days per week constraint to teachers. But maybe we can try it.

The critical part of your suggestion is, that you forgot that not always the same number of teachers are needed per day. Ok, if you have a school with "classes" only, then you might have always the same number of needed teachers, but at most schools there are different groups/divisions. So on some days you might only need a minimum of 40 teachers, while on other days you might need a minimum of 60 teachers. You can't solve this problems with your suggested constraint. In fact your suggested constraint can set only to max 60 in that case, while on other days only 40 is enough. So you will miss a lot of possible free days for teachers with such a constraint. That is why i guess using max days per week constraints will generate better results.

Thai Chi Phuong

Thanks for replying Liviu! Maybe my wording is not good, but my problem is: "I have a small group of teachers-teaching the same subject, and I want in 1 day/actual day only 1 (2) teachers not to come to school". I used the maximum number of days constraint but encountered a case where there were days/actual days with many (2,3,4,..) teachers not to come to school.

Thai Chi Phuong

Thanks for replying Volker Dirr!

Liviu Lalescu

Thank you, Thai Chi,

I think you are suggesting the constraint for the minimum number of teachers from a set of teachers to be present on each day/real day. Unfortunately, it looks complicated and also I am not sure it is possible to implement efficiently/feasible. But I will add your suggestion in the list of suggestions.

Liviu Lalescu

You see, Thai Chi, I am not avoiding constraints which are useful or necessary. But I am afraid to implement constraints which are not efficient. These constraints might do more harm than good. The user might obtain impossible/cycling timetables because the constraints he adds are not implemented feasibly.

I might agree to try to make for you a custom version and see how these constraints behave. If they behave correctly, then maybe they will be added to the official version. But I cannot promise I can help you with this.

Thai Chi Phuong

Thank you so much Liviu!

Liviu Lalescu

Hello, Thai Chi,

Could you please tell me the reason for adding the constraints room max days/real days per week?

Thai Chi Phuong

Hello Liviu!
Have a nice day! Thank you for your attention to my problem. I have two teachers A and B, and I want teacher A to teach teacher B's hours as well or vice versa, and they also have holidays together, so I want to create a classroom for these two teachers and have a constraint on the maximum number of days/actual days of the classroom.

Liviu Lalescu

Hello, Thai Chi,

Thank you! You too!

No, it is highly inefficient to rely on rooms constraints!

The good tricks: say you want 2 free days for TA and TB. Add an activity split into 2, n_hours_per_day duration of each component, both teachers.

And/or use the magic constraint activities occupy max time slots from selection: activities of TA and TB, select all slots of the week, max occupied ~= max(duration of activities of TA, d o a o TB).

Thai Chi Phuong

Hello Liviu!
Can you help us add an option: One (All) teachers come to school only in the morning or afternoon and come to school both sessions on a specific day of the week. Thank you very much!