"An activity has a preferred starting time" bug

Started by Zsolt Udvari, August 16, 2017, 05:23:24 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Zsolt Udvari

Maybe a user error (PEBKAC) but I think I share it.

So I've a little complicated FET-file and it seems the "An activity has a preferred starting time" doesn't work.

I attached the file and try to generate and check:

  • Nr. 895 and 896 activities (without any teacher and student)
  • They have preferred starting time: "Szerda 1." (Wednesday) and "Hétfő 3." (Monday) with 100%
  • They have same starting time (day+hour) with 7 other activites (for example 647 and 648)
  • Generate (without success)
  • Check the student's timetable, go to "11A" and the 647 is on "Péntek" (Friday)!

Is it a bug or did I anything wrong?

Zsolt Udvari

Hm. It is a bug with 5.31.5 but works as expected with 5.32.2.
Was any bug fix between these releases?

Liviu Lalescu

There was no such fix between FET-5.31.5 and FET-5.32.2.

It is a feature, not a bug :)

FET does not care about same starting time constraints to forbid some activities to occupy the slots which are not permitted by influence from other same starting time activities.

Do you think I should add this in the TODO?

Zsolt Udvari

Quote from: Liviu Lalescu on August 16, 2017, 05:51:51 PMDo you think I should add this in the TODO?
I don't know. It seems my logic is different as FET logic. I think my case is univocal there aren't any choices.

Liviu Lalescu

I added this in the TODO. I'll think about it.

Liviu Lalescu

You are right, I should implement this. The problem is that it is very risky to change now working code. I should run through all my test files, again.

Zsolt Udvari

Do you think it's worth to try a tag?

I've many activities which should have same starting time (day and hour too) and I would like (it's better because of complications) to determine their starting time.
In the file I created virtual activities (895 and 896) and in this case it's easy to maintain the starting times: have to search the virtual activities and haven't to think which activity has determined starting time.
My idea with tags: I'll create tags (instead of virtual activities), add the tag to activities and use "Set of subactivities has a set of preferred starting times".

What do you think? The tags is better?

I don't want add this constraint to every activities because if should modify it's many work - many work causes many errors and bugs :)

Zsolt Udvari

Quote from: Liviu Lalescu on August 16, 2017, 07:09:13 PM
You are right, I should implement this. The problem is that it is very risky to change now working code. I should run through all my test files, again.
I don't know FET's code but I think you should add (merge) time constraints (virtually, doesn't write into foo.fet) to every activities.

Liviu Lalescu

#8
Quote from: Zsolt Udvari on August 16, 2017, 07:19:02 PM
Do you think it's worth to try a tag?

I've many activities which should have same starting time (day and hour too) and I would like (it's better because of complications) to determine their starting time.
In the file I created virtual activities (895 and 896) and in this case it's easy to maintain the starting times: have to search the virtual activities and haven't to think which activity has determined starting time.
My idea with tags: I'll create tags (instead of virtual activities), add the tag to activities and use "Set of subactivities has a set of preferred starting times".

What do you think? The tags is better?

I don't want add this constraint to every activities because if should modify it's many work - many work causes many errors and bugs :)

Yes, it might be a good idea.

Quote from: Zsolt Udvari on August 16, 2017, 07:52:17 PM
Quote from: Liviu Lalescu on August 16, 2017, 07:09:13 PM
You are right, I should implement this. The problem is that it is very risky to change now working code. I should run through all my test files, again.
I don't know FET's code but I think you should add (merge) time constraints (virtually, doesn't write into foo.fet) to every activities.

Yes, it would be an idea. My hope is that the improvement would be very low. Because of the way the FET algorithm works. The same starting time activities are kept together all the time.

There are also other things why I cannot implement this feature: a person might come up with min days between activities which forbids some slots for some activities with same starting time. Or max hours daily for students will forbid some activities to be at the last slots of the days. There are too many variants to take care of. And I wrote in the FET documentation that you can help the program towards the solution by adding redundant constraints.

It would be good if you could make a test. Your original file and a file in which you help FET towards the solution, with tags constraints or preferred activity constraints. Generate more timetables and let us know the results. Then I will see  what I can do. But I presume the improvement would not be important.

Zsolt Udvari

QuoteThere are too many variants to take care of.
Yes, I know.

If I can help you I'll try :)

Liviu Lalescu

Quote from: Zsolt Udvari on August 17, 2017, 09:31:00 AM
If I can help you I'll try :)

Thank you! Like I wrote in the paragraph above, a comparison:

Quote from: Liviu Lalescu on August 16, 2017, 10:05:59 PM
It would be good if you could make a test. Your original file and a file in which you help FET towards the solution, with tags constraints or preferred activity constraints. Generate more timetables and let us know the results. Then I will see  what I can do. But I presume the improvement would not be important.

You need to obtain a solvable file first.

Zsolt Udvari

Quote from: Liviu Lalescu on August 16, 2017, 10:05:59 PM
Quote from: Zsolt Udvari on August 16, 2017, 07:19:02 PM
What do you think? The tags is better?

Yes, it might be a good idea.
I did it (the tags). It seems it's better solution - faster and it seems doesn't try change an univocal constraint.

There isn't a solvable file (it's my fault, not FET ;) ) but I hope it will be ready soon.

Liviu Lalescu

Quote from: Zsolt Udvari on August 17, 2017, 12:24:13 PM
I did it (the tags). It seems it's better solution - faster and it seems doesn't try change an univocal constraint.

There isn't a solvable file (it's my fault, not FET ;) ) but I hope it will be ready soon.

Could you please send me the slower and faster files?

Zsolt Udvari

The slower is in the first comment, the faster is here.

It isn't solvable yet.

Liviu Lalescu

Thank you for the files. Fortunately (for me) I can say that this is not a proof that the second file is faster. It is just the initial order of placing the activities is changed, because of different constraints, and FET can go farther than on the first file.

We need a solvable file to check if it faster, and preferably run more times (maybe even 100 timetables, but 10 might be enough).

Another crucial thing is that we need ensure that the files are identical, only that you help FET towards a solution with some redundant constraints. I am not sure you respected this - I compared your files side-by-side with KDiff3 and it seems you modified some activities and some other constraints?