Understanding the FET generating algorithm

Started by thanhnambkhn, November 09, 2016, 10:11:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

thanhnambkhn

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?

Liviu Lalescu

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.

thanhnambkhn

Thank Luviu for your help,
I'm so glad to hear from you.