FET Forum

FET Support (English) => Get Help => Topic started by: thanhnambkhn on November 09, 2016, 10:11:52 AM

Title: Understanding the FET generating algorithm
Post by: thanhnambkhn on November 09, 2016, 10:11:52 AM
Dear Liviu,

I have read http://lalescu.ro/liviu/fet/doc/en/generation-algorithm-description.html. It is not easy to imagine how it works in real.
So I am trying to understand FET algorithm by reading source code.
Please help me, where can I start from FET source code?
Title: Re: Understanding the FET generating algorithm
Post by: Liviu Lalescu on November 09, 2016, 10:37:55 AM
In generate_pre.cpp, it is computed the initial order. This is not difficult.

In generate.cpp, the important functions are

- generate(...) - this contains the initialization, updates of structures, and the main call of function randomSwap.

- moveActivity(...) - this updates structures as the activity is moved from one slot to another.

- randomSwap(...) - tries to place activity ai, recursively. There are many repetitive, similar sequences of code for different constraints - you can ignore them and see the beginning and the end of this function, which are most important.
Title: Re: Understanding the FET generating algorithm
Post by: thanhnambkhn on November 10, 2016, 02:00:31 AM
Thank Luviu for your help,
I'm so glad to hear from you.