Generating multiple timetables and breaks of soft constraints

Started by wojgp, July 19, 2023, 01:53:39 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wojgp

Hello
I am generating multiple timetables, but after adding a few constraints FET shows that timetable breaks soft constraints and has certain number of soft conflicts.
My question is if I should get rid of all soft constrains breaks?

I checked soft_conflicts.txt file and luckly seems all the activities are placed consecutively in the timetable, because I selected this option in case the activities are on the same day. Exactly one activity conflicts with another activity of the same subject.
It causes there are 2 hours of the same subject one by one which is not even a disadvantage.
Eventualy please advise how can I try to fix this. I do not see an option to edit the same form fields as I entered at the beginning.
Should I have entered 0 for value of Min. days to avoid these errors when entering a certain Activity ?

Volker Dirr

I always prefer using only 100% weight. But some guys are ok with lower values.
You can modify multible constraint at once if you go to:
fet -> time constraints -> activities -> min days between a set of activities -> modify multible at once.

wojgp

Thank You. I edited weight and change into 100%, but seems the progress factor rewinds the counter and after 4 mins I get below 300 out of 591 :) I don't know if I should wait longer if the progress counter rewinds ?
But I changed all weights to 99% and it gives really good result with only 7 soft constrains breaks.
All of them are this kind and similar:
QuoteTime constraint min days between activities broken: activity with id=304 (    1/4 - Wojcik Janusz - Wychowanie fizyczne - 7 B Chlopcy (1),7 B Chlopcy (2)) conflicts with activity with id=302 (    1/4 - Wojcik Janusz - Wychowanie fizyczne - 7 B Chlopcy (1),7 B Chlopcy (2)), being 1 days too close, on days Poniedziałek and Poniedziałek, conflicts factor increase=0.99. The activities are placed consecutively in the timetable, because you selected this option in case the activities are on the same day

Anyway the result for now is outstanding and timetable even with above errors is completely acceptable.

It took me 2 days to enter the data, but teachers tried several days manualy :)

Volker Dirr

It went below, because your dataset is probably impossible.
The better and faster way is to check out why it is impossible and to fix that bug. In normal case it is just a single bug. But as you wrote: using less then 100% gives you now 7 bugs! So maybe 6 more then needed.
So you was forced to check 7 bugs manualy instead of only checking a single one. You forgot to measure that time! I guess you didn't fixed all 7 bugs "perfectly". So overall your variant is slower and has probably more bugs than needed.

wojgp

All current errors are caused because constraint "Min days = 1" is broken. I go to "Modify min days between activities" to change it, but it is not possible to set "Min days = 0" even when I uncheck "If two activities are on the same day, make them consecutive".
I tried 100% weight also, but it does not work. The highest I can use in my timetable for constraints is 99%
So in my case at this level of creating timetable I get:
Number of broken soft constraints: 7
Total soft conflicts: 6.67
which results that I have 7 sets of 2 activities which are placed one by one and constraint "Min days = 1" is not fulfilled.
I have no idea how to fix it out.

Liviu Lalescu

In my approach, I would recommend 99.75% and you might squeeze even a bit more of spreading. Then, only if you want to follow Volker's approach, make the possible constraints 100% (all but these 7) and the rest 99.75% or 0%.

Spreading is usually good (so the activities are not on the same day). But I am not sure in your case.

You cannot have min days = 0. Only when you add the activity, but it is not correct then, it won't add min days between activities constraints.

Volker Dirr

hmm... looks like you are mixing different stuff. We were talking about teachers not available, so that is impossible what you wrote, because in that case it should solve with 100% fo the teachers constraint fine without needing less then 100% constraint.

If you have problems with min n day constraint 100%, then the best is always viewing your dataset and thinking why it is impossible. It is sometimes very easy for a human to see why it is impossible. For example if the teacher is forced directly or indirectly by several constraints to work at only 4 days, but you split an activity into 5 parts.

I can't answer your problem in detail without knowing your data set. If you attach your data set, i might have a view (but in fact i always need more time, since i need to read all your data first. So it should be much easier for you, since you already read it)

If you don't understand why it is impossible, then you might locate the bug by setting all to 100%, just not the one that fails. But that way you will understand your timetable better and find a better solution.
If you can't see the bug or if you don't want to think much, then you can use a weight below 100%.