FET generation algorithm - "recursive swapping"

Started by Liviu Lalescu, April 21, 2011, 11:12:35 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Liviu Lalescu

In (2 d) we place A_p, A_q and A_r in turn, one at a time, recursively, at level+1 (if A_i is at level+0).

In (2 g), we are at level=0. Place A_i, and we have to place A_p, A_q and A_r at level=0, in turn, in step (2) (in order, one at a time).

Parenthesis:

In step (2), level=0.

I hope I am not mistaking.

hitesh

But again. In 2(g). -> A_p or A_q or A_r itself can go to further recursion if there are conflicts in every slot?

//some_code_earlier
Foreach(conflicts to A_i)
{
           while(level!=0)
           {
                   return;
            }
            if(level==0)
            {
                      function(conflict,level);
             }
}
Are you saying something like this?

Liviu Lalescu

Quote from: hitesh on January 08, 2015, 07:38:54 PM
But again. In 2(g). -> A_p or A_q or A_r itself can go to further recursion if there are conflicts in every slot?


in (2 g) we unallocate A_p, A_q and A_r. It is now possible to place A_i. level=0. Start with level=0 and place recursively A_p. Then start with level=0 and place A_q, then A_r also recursively at level 0.

Quote

//some_code_earlier
Foreach(conflicts to A_i)
{
           while(level!=0)
           {
                   return;
            }
            if(level==0)
            {
                      function(conflict,level);
             }
}
Are you saying something like this?

Sorry, I don't understand.

hitesh

Okay. And in 2(d) we were calling A_p,A_q and A_r at Level+1. Difference is in the levels only? Right?

Liviu Lalescu

Quote from: hitesh on January 08, 2015, 07:53:42 PM
Okay. And in 2(d) we were calling A_p,A_q and A_r at Level+1. Difference is in the levels only? Right?

I think yes.

hitesh


Liviu Lalescu

You're welcome!  :)  I advise you to take a look at the function generate.cpp randomSwap(...), its beginning and its end.

hitesh

Hii..liviu!
Can you help in knowing that is it possible to create n different timetables from this algorithm?

Liviu Lalescu

Start n generations with different random seeds. If you have multiple cores, you can even put a single timetable on a single core.

hitesh

What is the interpretation of random seeds?  Thanks.

Liviu Lalescu

XX and YY in timetable_defs.cpp. Read also the FET Settings Random seed dialog Help button.

Winnie

Quote from: Liviu Lalescu on January 08, 2015, 07:55:54 PM
Quote from: hitesh on January 08, 2015, 07:53:42 PM
Okay. And in 2(d) we were calling A_p,A_q and A_r at Level+1. Difference is in the levels only? Right?

I think yes.

Hi Liviu, I'm a bit confused about the difference between (2 d) and (2 g)?
What are the levels being referred to here?. Thank you

Liviu Lalescu

Quote from: Winnie on February 27, 2015, 01:41:06 PM
Quote from: Liviu Lalescu on January 08, 2015, 07:55:54 PM
Quote from: hitesh on January 08, 2015, 07:53:42 PM
Okay. And in 2(d) we were calling A_p,A_q and A_r at Level+1. Difference is in the levels only? Right?

I think yes.

Hi Liviu, I'm a bit confused about the difference between (2 d) and (2 g)?
What are the levels being referred to here?. Thank you

I don't know how to explain this better.

At level (2 d) the level of recursion is between 0 and 13. At level (2 g) if the level is 0 we do our displacements and placement.

Winnie

Thanks for you reply. Quick question though, When does an activity(which from the manual is a lecturer+student group+subject) conflict with other activities, is it when they all have the same particular time-slot as the preferred one?

Liviu Lalescu

Quote from: Winnie on March 02, 2015, 08:03:55 PM
Thanks for you reply. Quick question though, When does an activity(which from the manual is a lecturer+student group+subject) conflict with other activities, is it when they all have the same particular time-slot as the preferred one?

An activity is incompatible with another one if they have common teachers or subgroups. If two activities overlap in time (they occupy at least a common time slots), we have a basic conflict.