Starting from the same random seed

Started by ChicagoPianoTuner, April 23, 2015, 02:41:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ChicagoPianoTuner

Hi again!

I'm in the final stages of my timetable.  It currently has 800 activities and many constraints.  It is difficult for FET to always find a solution, even after running for many hours.  But what does work is for me to generate multiple timetables, allowing FET to attempt a solution for ~10 minutes.  Usually, there will be one solution in 10 attempts.  I have also allowed FET to attempt for 1 hour before moving on to the next, and I find that there are still only 1 in 10 successes.  Most successes happen in the first 3-6 minutes of attempts.  I have never had a generation that succeeded after, say, 40 minutes of attempts.

I don't know much about FET's algorithm, though I have read a bit.  My conclusion is that FET's success for complicated timetables like mine largely depends on the initial placing of activities.

I am still making some small changes to my timetable, but, if possible, it would be nice for FET to start with the same initial placement as that of a previously successful timetable.  I know that when a timetable is generated, I can see the initial seed in (x,y) format.  Is there any way for me to ask FET to start with that same initial seed in subsequent generations?

Thanks very much for your help, as always.

Liviu Lalescu

#1
Quote from: ChicagoPianoTuner on April 23, 2015, 02:41:23 PM
I don't know much about FET's algorithm, though I have read a bit.  My conclusion is that FET's success for complicated timetables like mine largely depends on the initial placing of activities.

I am still making some small changes to my timetable, but, if possible, it would be nice for FET to start with the same initial placement as that of a previously successful timetable.  I know that when a timetable is generated, I can see the initial seed in (x,y) format.  Is there any way for me to ask FET to start with that same initial seed in subsequent generations?

In short: you need to modify a bit the sources and recompile to ask FET to use the same random seed when beginning a new timetable. But this won't help at all.

Explanation: the initial order of placing the activities is the same if the .fet file is the same. Then the program will place activities semi-randomly, and probably for your case placing the first few ones will influence the feasibility of the final timetable (so, how the first x% will be placed -> on this depends if the timetable finishes in 10 minutes or does not finish in one hour). This is a behavior which I met for some very hard files.

Then, another aspect: If you use the same random seed for slightly different files, the behaviour will be very different. And I remember I tried for somebody doing what you suggest, semi-fixing the previous timetable, but it did not work.

ChicagoPianoTuner

Thanks for your reply.  So is my best bet just to keep going as I have been, asking FET to generate multiple timetables, if it succeeds, making one individual change, asking for another multiple generation, change, generation, etc.?  Or is there a better way?

Liviu Lalescu

I think this is the best way to go.

I did my best to avoid the need for restart, but it seems that in some situations it might be needed.

For the examples Romania/FS difficult and Namibia/Concordia, it may finish in under 3 minutes or in 5 hours. This is as a comparison.

PS: I added a paragraph in my previous answer.

ChicagoPianoTuner

Okay, thanks very much.  I'll keep working through it then. 

Another question: have you ever attempted to export FET data into NovaT6, the timetabling component of the school management software called SIMS?

Liviu Lalescu


Volker Dirr

Quote from: ChicagoPianoTuner on April 23, 2015, 02:41:23 PM
[...] It is difficult for FET to always find a solution, even after running for many hours.  But what does work is for me to generate multiple timetables, allowing FET to attempt a solution for ~10 minutes.  Usually, there will be one solution in 10 attempts.  I have also allowed FET to attempt for 1 hour before moving on to the next, and I find that there are still only 1 in 10 successes.  Most successes happen in the first 3-6 minutes of attempts.  I have never had a generation that succeeded after, say, 40 minutes of attempts.
[...]

Interesting behaviour. Can you sent me your sample set? Of course you can  rename teachers and/or stundets name to keep data privacy. We will publish the file only if you allow it explicit. I will keep it private if you don't allow to publish. You can sent me by private mail (this forum) or email (see: www.timetabling.de ). Please let me also know your CPU. (Because i maybe need to increase or decrease the time, because my CPU might be faster or slower.)
I guess there is a special activity in your sample. Can you also please check the fet -> timetable -> generate new -> View inital order of placing the activities. Please check that list. View the last activities (maybe the last 10%). And now think this: If you must do a timetable without softwafte, so you must schedule the whole timetable manualy. Is there an activity at the very end of the list which you might place much as one of the first activities, because it is got only a very low number of possible timeslots?