Weights of constraints and relative priorities

Started by maxi_mus, January 19, 2024, 03:53:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Liviu Lalescu

You are welcome! Please let me know if you tested and works as expected. I intend to release the final version in about a week, so please let me know.

Volker Dirr

Quote from: maxi_mus on January 31, 2024, 11:32:09 AM[...] Concrete example: I'd like most of Math, German and French lessons to be in the afternoon. [...] I would spend ages adding and removing single activities/constraints with 100% weight. At some point, the time and effort would become so big that there would be no advantage over planning the whole schedule manually.

Well, you probably need ages for this, since you don't know how to do it. I don't need to add/remove every single constraint for this.
I do it similar and for example with my dataset I only need to add 2 single constraints to care about 50% of all German, Mathe and English lessons. The trick is using subactivity constraints :-)
Depending on your dataset you might need between 2 or 12 constraints only to care about ALL that activities. (In my dataset i need to add 12 for all, and my data set has ~1000 hours in total.)

Similar to your other examples. It it can be very easy to care about 100% always just with a few constraints if you know how to do it. It also helps finding bugs and understanding the timetable. 

Volker Dirr

Quote from: maxi_mus on January 31, 2024, 11:32:09 AMI'm not sure I follow you here. The advantage is, that people can go home and shower.

What I am doing is taking real life examples and trying to see if I can implement everything in FET. So all my requirements are real requirements by real teachers in real schools. I am extremely grateful to Liviu for helping me out with tricks and even changing FET to meet my needs. Conversely, I hope that my input has some limited value to you, to show you where FET's features still have limitations that would be needed in real life situations.

I am not a coder in my professional life (even i can code). I am a teacher in professional life. So i am talking about real data sets at my school(s).

Exactly. I understand the shower argument. That is one advantage if you don't have showers in your gym. Or if pupils don't want to use the shower in the gym. Depending on your school the older pupils don't have got a problem with using the shower at school and they will use it and so there is no problem for them.
But there are also many disadvantages like i wrote. There is no "correct" answer for stuff like that. EVERY activity and EVERY constraints has always advantages and disadvantages. You should always think about every advantages and disadvantage. You should always think out of 3 perspectives: The students perspective, the teachers perspective and the schools perspective. In many cases an advantage for one guy, will be an disadvantage for an other guy. So with every constraint and every activity that you add, you should understand why you are doing it. What the disadvantages and what the advantages are.
I always do that if you make timetables. And if you do that it has of course a small disadvantage, since i need to think bit more. But the advantage is, that i understand my timetable better. I can find bugs faster by that, i have less unhappy guys with the timetable and i can explain the very rare unhappy guys why i was forced to give them a "bad" timetable. Why their missing advantage is an advantage for a lot of other guys.

maxi_mus

Thanks for the explanation. I'm very aware that every constraint has disadvantages, although I would word that a bit differently - every constrain limits the possibilities for other all other (possible or desired) constraints.

Just a little info on my background, I helped clients set up a tool that does automatic shift planning for a number of years. Setting up hard and soft constraints and prioritizing them was my daily business.

To understand your 'strategy' of how to only use hard constraints, I would probably have to see you work with FET and be able to ask you a bunch of questions, but I don't want to take up any more of your time. But I'm assuming there is good reason why FET also has the possibilities to set soft constraints, and I'd rather work with it using them, at least for the time being ;-)

Volker Dirr

Yes. The less then 100% time constraint has the advantage that you can try to care about constraints if you don't understand why the fail with 100%. In the final stage a timetable might be so difficult to understand, that you might not understand it.
So if it is "the last" constraint, then it is of course ok if you use them to optimize your timetable some more.
But i saw a lot of guys that do more or less use only constraint with less then 100% and then they wonder that sometimes generating is very slow and they don't understand what they are doing.
Less then 100% is fine, if it is the last constraint. I highly always suggest to use 100% to all other constraints.

Liviu Lalescu

Quote from: Liviu Lalescu on January 31, 2024, 12:03:51 PMYou are welcome! Please let me know if you tested and works as expected. I intend to release the final version in about a week, so please let me know.

@maxi_mus , did you see this post? I would really like to hear/confirm your feed-back.

maxi_mus

Yes, I saw it. The problem is, I don't work on Windows normally, so I have to get a machine running first. I hope to have time for this this afternoon, otherwise Friday at the latest.

Volker Dirr

I think me must research in that some more then only with a single data set. We should at least check 2 types of data sets. Data sets with fully loaded students timetable and data sets with not fully loaded students timetable.

Liviu Lalescu

Quote from: maxi_mus on January 31, 2024, 01:50:17 PMYes, I saw it. The problem is, I don't work on Windows normally, so I have to get a machine running first. I hope to have time for this this afternoon, otherwise Friday at the latest.

Thank you, sorry!

maxi_mus

No, it's for me to say sorry, you have helped me so much, I want to help you in return.

Liviu Lalescu

Quote from: Volker Dirr on January 31, 2024, 01:51:56 PMI think me must research in that some more then only with a single data set. We should at least check 2 types of data sets. Data sets with fully loaded students timetable and data sets with not fully loaded students timetable.

I checked with Romania/Pedagogic and with German sample, and seemed perfect. Please check also yourself with other easy files.

maxi_mus


Liviu Lalescu

Quote from: maxi_mus on January 31, 2024, 02:02:55 PMMy Windows version is too old :-/

I was just on the point of compiling a new snapshot, with minor changes. If you can test, I will compile also a snapshot for Windows 7 and 8.1. Do you need 64bit or 32bit?


Liviu Lalescu

OK, I'll put this soon. I need maybe less than an hour (tar.bz2, Win 10 64bit, and Win 7 32bit).