FET Forum

FET Development => Suggestions => Topic started by: Benahmed Abdelkrim on May 09, 2020, 11:25:12 AM

Title: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 09, 2020, 11:25:12 AM
Hi.
Is it possible to specify the maximum number of hours that a room can be available during?
It is a problem that I did not find a solution or a trick, while preparing the exam schedule using the virtual rooms.
Attached below the FET file.
Title: Re: Max Hours for a room(s)
Post by: Volker Dirr on May 09, 2020, 11:31:54 AM
hmm...Why is that needed?
As a workaround you could add a teacher with a room name instead of a room, but i still don't understand why you need to limit the time in a room. Maybe we can see tricks if you understand why that is needed.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 09, 2020, 11:38:51 AM
In the attached file teachers were added as rooms, and rooms as teachers. But we want every real teacher (room) to have the same number of hours of work. Can this be achieved?
We have 10 real rooms that have been entered as teachers: S1, S2, .....S10
And 36 teachers were entered as a rooms: T1, T2, .....T36

A virtual room has been added because we need (2) teachers in each real room.

A screenshot showing more
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 09, 2020, 12:03:48 PM
Hi, Benahmed,

A constraint room occupies max time slots is difficult to add, I think. Please allow me to think of your problem and I will let you know as soon I find something.

Please let me know if you are opened to other approaches than yours above (which I will try to find).
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 09, 2020, 12:10:34 PM
Quote from: Liviu Lalescu on May 09, 2020, 12:03:48 PM
...
Please let me know if you are opened to other approaches than yours above (which I will try to find).

yes absolutely..all approaches are acceptable. and Thanks for your attention. :)
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 09, 2020, 01:12:45 PM
I think I obtained something useful. See the attached file. The activities have only subject. They are allocated to FET days (real slots = 9) and to FET hours (real teachers = 36).

There are maximum 5 activities for a real teacher. There are maximum 20 activities for a real slot. You can choose each pair and put it in a room.

Please let me know.

I attach my .fet file and an example of a solution.

See the activities timetable when you generate.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 09, 2020, 03:25:30 PM
Useful and practical idea. Thank you so much :)
But it remains to achieve (2) teachers in each Room. To achieve this, I added 10 activity tags equal to the number of real rooms (10) . I added a time constraint (activities occupies max time slots) that guarantees the maximum frequency of the activity tag in each time slot equal to 2.
with allowing activity tags to be printed in timetables.
I Attach the modified file below.
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 09, 2020, 03:39:05 PM
You are welcome!  :)

So your additions are only visual, to print each room? Otherwise, I think from my initial solution you could choose any rooms (but they are not printed).
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 09, 2020, 03:46:19 PM
Yes as you described

Good trick... But I think adding the above time constraint (room occupies max time slots) would be better with  using virtual rooms . what do you think?
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 09, 2020, 03:50:58 PM
My method is also good and fast, and unfortunately room occupies max time slots is difficult to implement. And I think you can do more options/things with my method. And it is clearer, in my opinion (I understood your method with difficulty).
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 09, 2020, 07:10:23 PM
I think I found another trick, maybe even better.
The teachers were entered normally. Groups and sub-groups were used as real rooms
I didn't use space constraint. this file is very simple.
I leave you to see it in the attached file below.

Please let me know what you think  :)
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 09, 2020, 07:20:25 PM
Yes, maybe, but in this case it was you choosing the teacher for each activity, not FET.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 09, 2020, 07:33:41 PM
Yes, and for a quick introduction to the activities, I used the customized version for Algeria, using a function separately... I think it would be useful if it was included in the official version. What you think?
This trick avoids using the custom version "mapr" Which is unstable.
Now it is easy with this trick. It also prevents the teacher from observing the room more than once during the week
Attached below are some beautiful files that we previously got via FET "mapr". Now it is easy with this trick
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 09, 2020, 08:00:29 PM
1) "Separately" is suggested and in the TODO, but I don't think it has its place in the official FET. It might complicate things and confuse the user. I am sorry. Official FET is for every institution in the world.

2) What trick? Your last one? Yes, but you chose exactly the teachers for the activities, you did not give the freedom to FET to choose.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 09, 2020, 08:36:20 PM
As for the second point, it is normal, which is not a problem. It is the natural way to introduce activities in FET. This way is very useful because it makes us avoid repeated observing of the room by the teacher during the exam period.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 11, 2020, 10:10:11 PM
Another way I think is better...

Teachers: T1,T2,....T36 // as subgroups;
Rooms: R1,R2,...R10 // as activity tags
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 11, 2020, 10:27:36 PM
Nice. But it assumes you know that each teacher has exactly 5 activities. Also, I don't understand why you added real teachers as FET subgroups. You could have added real teachers as FET teachers.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 11, 2020, 10:47:06 PM
Quote from: Liviu Lalescu on May 11, 2020, 10:27:36 PM
Nice. But it assumes you know that each teacher has exactly 5 activities. Also, I don't understand why you added real teachers as FET subgroups. You could have added real teachers as FET teachers.
Yes, before distributing activities to teachers, it is necessary to know how many activities each teacher takes. This point is very important.
As for the sub-groups, yes, teachers can be entered as real teachers in the program without any problem. You can also check it yourself. Thank you dear for your interest  :)
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 11, 2020, 10:49:21 PM
You are welcome!  :)
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 11, 2020, 11:31:30 PM
In fact, the real teachers were entered as subgroups in order to use the feature separately in the custom version to enter activities faster... Then re-open the file with the official version.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 12, 2020, 12:23:15 AM
A slight modification was made by introducing the real teachers as teachers into FET.
I Attach the file. fet below...
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 12, 2020, 08:05:38 AM
You forgot to convert the two time constraints from students to teachers.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 12, 2020, 09:39:27 AM
Quote from: Liviu Lalescu on May 12, 2020, 08:05:38 AM
You forgot to convert the two time constraints from students to teachers.

Hmm...sorry about this bug! And thanks for the report.
It has been corrected and re-uploaded the correct file in the above reply.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 12, 2020, 11:58:41 PM
Good news!
A workaround was found without resorting to adding the constraint: room occupies max time slots by adding activities that represent gaps. 4 gaps per room (real teacher) for this example. This makes each room (every real teacher) have the same number(5) of real guard activities.

The virtual rooms function was used;
The real rooms: R1,R2,...R10 have been added as teachers;
The real teachers: T1,T2,...,T36 have been added as rooms;

I attach the .fet file below;
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 13, 2020, 07:57:47 AM
OK. I don't understand exactly your constraints, but I guess it's OK.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 13, 2020, 09:46:40 AM
Quote from: Liviu Lalescu on May 13, 2020, 07:57:47 AM
OK. I don't understand exactly your constraints, but I guess it's OK.

Hmm ... Sorry if I am not clear enough!
Comments have been added to the file.
I attach the file again...
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 13, 2020, 10:19:50 AM
OK, no problem!  :)
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 13, 2020, 11:27:04 AM
I am interested in your point of view, dear Liviu. Of course, if your time permits. And thanks in advance. 🙂
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 13, 2020, 12:08:51 PM
Yes, it is a useful trick, I thought about it as well, but I tried to think of better solutions and forgot to mention it.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 13, 2020, 12:27:29 PM
Thank you so much 🙂
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 13, 2020, 12:30:09 PM
You are welcome  :)
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 13, 2020, 12:33:31 PM
The advantage of this trick is that it used for the first time the function of the virtual Rooms.
Which avoids the use of the custom version; FET mapr.
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 13, 2020, 12:39:39 PM
Indeed, interesting solution.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 13, 2020, 01:11:21 PM
Thank you 🙂
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 13, 2020, 04:56:31 PM

By the way, Let me dear Liviu to suggest adding the Virtual rooms function in the 2 custom version (Morocco and Algeria).
This function is very useful in many uses: for making test schedules, by restricting some special activities that need two rooms....etc. And thanks in advance. :)
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 13, 2020, 07:09:29 PM
Hmm, dear Benahmed, these changes were difficult at the time I made them for the official. But I will add them in my TODO list for custom Algeria and Morocco.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 13, 2020, 07:15:06 PM
Quote from: Liviu Lalescu on May 13, 2020, 07:09:29 PM
Hmm, dear Benahmed, these changes were difficult at the time I made them for the official. But I will add them in my TODO list for custom Algeria and Morocco.

Thank you!
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 14, 2020, 12:30:18 PM
But what concerns me now and trying to find a solution is how to avoid repeating the same room for the teacher.
Below screenshots are shown...
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 14, 2020, 12:41:04 PM
I think this is because virtual rooms work;
random selection of rooms without taking into account the non-repetition of elements in pairs for each room
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 14, 2020, 12:45:52 PM
On this topic, I suggest adding a checkbox in the dialog box for make/edit virtual rooms to allow repetition or not to allow repetition. what you think?
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 14, 2020, 02:33:53 PM
Hmm, Benahmed, it is so difficult for me to follow this, as you swapped teachers with rooms. But I try to understand.

1) The usage of fake 4 hours for each FET room is not perfect from the efficiency point of view. But it might work. I thought of adding a perfect constraint: room max occupied slots, but it is not feasible - meaning it is taking too much time if using virtual rooms.

2) I could try to make you a customization, so that each FET teacher gets unique FET rooms, not duplicates. But I do not see reasons for adding this constraint in the official FET, it would only complicate things and confuse the user.

3) I really prefer my approach with allocating activities (subject+students set) to FET days = real-life slots and FET hours = real-life teachers. Why can't you use this approach? I did not think of the duplicate problem above, but we could think of it if you decide to follow this path.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 15, 2020, 01:56:12 AM
Hmm ... I think element 2 is the best choice.
But adding it to the official will be a good addition and useful in all cases... Especially since the virtual rooms are still in the beginning, and that this proposed feature will enrich FET in all aspects.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 15, 2020, 02:12:00 AM
I also think this feature will not complicate things, nor will it make the user confused.
Of course, with explanation and guidance, it will never happen what you said. In addition to that,   FET has many more complicated features than this simple addition.
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 15, 2020, 07:56:38 AM
But I do not see any reason why a user would use this constraint in a usual file.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 15, 2020, 12:18:55 PM
Quote from: Liviu Lalescu on May 15, 2020, 07:56:38 AM
But I do not see any reason why a user would use this constraint in a usual file.

     This constraint will be very useful for the timetables of the quarterly or half-yearly exams without forgetting the exams at the end of the years. these timetables are an integral part of the files produced by FET throughout the school year.
the designers of these types of files want to reign more transparency and credibility on the exams by having the teachers who monitor the exam rooms swapped so that each supervisor monitors each room among the rooms assigned to him only once throughout the exam period.

So why do we deprive the designers of this type of files of this useful constraint that will comfort them and profit them a lot of time other than manual completion??!
But despite all this, the last decision is up to you, dear Liviu.  :)

Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 15, 2020, 03:05:23 PM
Dear Benahmed,

Forgive me, I am a bit tired of working hard. But I thought of your suggestion and really consider it to be very peculiar. Why normal users would constrain each teacher to be in a different room each time? Yes, you said that for exams in an approach like yours, but it is not optimal (as I told you, the room max occupied slots trick you devised is not optimal and a constraint cannot be added for this).

Also, the constraint you suggest (not same rooms for teachers) is not implementable efficiently in FET.

But I propose you to devise for you a custom version, having included this constraint, so I won't need to design the interface, just the generate code. Let me know if this would be useful to you.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 15, 2020, 03:28:15 PM
Quote from: Liviu Lalescu on May 15, 2020, 03:05:23 PM
Dear Benahmed,
....
Also, the constraint you suggest (not same rooms for teachers) is not implementable fast in FET.

But I propose you to devise for you a custom version, having included this constraint, so I won't need to design the interface, just the generate code. Let me know if this would be useful to you.

"not same rooms for teachers": good name

Well, it seems that it is not possible or feasible at the present time to wait for the days to come.
Thus, editing a customized version of the program will be useful and beneficial for us and everyone who needs it.

Thank you so much, dear Liviu.
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 15, 2020, 03:46:38 PM
Actually, the constraint will not be named. It will be implicit in the program.

How do you suggest to name this custom version?

It will take a few days, because I am now working on some things on the official version.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 15, 2020, 04:39:42 PM
Quote from: Liviu Lalescu on May 15, 2020, 03:46:38 PM
Actually, the constraint will not be named. It will be implicit in the program.

How do you suggest to name this custom version?

It will take a few days, because I am now working on some things on the official version.

Thank you.
I suggest the following name:
Exclusive Virtual Room... the abbreviated name is: EVR

This means that the program will exclusively assign non repeated elements of virtual room to a real room(or a real teacher or any other data the user wants to define their outputs)
The uses of this feature are multiple and wide and cannot be limited to this example only.
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 16, 2020, 03:31:03 PM
I did it, please get it from https://lalescu.ro/liviu/fet/download/custom/nsrt/

Hmm, I just saw some cases in which the constraint does not work - I am working on it.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 16, 2020, 04:02:19 PM
very acceptable solution except for 2 real teachers: T13 and T36  for my genaration
  ... good works thank you. :)
but the name is very long!... can we choose a short name as mentioned above?
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 16, 2020, 04:05:09 PM
I prefer a more explanatory name. You can rename the directory.

I don't know why this bug appears - I am trying.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 16, 2020, 04:11:56 PM
Quote from: Liviu Lalescu on May 16, 2020, 04:05:09 PM
I prefer a more explanatory name. You can rename the directory.

.....
ok but we can choose a short name:
NSRT: which means: Not Same Room Teachers.
what do you think?
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 16, 2020, 05:44:04 PM
I did it: https://lalescu.ro/liviu/fet/download/custom/nsrt/

I am so tired...
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 16, 2020, 06:00:27 PM
I checked this. And the repetition has disappeared ..Thank you very much, Dear Liviu.
We are very grateful for this work you have done.
We also apologize for the fatigue that we have caused.
This custom version  will be very useful in many cases.
We also ask God to protect you and take care of you and make you a path to paradise.
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 16, 2020, 06:07:09 PM
You are welcome, dear Benahmed, and thank you as well!  :)

I must confess I don't like this version, because it is very weird to switch teachers with rooms and the new constraint is not perfectly efficient, and virtual rooms in this case is also not perfectly efficient. But if it works it is good.

Also, I didn't think it will be needed by more people, but if it does so, it is great.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 16, 2020, 06:27:04 PM
The idea worked great. This program is really flexible and can handle many situations. Congratulations, Dear Liviu, for this program, which has a lot of custom version, which provide solutions to many cases that are difficult for many programs ...but FET is really a great application. thank you so much!!!  :)
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 16, 2020, 06:29:39 PM
You are welcome!  :)
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 16, 2020, 07:44:44 PM
Please let me know if the program cannot solve or if it produces a wrong solution.

Because I did not make it perfect. It might work only if the real rooms are used for activities without teachers or more than 1 teacher.
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 16, 2020, 09:56:16 PM
Dear Benahmed,

I tried to implement room max available slots, hard coded in the program, to 5. I attach the result. It solves much faster now, instant. The only thing is that you cannot add the constraints for gaps like you added.

Please tell me if this result is good. I can try to help you, if all the activities have duration 1 and if all real rooms in this are in a virtual room, by making an option, max occupied slots, selectable from the program. The advantage is that the program is much faster and I like it better.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 16, 2020, 10:44:08 PM
Quote from: Liviu Lalescu on May 16, 2020, 07:44:44 PM
Please let me know if the program cannot solve or if it produces a wrong solution.

Because I did not make it perfect. It might work only if the real rooms are used for activities without teachers or more than 1 teacher.
Ok!. It's certain. no problem!

Quote from: Liviu Lalescu on May 16, 2020, 09:56:16 PM
Dear Benahmed,

I tried to implement room max available slots, hard coded in the program, to 5. I attach the result. It solves much faster now, instant. The only thing is that you cannot add the constraints for gaps like you added.

Please tell me if this result is good. I can try to help you, if all the activities have duration 1 and if all real rooms in this are in a virtual room, by making an option, max occupied slots, selectable from the program. The advantage is that the program is much faster and I like it better.

the results are good. unless we can limit the number of activities per day for each real teacher to 3. with the constraints of gaps was possible. the day 1(Sun) consists of 4 hours, and it is considered tiring to let a teacher work full day (T27,T28)... apart from that the result is excellent. congratulations dear Liviu!
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 16, 2020, 10:52:14 PM
So, recapitulation:

1) each FET room has different FET teachers,

2) each FET room has maximum 5 occupied slots in total,

3) each FET room has maximum 3 occupied slots per day.

Are these possible to be hard-coded (meaning not changeable)? It is much easier for me, but you might need differently. If not, I can make a dialog, with a check box for (1) and a spin box for (2) and (3).
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 16, 2020, 11:08:39 PM
1/ for the first point; Yes of course

2/ for the 2nd point it is not always the case, for other example it can be less or more

3/ for the 3rd point; it can be 3 or 2 or even more according to the examples

I think that dialog boxes are the best solutions.
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 16, 2020, 11:15:15 PM
(2) and (3): the same value for all FET rooms in a data file?
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 16, 2020, 11:22:17 PM
Quote from: Liviu Lalescu on May 16, 2020, 11:15:15 PM
(2) and (3): the same value for all FET rooms in a data file?
unfortunately this is not always the case. it depends on the examples; it can vary from one FET room to another FET  room, but generally between two natural numbers ...
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 16, 2020, 11:36:58 PM
Quote from: Benahmed Abdelkrim on May 16, 2020, 11:22:17 PM
Quote from: Liviu Lalescu on May 16, 2020, 11:15:15 PM
(2) and (3): the same value for all FET rooms in a data file?
unfortunately this is not always the case. it depends on the examples; it can vary from one FET room to another FET  room, but generally between two natural numbers ...

this means, that a set of teachers saying for example have 5 activities each, and a second set of teachers have 4 activities..means that the group of teachers is divided into two subgroups; one subgroup with 5 activities each, and the other subgroup with 4 activities each.

this case we meet it when we divide the total number of activities on the total number of teachers we find a decimal number like 4.5 for example
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 17, 2020, 04:53:08 AM
let's take another more explanatory example:
add 4 teachers (FET rooms) to the 36 that we have in our first example this gives us 40 teachers (40 FET rooms). the number of real rooms (FET teachers) does not change no and stay 10. that gives us 180 real activities (2 teachers per room X 10 rooms X 9 time slots per week = 180 activities )

180 teachers / 40 teachers = 4.5 (decimal number)
all this leads us to solve the following two equations:

4x+5y=180  ....... (1)
x+y=40    .............(2)


The solution to this set of equations becomes child's play
x=20    ; y=20


therefore a set of 20 teachers will have 5 activities each, and a second set of 20 teachers will have 4 activities each.

of course will do this with the gaps (for the moment of course): the first set will have 4 gaps for each element, and the second set will have 5 gaps for each element.

the attached .fet file produced with FET - nsrt, shows these ideas well;

note: there  are other examples the week consists of 5 days and not just 3 days
other examples where the virtual room is made up of 3 sets. that is to say each real room contains 3 real teachers.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 17, 2020, 08:55:00 AM
another example with 3 real teachers in each real room, found with the same method above.
we have 50 teachers;
we have 3 teachers per room * the number of rooms(10 rooms) * number of time slots(9 ts) = number of activities= 270 activities;

so 270 activities / 50 teachers = 5.4 (decimal number);

we have 2 sets of teachers, the first with 5 activities each (30 real teachers) which gives 4 gaps per teacher.
the second with 6 activities each (20 real teachers) which gives 3 gaps per teacher.
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 17, 2020, 10:12:14 AM
Dear Benahmed,

To add two types of constraints (room max slots per week/day) is tedious and I am not sure it will work as you need. Until we check it will work, I propose you a trick/hack:

For each FET room, add a comment. If that comment contains "MSPW=x" and/or "MSPD=y", x is max slots per week and y is max slots per day.

I think I can implement this fast and you can check. Eventually, after some time, if it works really well, maybe I'll add it the proper way.

Please let me know if you are interested in this, and I'll begin doing it.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 17, 2020, 11:33:47 AM
hmm .. I think it's a good trick, and it is an alternative to adding gaps and their related activity tags and their constraints...
ok! we can implement it as a temporary solution ... i hope it will not complicate things for other users  :'(. thank you.
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 17, 2020, 12:45:23 PM
I did it: https://lalescu.ro/liviu/fet/download/custom/nsrt/

I hope you and other users will benefit from it.

It would be theoretically very easy to add the exact constraints (because the code runs now), but very tedious.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 17, 2020, 01:38:27 PM
thank you very much for your effort.
but there is a little inconvinient (max span) as described on the screenshot attached below
can we limit the span?
with the gaps it was easier
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 17, 2020, 06:18:00 PM
I think I found an idea; we can overcome this situation by merging pm1 and pm2 of the Sun day(day 1 of the week).
this will allow only one repetition during exams( without the program really knowing that it is a repetition) a widely acceptable solution...

I attach the file .fet below..

note: but sadly this solution is not good in all situations especially if the afternoons consists of 2 sessions  :'(
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 17, 2020, 07:36:19 PM
I really don't understand your previous post, sorry.

But after a today's hard work I managed what you wanted. https://lalescu.ro/liviu/fet/download/custom/nsrt/  . Note: I changed the strings in the comments, see the file which solves in the examples or read the readme.txt.

And note that what you want is impossible practically with your file. For 4 teachers we need to allow span 6 (I chose the first 4). Please see that file.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 17, 2020, 07:57:17 PM
thank you very much dear Liviu for adding this new MSPD( max span per day) constraint. it's really great. and I really apologize for making you work hard today.
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 17, 2020, 07:59:42 PM
You are welcome!  :)

I thought you would be a bit disappointed that a solution is only possible with 4 exceptions.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 17, 2020, 08:02:15 PM
Quote from: Liviu Lalescu on May 17, 2020, 07:59:42 PM
You are welcome!  :)

I thought you would be a bit disappointed that a solution is only possible with 4 exceptions.

absolutely not disappointed. for 4 it's nothing.
very widely acceptable solution. thanks again  :) :) :)
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 17, 2020, 08:04:59 PM
You are welcome, dear Benahmed!  :)
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 19, 2020, 02:07:50 PM
I believe there is an error somewhere.
the nsrt version fails to resolve the file attached below (does not exceed 16 placed activities)!
I also attach the same file resolved by the official version with the gaps..
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 19, 2020, 02:46:51 PM
may be a limit to satisfy the repetition condition implemented in the nsrt version. and we must break this condition or give it a weight less than 100% specially for such file attached above
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 19, 2020, 03:57:45 PM
In this file we have two sets of teachers; The first set has 12 activities, and the second set has 13 activities.
While the number of real rooms is only 10 .
So we clearly see that the number of Rooms is smaller than the number of activities for each element of the two sets.
Thus the solution with this version is impossible.
Repetition must be allowed.
I suggest adding a checkbox to allow or disallow repetition... or add weight to this constraint.
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 19, 2020, 04:30:33 PM
I am sorry, but adding weight/exceptions is not possible.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 19, 2020, 06:11:29 PM
No problem Dear Liviu 🙂
... So the method for gaps as described above remains valid in such files ... like workaround.
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 19, 2020, 09:32:10 PM
I am trying on adding exceptions - it is hard...
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 19, 2020, 09:43:27 PM
Thank you!
I wish you success 🙂
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 19, 2020, 10:24:39 PM
It seems to work: https://lalescu.ro/liviu/fet/download/custom/nsrt/

I hope you can allow a room 3 times if you allow 2 exceptions (as opposed to two rooms two times each). But if not, I could find a solution also for this.

I am so tired  :)
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 19, 2020, 10:49:09 PM
thank you!
I am so sorry again  :)
But how can i have exceptions changed?
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 19, 2020, 10:50:13 PM
Please read the readme.txt near the end and see your example (which I modified), see the comments of the rooms.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 19, 2020, 10:53:45 PM
Thanks I have seen it.
thank you so much  :)
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 19, 2020, 10:55:43 PM
MTR = max teachers repetitions
good solution!
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 20, 2020, 12:40:56 AM
Hmm... I apologize for this quick return.
the last version works perfectly, but I think we forgot to take into consideration the case where non repetition is possible. as you can check with the files resolved by the nsrt3 version without any repetition.
I tried to enter MTR = 0 in the comments but to no avail...thanks for your help.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 20, 2020, 04:39:19 AM
I suggest in this way to leave MTR = 0 by default in the source code, unless if the user declares exceptions...
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 20, 2020, 08:28:37 AM
Sorry, I forgot about this. I will correct.

But I suggest not MTR=0 in the code, but the user to add it. It is FET style.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 20, 2020, 10:01:57 AM
I think this is the operating principle of nsrt; not to allow repetitions, so set "MRT = 0" by default to make sense to me. therefore, "MRT = number" is only the exception for certain types of files.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 20, 2020, 10:28:10 AM
Quote from: Liviu Lalescu on May 20, 2020, 08:28:37 AM
Sorry, I forgot about this. I will correct.

But I suggest not MTR=0 in the code, but the user to add it. It is FET style.
I thought about you're suggestion.. it's good than mine
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 20, 2020, 10:44:15 AM
Yes, that is what I thought  :)

Please get it: https://lalescu.ro/liviu/fet/download/custom/nsrt/
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 20, 2020, 11:46:05 AM
it's fine, thank you so much for your help  :)
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 20, 2020, 12:16:01 PM
You are welcome!  :)
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 21, 2020, 06:58:58 PM
good evening dear Liviu
can you take a look at this file. the constraints added to the comments of the rooms do not work!
I discovered this fact when trying to answer a question here:
https://lalescu.ro/liviu/fet/forum/index.php?topic=4456.msg24566#msg24566

she ask if FET-nsrt can make time tables with only one teacher in each room.
I prepared a file but the constraints like MHPW are not respected!
I attach the file below...
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 21, 2020, 08:01:38 PM
Hello, dear Benahmed,

New version, corrected: https://lalescu.ro/liviu/fet/download/custom/nsrt/

I hope I corrected. I wasn't thinking of FET real (as opposed to virtual) rooms.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on May 21, 2020, 08:56:16 PM
Quote from: Liviu Lalescu on May 21, 2020, 08:01:38 PM
Hello, dear Benahmed,

New version, corrected: https://lalescu.ro/liviu/fet/download/custom/nsrt/

I hope I corrected. I wasn't thinking of FET real (as opposed to virtual) rooms.

Hello, dear Liviu;

yes it is corrected. I tried all the constraints: MHPW, MHPD, MTR, MSPD, in this attached file above ..
and I can say that they are all operational.

I attach the file again with the added constraint; MHPD
thanks again!
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on May 21, 2020, 09:07:25 PM
Great! You are welcome!
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on June 16, 2022, 08:04:49 PM
Hello!
Is it possible to update the nsrt version to the latest version?
and make the most important constraint (MTR= max teachers repetitions) appear in the FET interface?
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on June 17, 2022, 10:19:56 AM
Hello, dear Benahmed,

I will try in the future. Please remind me how this version worked and show me how do you suggest MTR in FET interface. Were these "MHPW, MHPD, MTR, MSPD" comments for each room? Should I make MTR a global variable and disable in rooms comments?
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on June 17, 2022, 11:13:08 AM
Should I add MHPW, MHPD, MTR, and MSPD as integer variables for each room, and adding/modifying a room has these 4 variables? And write "Max hours per week", "Max hours per day", "Max teachers repetition", and "Max span per day"?
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on June 17, 2022, 11:34:26 AM
Quote from: Liviu Lalescu on June 17, 2022, 10:19:56 AMHello, dear Benahmed,

I will try in the future. Please remind me how this version worked and show me how do you suggest MTR in FET interface. Were these "MHPW, MHPD, MTR, MSPD" comments for each room? Should I make MTR a global variable and disable in rooms comments?

I think it is better to integrate the nsrt version of FET by adding a new mode; called: nsrt mode, to better guide users. this mode is reserved only for making exam timetables...

The most important constraint is MTR, for the others (MHPW, MHPD, MSPD) I suggest leaving them as they are in the comments. the future will show us their destinies. personally I use the constraint: "a room's not available times" instead of them..

This solution I found it using set theory, the solution became simpler without the use of these 3 variables (constraints: MHPW, MHPD, MSPD) except MTR.

I think this way made coding easier(!?)
what do you think?
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on June 17, 2022, 12:32:15 PM
I forgot to say; this version works very well, it has transformed the timetables of exams easy to design.  I suggest adding MTR to each room individually, and to all rooms at once.
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on June 17, 2022, 04:11:21 PM
I am sorry, but I think I cannot add a new mode for this. Your method is not universal and seems a bit weird to me, switching teachers with rooms. It is not FET style, and I think there are only a few users.

I could:

1) Update your NSRT custom version to the latest FET, and keep all the mode of operation. I am sorry, but switching from comments to the interface is difficult now, especially since there are data files using the comments structure.

or

2) We could collaborate and use the official FET to design exam timetabling for your precise needs. I had another idea in my previous posts, but it seems that you did not like it.

I am very tired now, just arrived. But we will work on this a few hours later from now, if you want.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on June 17, 2022, 05:33:48 PM
OK you convinced me. I think we should leave things as they are, at least for now and just update -if you want- the NSRT custom version to the latest FET.

Thank you dear Liviu for your interest  :)
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on June 17, 2022, 06:12:42 PM
I will try a bit later to update, it shouldn't be difficult.

Thank you for your understanding, and I am sorry!
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on June 17, 2022, 06:24:05 PM
Quote from: Liviu Lalescu on June 17, 2022, 06:12:42 PMI will try a bit later to update, it shouldn't be difficult.

Thank you for your understanding, and I am sorry!


No problem at all.  Thank you to you too dear Liviu:-)
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on June 17, 2022, 09:41:17 PM
It is done: https://lalescu.ro/liviu/fet/download/custom/nsrt/

Also search for updates will work, it is special for NSRT.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on June 17, 2022, 09:52:45 PM
Great, thank you so much dear Liviu:-)
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on June 17, 2022, 09:54:49 PM
You are welcome!  :)
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on November 09, 2024, 01:00:55 PM
Hello dear Liviu
only if you have time, and if you are willing to update FET-nsrt to the latest FET version.
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on November 09, 2024, 01:21:26 PM
Hello, dear Benahmed,

I am willing, but I have no time, because I am working on massively converting all time/space constraints to shorter and better code. I worked on this ~5 days and maybe I have 3 more to work. After I will hopefully release a new official version, 6.28.0, I will also try to update NSRT.

I will combine 2628 files in only 4, simpler, and compilation time will be much shorter. Also, translation will go from >20k fields to maybe only 5000, without major repetitions.

I will, after I hopefully finish, put a snapshot and ask users to test. I hope in 3-5 days I'll have a snapshot.

If it is very important and urgent, I can try to update NSRT to 6.27.0 now, but I hope not.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on November 09, 2024, 01:36:55 PM
Thank you for your detailed response, as always... no, it's not urgent, we can leave the update until the next release. 🙂
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on November 09, 2024, 01:39:21 PM
You are welcome! Thank you! Please, if I forget, remind me after I hopefully release official FET-6.28.0.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on November 09, 2024, 01:48:23 PM
Quote from: Liviu Lalescu on November 09, 2024, 01:39:21 PMYou are welcome! Thank you! Please, if I forget, remind me after I hopefully release official FET-6.28.0.

Ok sure!

Quote from: Liviu Lalescu on November 09, 2024, 01:21:26 PMHello, dear Benahmed,

I am willing, but I have no time, because I am working on massively converting all time/space constraints to shorter and better code. I worked on this ~5 days and maybe I have 3 more to work. After I will hopefully release a new official version, 6.28.0, I will also try to update NSRT.

I will combine 2628 files in only 4, simpler, and compilation time will be much shorter. Also, translation will go from >20k fields to maybe only 5000, without major repetitions.

I will, after I hopefully finish, put a snapshot and ask users to test. I hope in 3-5 days I'll have a snapshot.

If it is very important and urgent, I can try to update NSRT to 6.27.0 now, but I hope not.

I read good news, I hope that these major changes will have good repercussions on the translation, which would be simple and would allow a significant saving of time.
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on November 09, 2024, 01:55:19 PM
Indeed, quote from the ChangeLog: shorter compilation time, smaller package sizes, less fields to translate, nicer looking constraints dialogs. The first three are with "much" :)

If you want to help me with testing, please stay tuned. The time/space constraints' dialogs should have the exact same functionality - this is the test.

I am ready with time constraints - remaining are space, which are much less and easier. I hope in maximum 2-3 days to have a snapshot for you. I will announce on the Snapshots section here, and maybe put a link on the main FET page for test, which I did not do until now.
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on November 09, 2024, 05:56:32 PM
I hope I have enough time for the test, by the way I wish you success.
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on November 09, 2024, 06:11:19 PM
Thank you! :)
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on November 09, 2024, 08:12:23 PM
You are welcome! 🙂
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on November 16, 2024, 11:56:55 AM
Dear Benahmed and FET-NSRT users,

I just updated FET-NSRT to FET-6.28.0: https://lalescu.ro/liviu/fet/download/custom/nsrt/
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on November 16, 2024, 12:27:13 PM
Thank you very much Dear Liviu!
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on November 16, 2024, 12:31:16 PM
You are welcome! :)
Title: Re: Max Hours for a room(s)
Post by: Benahmed Abdelkrim on November 18, 2024, 02:40:59 AM
FET-NSRT is updated to FET-6.28.1:
https://lalescu.ro/liviu/fet/download/custom/nsrt/

Thank you dear Liviu!
Title: Re: Max Hours for a room(s)
Post by: Liviu Lalescu on November 18, 2024, 05:03:16 AM
You're welcome!  :)