Performance help

Started by Crizalid, September 29, 2023, 06:24:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Crizalid

Hey everyone.
Can you please tell me if there is a difference about performance!
I have tried to generate a timetable from the giving examples in the latest version 6.9.6 on my pc i5 2nd generation vs a google colab python virtual machine and it took the same time to generate.

Example used: examples/FET-6-mornings-afternoons/Algeria/4-max-three-consecutive-days/benahmed_5_bis_2-M3_data...fet

Software:
on google colab: Fet-cl
On local machine: fet gui

I hope I presented enough information about the test I've done.

Thanks for everything in advance
Cheers ❤️

Liviu Lalescu

Hello, Crizalid,

You should measure performance on difficult files, which take at least 1 minute to solve. You are trying also on a locked file, which solves instantly.

You should take the other file in this directory (without data_and_timetable at the end). Or another file. Then, ensure that you generate single on the GUI with a chosen constant initial random seed (say 1,0,0, 1,0,0) and the same starting random seed on the CL (see the usage on how to specify the random seed at command-line). Generate on the 2 comparing environments, then check that the random seed at the end is also equal between them, in parallel, and then you have a good measure.

Crizalid

Thank you sir Liviu for the response.
I've checked Mr. Volker Dirr videos on YouTube (big thanks to him), I understood few things.

So better performance gives shorter time generation or is there any other tricks?

Thanks again

Liviu Lalescu

You are welcome! Please call me Liviu :)

Better computer means faster generation, of course, but to compare you need to start (and end) with the same random seed, which ensures the same computations. Otherwise, the process depends also on luck, it might take 1 minute or 15 minutes (or other values).

Maybe other tricks are possible, depending on the file, so to take care of the constraints in a better way.

Crizalid

Ok I've got, The attached file image is for a fet file which generated successfully on my local machine after about 23 hours, as you can see it took 1 h 1 m 27 s to generate 536 activity from 573.
It didn't reach any more activities for almost 5 hours!
As fet-cl user what is the best option to check if I'm facing an impossible file to generate?


Liviu Lalescu

Unfortunately, other than those 4 log files, there is no 100% safe way to say "This file is impossible". The timetabling problem is very difficult, exponential.

You might want to check the highest-stage timetable. This unfortunately involves terminating the generation with SIGTERM. From the GUI, you can write the highest-stage timetable without terminating the generation. You can then look in the timetables, considering the unplaced activity (in your case, the 537-th activity in the initial order), and think of the problem. Check that activity's teacher and students set timetables.

If you have more cores, you can start more fet-cl instances, one for each core (careful, leave some time between starting them, at least 2 seconds, so that the random seeds are different). This can be done easier in the GUI, generate multiple on multi threads. If all/nearly all processes come to the same max placed activity and stay there, it is a clue that it might be impossible.

Also, sometimes restarting automatically or manually might be good.

Crizalid

Thanks again for your kind response.
It was very helpful 🧡

Liviu Lalescu

You are welcome!

If you want, you can tell me more about the usage you are doing. It seems you are an advanced user of FET?

Volker Dirr

I will do a video about the restart feature in a few days.

Volker Dirr

I uploaded the video about time limits.
It is only with "moderate difficult timetables". I will maybe to one with very difficult timetables later (sadly it need a lot of time to do that).

https://youtu.be/rl5N_ZyBB6A