Author Topic: Custom FET for Moroccan schools  (Read 56276 times)

0 Members and 1 Guest are viewing this topic.

Liviu Lalescu

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 5008
  • FET author and forum moderator
    • View Profile
    • Homepage
Custom FET for Moroccan schools
« on: September 17, 2008, 04:49:43 AM »
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.

The links are: (modified 27 April 2017 from FET-5.27.3, latest version is fet-5.27.3-morocco29)

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

or, mirror:

http://timetabling.de/download/custom/morocco/
« Last Edit: April 27, 2017, 12:29:24 PM by Liviu Lalescu »

Chafik Graiguer

  • Level 4
  • ****
  • Posts: 499
  • Former Alfaromeo
    • View Profile
Re: Custom version for alfaromeo (Morocco school)
« Reply #1 on: September 17, 2008, 05:46:28 AM »
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
« Last Edit: September 17, 2008, 08:20:35 AM by alfaromeo »

Liviu Lalescu

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 5008
  • FET author and forum moderator
    • View Profile
    • Homepage
Re: Custom FET for alfaromeo (Moroccan schools)
« Reply #2 on: September 22, 2008, 06:39:52 AM »
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

  • Level 4
  • ****
  • Posts: 499
  • Former Alfaromeo
    • View Profile
Re: Custom FET for alfaromeo (Moroccan schools)
« Reply #3 on: September 22, 2008, 09:19:59 AM »
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:

« Last Edit: September 22, 2008, 09:22:25 AM by alfaromeo »

Liviu Lalescu

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 5008
  • FET author and forum moderator
    • View Profile
    • Homepage
Re: Custom FET for alfaromeo (Moroccan schools)
« Reply #4 on: September 22, 2008, 09:36:34 AM »
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

  • Level 4
  • ****
  • Posts: 499
  • Former Alfaromeo
    • View Profile
Re: Custom FET for alfaromeo (Moroccan schools)
« Reply #5 on: September 22, 2008, 10:52:31 AM »
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% )
« Last Edit: September 22, 2008, 10:54:28 AM by alfaromeo »

Liviu Lalescu

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 5008
  • FET author and forum moderator
    • View Profile
    • Homepage
Re: Custom FET for alfaromeo (Moroccan schools)
« Reply #6 on: September 22, 2008, 11:15:49 AM »
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

  • Level 4
  • ****
  • Posts: 499
  • Former Alfaromeo
    • View Profile
Re: Custom FET for alfaromeo (Moroccan schools)
« Reply #7 on: September 22, 2008, 01:54:10 PM »
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...   :)
« Last Edit: September 22, 2008, 01:54:27 PM by alfaromeo »

Chafik Graiguer

  • Level 4
  • ****
  • Posts: 499
  • Former Alfaromeo
    • View Profile
Re: Custom FET for alfaromeo (Moroccan schools)
« Reply #8 on: September 23, 2008, 07:13:43 AM »
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 !!
« Last Edit: September 23, 2008, 07:21:38 AM by alfaromeo »

Liviu Lalescu

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 5008
  • FET author and forum moderator
    • View Profile
    • Homepage
Re: Custom FET for alfaromeo (Moroccan schools)
« Reply #9 on: September 23, 2008, 08:13:00 AM »
Quote
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 !!

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.
« Last Edit: September 23, 2008, 08:15:29 AM by admin »

Chafik Graiguer

  • Level 4
  • ****
  • Posts: 499
  • Former Alfaromeo
    • View Profile
Re: Custom FET for alfaromeo (Moroccan schools)
« Reply #10 on: September 23, 2008, 08:34:47 AM »
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

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 5008
  • FET author and forum moderator
    • View Profile
    • Homepage
Re: Custom FET for alfaromeo (Moroccan schools)
« Reply #11 on: September 23, 2008, 08:41:43 AM »
Quote
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 ?

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

  • Level 4
  • ****
  • Posts: 499
  • Former Alfaromeo
    • View Profile
Re: Custom FET for alfaromeo (Moroccan schools)
« Reply #12 on: September 23, 2008, 08:48:08 AM »
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

  • Forum Administrator
  • Level 5
  • *****
  • Posts: 5008
  • FET author and forum moderator
    • View Profile
    • Homepage
Re: Custom FET for alfaromeo (Moroccan schools)
« Reply #13 on: September 23, 2008, 08:52:21 AM »
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

  • Level 4
  • ****
  • Posts: 499
  • Former Alfaromeo
    • View Profile
Re: Custom FET for alfaromeo (Moroccan schools)
« Reply #14 on: September 23, 2008, 10:58:23 AM »
Yes
you are right
But,  decision will be less difficult to make  when all or some activities have duration 2   :)
« Last Edit: September 23, 2008, 10:59:04 AM by alfaromeo »