Custom FET for Moroccan schools

Started by Liviu Lalescu, September 17, 2008, 11:49:43 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Liviu Lalescu

This custom version was suggested by Chafik Graiguer. His words:

--------------------------------------
This FET version fulfills the following requirements:
1-Definition of a working school day:
A days is devided into two distincts periods:
- morning 08:00-12:00
- afternoon 14:00 - 18:00

- there is a lunch breack 12:00 - 14:00

2- studiying periods and gaps per day:
Students can have gaps around lunch breack, i.e before or after lunch break (official FET version cant tolerate this !!!)
-Students and teachers must have at least 2 hours per period ( empty periods are ok )
- Teachers can only have lesson either in morning or afternoon. never both

3- The key hint to use this version
We have 6  REAL day, with 6 working timeslots
We should input 6X2 = 12 days, with 4 working timeslots ONLY
--------------------------------------

Words of author:

Features are:

This is a school which has lessons morning and afternoon, and teachers cannot have lessons both in the afternoon and morning, and students and teachers must have at least 2 hours in morning or in the afternoon.

You should input in FET 2*n_real_days

Day 1 represents morning 1, day 2 represents afternoon 1, day 3 represents morning 2, etc.

Intelligent (flexible) students min hours daily, allowing 0 hours in a day.

Teachers cannot have hours in both days 2*n+1 and 2*n+2 (so they don't have in real life hours both in the morning and afternoon.

On 23 August 2009 I added new features:
1) there is a list of teachers who can have 1 day exception or 2 days. In these exceptions they may work morning+afternoon.
2) the constraints teacher(s) max hours daily considers real days (morning+afternoon). You can add max hours per day for exception days.
3) the constraints teacher(s) max days per week considers real days.

On 30 August 2009 I added a new feature:
students (set) max hours daily considers real days (morning+afternoon).

Also, constraints min days between activities consider real days (see in readme more details)

On 10 September 2009 I fixed an important generation bug, so please get latest version morocco6.

On 1 August 2011 I updated the custom version for Morocco to 5.14.5.

On 18 August 2011 I fixed a crash bug, as reported by Montasir here on the forum: http://lalescu.ro/liviu/fet/forum/index.php?topic=530.msg3125#msg3125, bug which was present also in fet-5_10_2-morocco6.

On 2 September, I corrected a very minor bug (unnoticeable).

On 4 June 2015 I updated to the latest FET, 5.27.2.

On 7 June 2015 I added a new different type of constraint: teacher(s) max mornings/afternoons per week. This is version 5.27.2-morocco2.

On 9 June 2015 I made constraint max days between activities to consider real days. This is version 5.27.3-morocco.

On 29 July 2015 I corrected a bug when modifying the days or hours. There is a new version, 5.27.3-Morocco6.

On 2 September 2017 I corrected a potential cycling problem, as in the official FET. Also the Arabic translation was improved, by Benahmed Abdelkrim.

On 3 October 2017 I corrected a bug as reported by Omar Ben Ali, here: http://lalescu.ro/liviu/fet/forum/index.php?topic=3492.0

On 2 August 2018 I corrected a rare crash bug if adding an activity without students sets, but with a specified number of students >= 1, a bug if moving up/down the rooms/buildings (their description in the details box on the right was not properly updated), and the Arabic translation was updated. All of these by Benahmed Abdelkrim.

The links are: (modified 6 June 2020 from FET-5.27.3, latest version is fet-5.27.3-morocco53)

https://lalescu.ro/liviu/fet/download/custom/morocco/

or, mirror:

https://www.timetabling.de/download/custom/morocco/

The above links include a Windows 7 or later 64-bit executable. If you need the 32-bit Windows 7 or later executable, get it from here: https://www.timetabling.de/download/32bit/

Chafik Graiguer

#1
Thanks you very much Liviu for this customised version
It helped me a lot to easily generate a working timetable wich fulfill about 98% of teacher's wishes !!

NB: I will post an arabic version of those features at arabic section

Liviu Lalescu

Hi!

I modified aissa and alfaromeo custom to make a warning if user splits activity into more than real days components (fet_days/2). Could you please test the new versions, so that I didn't accidentally mix them or some other error? Just generate for your sample with alfaromeo version and aissa with aissa version.  Also, test the new warning I modified.

Please let me know.

Chafik Graiguer

#3
Quote
Please let me know.
Thanks Liviu
Modified version works as expected !!!

If I split an activity into 8 subactivities for example, having a 6 working (REAL) days
then FT issues a warning messagebox

Here, I added a large activity splitted into  8 subactivities !!


the warning messagebox pops up:


Liviu Lalescu

Thank you very much for your report!

It is sometimes hard to work on more versions, I am very afraid not to modify the official version. I should learn some version control programs as many suggested, but it is difficult.

Chafik Graiguer

#5
Quote
It is sometimes hard to work on more versions, I am very afraid not to modify the official version.
that is why I tried to tweak Standart FET version rather than rely on custom version
If there is only one devellopement branch, then it will much easier for programmers (mainly Liviu !!) to update,
and all users will equally benefit from any update or new features

I tried to translate into arabic the new warning in messagebox
you can submit it to Silver before including into arabic lanquge pack/file

NB: Arabic is right justified
Quote
انتبه ! إنك تحاول الآن أن تضيف مهمة مقسمة إلى عدد من الحصص أكبر من عدد أيام الدراسة في الأسبوع
كما أنك تحاول أن تضع تقييدا زمنيا هو "الحد الأدنى من الأيام الفاصلة بين حصتين/مهمتين". وهذا من شأنه أن يبطء البرنامج ويمنعه من إيجاد الحل.
يفضل أن تقوم بأحد الأمرين التاليين:
1- إذا كنت ستضيف تقييد"إذا كانت الحصص في نفس اليوم فالتتابع إجباري"،إذن عليك أن تقوم بتجميع بعض الحصص إلى بعضها لتحصل على عدد حصص مساو لعدد ايام الدراسة. مثال: علينا أن نبرمج 7 حصص طولها 1ساعة في خمس أيام. إذن قم بتحويلها إلى مهمة واحدة حاوية لخمس حصص هكذا: 2,2,1,1,1 (يمكنك ان  ترفع نسبة أهمية الحد الأدنى من الأيام الفاصلة بين حصتين/مهمتين إلى 100% )
2- إذا لم ترغب بتطبيق تقييد "إذا كانت الحصص في نفس اليوم فالتتابع إجباري"، إذن يفضل أن تدخل مهمة/حاوية كبيرة مقسمة إلى عدد من الحصص مساو لعدد أيام الدراسة الأسبوعية. ثم مهمة/حاوية أخرى تضم ماتبقى من حصص. مثال: علينا أن نبرمج 7 حصص طولها 1 في خمس أيام. نضيف مهمة/حاوية كبيرة مجزأة إلأى 5 حصص طول كل منها ساعة. ثم مهمة/حاوية ثانية مجزأة إلى 2 حصص بطول ساعة لكل واحدة (يمكنك ان  ترفع نسبة أهمية الحد الأدنى من الأيام الفاصلة بين حصتين/مهمتين إلى 100% )

Liviu Lalescu

Thank you, but:

I cannot incorporate unfortunately the Moroccan features that you need in the official FET. Adaptable min hours daily for students cannot be implemented, because of some reasons I explained you. Also, the teachers have hours morning or afternoon also cannot be made.

Also, with the translation, I don't want Silver to mix the versions of translations. That would be a very nasty thing.

I don't know how to manage for the moment different branches. I think I cannot manage to keep up with releasing more versions and update each of them.

Maybe in the future you would like to become the person in charge with the Moroccan (maybe Algerian) versions. You could modify translation of these versions using Qt Linguist, like Silver. Also, you will need to learn how to make a release. The main work must be done from GNU/Linux, so as to keep the files permissions correct. Then you make a tar.bz2 package, compile for Windows and release somewhere these files.

If you can do this work, I will put links to your versions (as unofficial). But you have not an easy task :-)

I really ran out of ideas. It is a very difficult problem.

You can update the fet_ar.ts file in src/interface/ type "lupdate interface.pro". You can modify the fet_ar.ts file with Linguist from Qt - trolltech.com. Then enter src/interface/ and type "lrelease interface.pro".

We'll talk about this some more.

Chafik Graiguer

#7
Quote

If you can do this work, I will put links to your versions (as unofficial). But you have not an easy task :-)

.

Thanks Liviu
I will do my best to learn things
maybe I should read some C++ books for newbies !! just to be able to read source code...   :)

Chafik Graiguer

#8
How to deal with the following situation:
say a part time teacher has only 5 working hours per week at our school
He would like to drive only once to school
So he wishes this 5 hours to be schedulled at ONE real day. say:
3 at morning and
2 at afternoon
Now the customised version doesnot allow lessons for teachers  on two consecutives FET_days !!

Liviu Lalescu

#9
QuoteHow to deal with the following situation:
say a part time teacher has only 5 working hours per week at our school
He would like to drive only once to school
So he wishes this 5 hours to be schedulled at ONE real day. say:
3 at morning and
2 at afternoon
Now the customised version doesnot allow lessons for teachers  on two consecutives FET_days !!

Then we need to customize it further. It can be done, I assume these conditions: some teachers are part time and they can only work a real day per week (for 2 or more, the things start to become complicated). I think the easiest would be to denote somehow these teachers, like for teacher John: "PART_TIME John", so each teacher that starts with PART_TIME works only one day per week. The rest of teachers work only morning or afternoon, but not both. The code is simple to modify. The best way would be to add some new constraints, like "Part time teacher" and "Teacher works only in day 2*n-1 or exclusively in day 2*n", but to add a new constraint is a tedious job and I hate it :-)  I only like to implement the algorithm behind it.

I could give you the code to add part time teachers the easy way ("PART_TIME"....), if you want it. Just let me know.

PS: If you think that the above constraints can be added into official FET, you are right. But their name sounds so weird, and it remains one crucial problem: I cannot add adaptive students min hours daily.

Chafik Graiguer

A workaround would be:
say teacher T1 wants his 5 hours per week to be schedulled into one real day: 3 on morning + 2 on afternoon
then:
assing 3 hours/activities to T1 :  A1, A2, A3
Assign the remaining 2 hours A4, A5 to a dummy teacher T01
- set  constraint "set of hours/activities has same starting days" for A1,..., A5
- set activties not overlapping

is that corrcet ?   :)
si it the easy way to deal with such situation ?

Liviu Lalescu

QuoteA workaround would be:
say teacher T1 wants his 5 hours per week to be schedulled into one real day: 3 on morning + 2 on afternoon
then:
assing 3 hours/activities to T1 :  A1, A2, A3
Assign the remaining 2 hours A4, A5 to a dummy teacher T01
- set  constraint "set of hours/activities has same starting days" for A1,..., A5
- set activties not overlapping

is that corrcet ?   :)
si it the easy way to deal with such situation ?

You are very good at FET tricks :-)  You beat me on this, I also thought about some dummy activities, but could not think of such a solution.

One drawback you have, though: you need to decide which activities are in the morning and this will rule out some good timetables but which have say activities A1, A3 and A5 in the morning. But probably you can find a solution with your trick.

Chafik Graiguer

Quote
One drawback you have, though: you need to decide which activities are in the morning
it is unimportant to have 2 hours/morning+3hours/afternoon
or:
3 hours/morning + 2 hours /afternoon

We ONLY want to ensure  that 5 hours are putted into the same day

Liviu Lalescu

Quote
Quote
One drawback you have, though: you need to decide which activities are in the morning
it is unimportant to have 2 hours/morning+3hours/afternoon
or:
3 hours/morning + 2 hours /afternoon

We ONLY want to ensure  that 5 hours are putted into the same day

Suppose you have 5 activities: A1, A2, A3, A4, A5. Then decide that A1, A2 and A3 go to teacher T1 and A4 and A5 go to teacher TDummy. Then you rule out correct solutions like: A1, A3 and A4 morning, and A2 and A5 afternoon, because only A1, A2 and A3 can be together in the morning or afternoon.

Chafik Graiguer

#14
Yes
you are right
But,  decision will be less difficult to make  when all or some activities have duration 2   :)