Mininimum gap and maximum gap between daily slot

Started by Narciso, November 26, 2016, 04:49:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Narciso

Hi,
i tried to compile fet in qt but i didnt solve it... now i'm trying to build some with LAzarus in delphi following your algoritm explnanation.

I can build now a timetable very fast but there are some problem about minimun and maximum gap between daily Teachers slot.

Timetable is build keeping  one lesson at time, so that lesson could be placed ( for example) on Monday or saturday or wensday and so on..

I cannot test each time if a teacher has too much slot without lesson (max gap) or too less (min gap) , because it is possible that next lesson could fill theese slot.

CAn you help me explaining what method is used by you to control min and max gap in a day and in a week?

Actually i'm thinking about move random slot after timetable solution is done:

while mingap<teacher.mingap and maxgap>teacher.maxgap
do begin
swap(t_1,t_1.compatible);
mingap:=countmingap;
maxgap:=countmaxgap;

  end;

what do you think about it?

Tank you for you time

Liviu Lalescu

FET should compile with Qt and C++, you can ask for more help.

I implemented only max gaps per week/day for students, not min. You can find them if you search for the string "teachersMaxGaps" in the file src/engine/generate.cpp (search until you reach the end of the file - many places).

About your correction of the timetable after generating, by swaps - I came to the conclusion that swapping at the end is unsuccessful. It is too difficult.