Assigning multiple small rooms or one large room

Started by math, August 29, 2019, 09:18:30 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Liviu Lalescu

I attach the Qt Designer source of the file and the screenshot of the dialog. I only designed the dialog, I did not begin coding in C++.

math

You're really fast in getting things done. Thanks a lot.  :)

What's the purpose of "Remove selected" and "Insert after"? Should the add/remove sets or rooms? I guess it's sets. But why "insert after"? Isn't the order of sets irrelevant?

I would recommend renaming the buttons "insert" and "delete". Since they are placed below the list of sets, each user should be able to trace the context, i.e. that they refer to insertion and deletion of sets.

If the order of sets is irrelevant, I would recommend adding new sets always at the end, setting its number as maximum number of sets plus one (not caring if the numbers are continous). Otherwise the dialog needs additional buttons for changing the order of sets (e.g. buttons "up" and "down").

The dialog also lacks buttons for adding/removing rooms to/from the set. I would recommend adding a "remove" button below the middle list and an "add" button below the right list. Again, from the context it should be clear that these buttons refer to the respective list above them.

Liviu Lalescu

OK, "Insert" (at the end) and"Remove". Yes, order is irrelevant, but I thought users want a nice order. But it is more difficult with order.

No space for "Up" and "Down" :(  (but anyway useless).

Double-click should do it. I will add "Clear" under "Selected rooms" and "All" under "All real rooms".

Thank you for your suggestions. Maybe you have more? :)

Liviu Lalescu

#48
Attached a screenshot from Qt Designer.

math

Looks perfekt!

Regarding performance comparison of 5.39.0 and 5.39.1 (math-snapshot-16-sep-2019-20_29): I'm currently executing both FET versions on all example configuration files. 20-30 files are already finished and at the moment I cannot see mayor differences. Maximum performance drop is about 5%, but most values are very close. For one file 5.39.1 is even slightly faster.  ;)

I also tried increasing the optimization factor of g++ from -O2 to -O3. For 5.39.0 runtime decreased from 32,5s to 31,2s, for 5.39.1 it decreased from 32,9s to 32,4s. (all executed with --inputfile=examples/Germany/secondary-school-1/using_subactivities_constraints/German_subact_constr.fet --randomseedx=1 --randomseedy=1)

Liviu Lalescu


Volker Dirr

Quote from: math on September 17, 2019, 05:28:07 PM
For one file 5.39.1 is even slightly faster.  ;)

hmm... Just to be sure maybe recheck if the seed at the end is the same. Maybe it generated an other result.

Liviu Lalescu

#52
OK, I did the virtual rooms' dialog, which seems to be working; I have put the latest snapshot on https://lalescu.ro/liviu/Backup-fet/math/

I did not test generating with virtual rooms. I will do this now. There might be important bugs.

If you meet any bug, please report.

Edited to add: it does not generate. It crashes immediately on the attached file. I will try to find the bugs. I am not sure if today or tomorrow.

Liviu Lalescu

It seems I fixed the bugs and it seems to run on the modified file above. But I need to rest a bit, I am really tired of the work, and then check all what I done. I will inform you of the progress.

I hope later today I'll be ready, but I cannot guarantee.

Liviu Lalescu

#54
I have good news and (very?) bad news:

The good news is that it works correctly when the timetable is not fixed. There are 3 files. The first is simple, the second is a bit more complicated and the third is more difficult (it requires the physics and chemistry labs, rooms 161 and 162, to be nearly fully occupied - see the last room in the rooms list - it is a virtual room).

You could try this snapshot on your file, if it does not contain (many) fixed activities.

The (very?) bad news is that FET won't generate on the fixed timetable of a more difficult file. It generates always on file 1, sometimes on file 2, and never on file 3. It is logical to me now, knowing that part of the algorithm, when I choose random rooms for a virtual room.

The link to the snapshot and to the examples: https://lalescu.ro/liviu/Backup-fet/math/

I will try now practically and theoretically to see what's wrong. But it might be a big unsolvable problem.

Liviu Lalescu

#55
I hope I have good news: I made a small hack and the problem of locked timetables is solved.

How I made it: I consider that an activity which is locked in time and in a virtual room is only locked in time. So at the next allocation it might be scheduled in other real rooms (but in the same virtual room). Is that a problem?

The same link: https://lalescu.ro/liviu/Backup-fet/math/

After you generate, you will see only the virtual room in the studentss/teachers' timetables. The activities will appear in the real rooms' timetables, not in the virtual rooms' timetables, and the exact real rooms for an activity will appear (I implemented this) in the activities.xml. It is possible for me and/or Volker to add the real rooms in the HTML and View timetable students/teachers and Print timetables. This is as a future work.

Huu... it was difficult (the whole thing, from the beginning), but now I hope it is good  :)  Your suggestions were very good and helpful. But I am tired, need some rest now.

Volker Dirr

Quote from: Liviu Lalescu on September 18, 2019, 06:45:08 PMHuu... it was difficult the whole thing, but now I hope it is good  :)   I am tired, need some rest now.

hmm... You should work only like normal people. The problem is that you always forget to rest as soon as you are working. You skip too much private time and you skip too much resting time. You should work max 1/3 of a day. You need the other 1/3 of the day for resting and the last 1/3 of the day should be for private other stuff to keep you brain and body in shape.

Liviu Lalescu

Thank you, Volker   :)

PS: I modified slightly my message above, please read again.

Volker Dirr

yes, that correct. I am sorry, my grammar is bad and I do too many spelling error.

math

I fully agree with Volker: Liviu, you're working way too much. I never imagined you'd be able to complete that project that fast. Now please take all the time you need for debugging and improving, nobody's haunting you. Not even me.  ;)

Here's some feedback from my side:
Firstly, I was able to compile the version under Linux and OSX without any problems.

Secondly, I don't think that the room dialog is very intuitive:
- In listbox I cannot distinguish between real rooms and virtual rooms. Would it be possible to make the virtual entries appear in italic font or to add something to their name (e.g. "(virtual)")?
- for creating a virtual room, I first have to create a regular room, then making it virtual in the second step. Why not adding virtual rooms in the first place?
- when double-clicking a virtual room, the regular room dialog shows up where I can specify a building and a capacity. What relevance does this have in the context of virtual rooms? Since a virtual room encompasses multiple rooms, it does have multiple capacity values and may also spread over multiple buildings.
- wouldn't it make more sense to start the "make/edit virtual room" dialog when double-clicking?
- it seems as if virtual rooms can consist of real rooms only, i.e. FET does not support nesting of virtual rooms. However it is possible to add a real R1 room to a virtual room VR2, making that real room R1 virtual afterwards. This way VR2 consists of another virtual room.
(at least, FET complains about this when generating a new schedule.)


Moreover, it is possible to specify "room not available times" for a virtual room. Does this make sense?


Generating a schedule worked like a charm. I specified a virtual room which consists of two sets. When scheduling to this virtual room, FET allocates a real room for each set. In the student and teacher timetables there's no information about the real rooms but only the virtual room. However it should be easy to output both, e.g. "VR2 (R10, R15)" (allocated real rooms R10 and R15 representing virtual room VR2).


Thanks for all the work you put into this feature. Great job!