Max gaps Morning + Afternoon in the same day.

Started by ghani1990, August 09, 2021, 07:32:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ghani1990

Hello dear Liviu,
I hope you are always well.

I have a little issue which is the number of gaps in the Morning + Afternoon.
If we choose the max gaps per week, for example, two gaps, it can put the first gap in the morning and the other gap in the evening in the same day, which is rather bad.

So I suggest adding a new rule named Max gaps Morning + Afternoon.

Of course, this is different from the max gaps per real day, as it is worth renaming it the length of the gap, and here the number can be chosen from zero, so the timetable is stacked between morning and evening, and among other numbers as desired.

Liviu Lalescu

Hello, dear ghani1990,

Thank you for the suggestion! I thought of it and indeed is necessary if you need it. But I am a bit afraid of users not knowing to use it, and it is also difficult to implement and I am very afraid of making mistakes when implementing it.

Can't you instead use either max 1 gaps per week, or max zero gaps per afternoon (which was suggested I think by more users, since gaps in the morning are bad)?

Do more users need your suggested new feature?

ghani1990

The problem is in my case and perhaps in many cases it is very difficult to put max 1 gaps per week, that hinders production and makes it very long hours.

Also, as for the use of the max gaps in the afternoons, I think that it may hinder the maneuvering process in the generation, especially that the gap can occur in the morning or afternoon, but the worst is that it occurs in morning and afternoon.

Of course, you know best what the situation requires, my friend, and your point view is often the correct one.

Liviu Lalescu

#3
OK, dear ghani, I understood. I will try to help: There are two possibilities:

1) Add for each such teacher an activity split into two subactivities, min 1 days between them, 100%. Then max 0 gaps per week for that teacher. But you may end up with a single real hour activity on a half day - so you might want to add an activity tag for all real activities, and teacher min 2 hours daily with that tag (this constraint was added only in the latest FET-6.1.2) (other problems might appear).

2) I could try a first implementation just for you, as a custom version, and if it proves useful I will consider adding it to the official. It is some work to implement it. Also, it might complicate the constraints much.

I prefer (1), of course  :)  , but if you cannot do it I will try to do (2) - how soon do you need it?

ghani1990

If i am well aware of the first solution, the problem is that you do not know the teacher who has this issue, and allocating these conditions to a group of teachers will complicate matters.

I wish you could provide an implementation, which would be beneficial to many, and the priority of the proposed solution and its efficacy is far from how much I need it soon. The important thing is that you can achieve it, my dear friend.

have a nice rest first, I am well aware of how difficult it is to implement, and how complicated things are, thank you for every second you are taking for this project.

Liviu Lalescu

Hello, ghani,

Please let me know: would you be interested in a custom version where each teacher will have max 1 gap per morning+afternoon, hard coded? So you must have for each teacher, and only 1 gap.

It is a bit easier for me this way.

ghani1990

Hello liviu,
Do you mean that the rule only has a max 1 and the number cannot be incremented?
If so, then it is really required, as the most important condition we have here in Algeria for good timetables is to adopt one gap per day (morning+afternoon), and of course this does not affect the gaps throughout the week.

Waiting for the implementation ;D

Liviu Lalescu

#7
Hello, ghani,

Yes, I would like to do a custom version for you in which all teachers have max 1 gap per morning+afternoon. You don't need to add this constraint in the interface, instead it is hard-coded in the algorithm. Is this OK?

Liviu Lalescu

I am thinking to add this into the official, but I am not sure I will be able.

Please tell me: only needed for teachers? Surely nobody in Algeria will need for students?

ghani1990

Aha I get it now, it will be included by default without needing to add the condition.
Yes, the condition needn't be for students only for teachers, because we always have condition 0 gaps in student schedules.

I wish it was somehow built into the official release, because you might be releasing new updates in the official app and I wouldn't be able to use it if I needed that condition.

Liviu Lalescu

OK, I will try to add it into the official. I will keep you informed of the progress.

Liviu Lalescu

Dear ghani, the most difficult part is done and I hope it will work. I need now to add the interface code, but it will take a while. I'll let you know.

ghani1990

dear liviu,
As usual I was sure you would be able to do it, take your time ;)
Thanks again my friend.

Liviu Lalescu


ghani1990

I've tried the version and can say it works as it should be:
The experiment was carried out with constraints of the type:
- Max zero gaps per afternoon.
- Max gaps per week.
- Max gaps per day (with 1 gap per day, with the new rule, the generation process was delayed a lot, but it was completed without any problems or errors in the outputs.)


BTW, You're literally a hero!

once again, thank you very much, dear liviu.