Switch button in Two Activities are Ordered

Started by math, June 16, 2017, 02:41:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

math

Hi!

I'm a huge fan of FET, using it for generating timetables for a computer science department of a mid-sized university. I'm fully aware that this is not your main usage scenario, however FET is working quite nicely for us.

However I have some suggestions on how to improve FET (at least for us). This first suggestion is a something that probably needs less time to code than to write this post:
could you please add a switch button to the "Time -> Activities -> Two Activities are Ordered" dialog? Pressing that button should cause first and second activity to switch their positions.

Background:
Usually each lecture is supplemented with two, three or even more tutorials. It's a common requirement of our lecturers that the lecture should be in an earlier position in the timetable than the corresponding tutorials (e.g. lecture on monday, tutorials on tuesday and wednesday). I implement this by adding a rule "Two Activities are Ordered" for the lecture and each of the tutorials. However, sometime this results in a configuration where it is impossible to generate a new timetable. Here, I change the order of tutorial and lecture (e.g. tutorials (for last week's lectures) on monday and tuesday, followed by the new lecture on wednesday).

At the moment I have to do the switching by selecting the particular activities from the looooong list of activities in the drop down box, which isn't very comfortable. It's also quite time consuming if you have to repeat this step dozens of times.

Hence, it would be a huge benefit (for me) if you could add a fifth button "Switch" besides the already existing buttons "Add", "Modify", "Remove" and "Close" in the mentioned dialog.

Perhaps you could add this "switch"-button also to the "Modify" sub-dialog.


Best, Mat

Liviu Lalescu

Thank you for the appreciation! Maybe you would like to write in the guest book.

If the workaround below does not work, I will try to implement it for the two activities ordered and two activities consecutive, in the add and modify dialogs.

Maybe a better name would be "Interchange"? I'll think about it.

But first, try this workaround and let me know if it works: just deactivate the too-strong constraints from the all time constraints dialog.

The reason I am not so eager to add these new buttons is to keep the interface as simple as possible and a kind of commodity :)  (I need communication with the translators for this field as well).

Please let me know.

Volker Dirr

I am not a native english speaker, but i think "swap" is a better term.

but in fact i must say that i don't like that constraint too much at all, since in my opinion it is just a "psychological" (so in fact unneeded) constraint if it isn't at the same day. Why? Because even if you add that constraint the order of the activities will change in real life very fast. Why? Because a teacher is ill; a students group is absent; public holiday; ...

Liviu Lalescu

#3
Yes, "Swap" is the name.

My workaround does not work if it is needed (in real life) that the two activities are not on the same day, but FET can put them in the same day.

So, let us know, math.

math

I'm not a native speaker either, swap is what I meant.

@Liviu:
Disabling the constraint is solving my problem only in terms of being able to generate a timetable again. In the generated schedule the lecture now might be in between the tutorials, so this is exactly what I didn't want to have.

@Volker:
I'm not quite sure why you think that this constraint only makes sense for activities that are planned on the same day. I admit that I'm not very familiar with timetabling for schools, but the order of activities is absolutly crucial for us. Just think of a lecture where students have to submit an excercise sheet each week. Assume that this lecture is on wednesday with four tutorials on thurday and friday. Students can use these tutorials for discussing the contents of the lecture in small groups. Hence, tutorials are extremely helpful for understanding the contents of a lecture. Students of this lecture now have another four days for working on the excercise sheet.

Now assume that I'm not using the "activities are ordered" contraint, still having the lecture on wednesday. But now two tutorials are planned on thursday and two tutorials on tuesday. Assume that a student is unable to attend the tutorials on thursday, so that he has to attend the tutorial on tuesday. Unfortunately he did not fully understand the contents of the lecture and would like to use the tutorial for clarifying open issues. He has to wait 6 days until he's able to attend the tutorial, only having a couple of hours for completing and submitting the excercise sheet afterwards.

Planning lecture and tutorials this way would result in over-subscribed tutorials on thursday and nearly empty tutorials on tuesday. Hence, placing the tutorials on the "same side" of the lecture helps us to load-balance between our tutorials, giving all students the same chance to work on their exercise sheets.

I hope you see that this type of constraint is everything but hokum for us.

Volker Dirr

#5
ok, you problem is a bit more complicated, since studens can choose one out of 2 slots. pupils at school can't do that.

but there are at least 2 problems with your solution:
a) maybe lecture is on Wendsday and tutorials are on Thursday and Friday. So what do you do if there is a public holiday on Thursday or Friday and / or what do you do if the teacher is ill on friday? (or if the student is ill) You will get the same problems. (even more worse, since he can't ask at all)

b) you will skip a lot of good solutions: why not lecture on Friday. So students can think about the problem over weekend and than still ask in tutorial if there is a problem on Monday or Tuesday. You will skip that solution, even it is very nice.

In my opinion the solution is very easy: the timelimit for homework is not 7 days. it is 14 days and all problems you wrote about are fixed.

math

I guess we're getting a little bit off topic here. My aim was pinpointing the necessity of this type of constraint for us. After I read your previous posting, I was a bit afraid that you might decide to remove that type of constraint in some future revision of FET.  ;)

Problem a) does not occur for the teacher's part, since research assistants may take over the lecture or tutorial in such a case. If the student's ill, he might watch video recordings of the lecture or just ask a friend. Problem b) isn't a problem at all, it's exactly what I need the constraint for, if the lecture is on a thursday (not all lectures can be placed on a single friday).

Each lecturer is absolutely free in the way how he's organizing his lecture. There's no way to force somebody organizing his lecture in any way, so I have absolutely no chance to specify a 14 days deadline. All I get is demands on how to place a lecture from all the different lecturers. And my job is to generate a timetable from all this input. And in fact: FET is an excellent tool to do this.

Volker Dirr

don't worry; we won't remove that constraint, since it is usefull for guys that use it with a same day constraint.

but my personal opinion is that you "fixed" only a part of problem a) and b) by that.
a) because you didn't care about holiday
b) because by using that constraint you will skip one good solution. (lecture first or last; you choose that by the constraint.)

in my opinion the 14 days timelimit is the sweetest solution; but of course you/the teachers can choose. (but they should know that you might impove the timetable with other constaints (more) if you don't need to use the order constaints. maybe other constraits are much more needed if you can fix your problem by such a simple 14 days time limit "trick".)

Liviu Lalescu

Quote from: math on June 16, 2017, 09:07:55 PM
@Liviu:
Disabling the constraint is solving my problem only in terms of being able to generate a timetable again. In the generated schedule the lecture now might be in between the tutorials, so this is exactly what I didn't want to have.

I understand. I'll make it for the next FET version (releasing firstly a snapshot as a test version). Please let me know if a snapshot with only the sources tar.bz2 would help you to test/temporarily use this facility, or you need me also to compile the Windows version.

Liviu Lalescu

I added the new feature, thank you for suggesting! In the add/modify two activities consecutive/ordered.

Please test the new facilities and let me know. The link: http://lalescu.ro/liviu/fet/download/test/ (only tar.bz2 sources for now). You can use without any worry until the official 5.31.7 will come out.

I need to wait with the release of the official 5.31.7, on one hand because I want to update to Qt 5.9.1 to be released in June, and on the other hand you said you have more suggestions to make? Or I misunderstood?

Please let me know.

Volker Dirr

He didn't said it directly, but if i understood correct he want/need it for a list of activities.

Liviu Lalescu

No, I think he needed what I did. A "Swap" button in add/modify dialogs.

Volker Dirr

that was what he asked for. but if you read his arguments you will see that he order at least 3 activities by that. so in fact he need a list; even he didn't asked directly for it.

Liviu Lalescu

Quote from: Volker Dirr on June 17, 2017, 10:33:03 AM
that was what he asked for. but if you read his arguments you will see that he order at least 3 activities by that. so in fact he need a list; even he didn't asked directly for it.

Oh, I see what you mean. But he needs only two constraints for three activities (A1, A2, and A3, of which A1 and A2 should be before A3, no matter the order of A1 and A2). I cannot see a simpler solution for his problem.

Volker Dirr

don't forget he might have more activities.
don't forget he might have many of those constraints.
don't forget he might to change the order many times.

i suggest to add (into TODO) a new constraint:
consraint order list of activities.
in fact this will be only a user intaface and generate_pre problem. no need to modify the algorithm, since that list of activities can be converted into several "2 ordered" constraint in the generation_pre.
by that new feature he will save several clicks if he swap the whole list.