FET Forum

FET Support (English) => Get Help => Topic started by: bachiri401 on January 26, 2018, 05:19:28 PM

Title: Math not to come after Sport in FET Algeria version
Post by: bachiri401 on January 26, 2018, 05:19:28 PM
THANK YOU SIR FOR EVERYTHI?G YOU ARE DOING TO HELP US BUT I HAVE A QUESTION HOW CAN WE do this time constraint or it doesnt exist on the programme fet (activities must not come after an activity) for example we do not want to have a math class after sports and thank you very much
Title: Re: Math not to come after Sport
Post by: Liviu Lalescu on January 26, 2018, 06:57:54 PM
Hmm, I wonder why other users did not ask this until now.

If you mean Sport to be after Math in the week, you can use the constraint two activities ordered.

But if you mean Math should not be after Sport on each day, but Math can be on say Wednesday and Sport on Monday, then I think FET does not provide a necessary constraint (as far as I remember). In this case, we need to either think of some tricks or maybe to create a new FET constraint (but I don't know if or when I'll be able to do it).

Are you using FET Algeria with mornings and afternoons? The constraint should respect the week (first variant), the day (second variant) or the morning or afternoon (third variant)?
Title: Re: Math not to come after Sport
Post by: yahi on January 26, 2018, 07:02:18 PM
as an Algerian user of  fet -algeria  , i think my colleagues wants  to say that we can't  have  maths  after  sport  as pupils  may be  tired  and  embarassed with  sweat so they can't concentrate ........ may be this is  what he meant
Title: Re: Math not to come after Sport in FET Algeria version
Post by: Liviu Lalescu on January 26, 2018, 07:15:00 PM
Yes, this is what I thought, too.

A trick in the scenario Math cannot be immediately after Sport: increase the number of hours per day in FET to nh+1. Add a dummy activity (no teacher, no students, duration 1), add a constraint two activities consecutive so that dummy follows Sport. Then, add a constraint activities not overlapping, the dummy and the Math activities.

Edited to add: add constraints activities preferred time slots so that real activities cannot be in the last hour (which is nh+1 -> the fake one).
Title: Re: Math not to come after Sport in FET Algeria version
Post by: Vangelis Karafillidis on January 26, 2018, 07:48:30 PM
I've never used the Algeria version, but the solution which works with the official FET version might work with the Algeria version as well. So, for the official FET version:

If you have 1 activity per week for both activities (math and sports):
1) Create a dummy activity, no teacher, no students set, duration = 1.
2) Select the constraint "Two activities are consecutive". Import the sports activity (as first activity) and dummy activity (as second activity). This means that the dummy activity is going to be placed directly after the sports activity.
3) Select the constraint "A set of activities are not overlapping". Import the dummy activity and the maths activity. This means that the maths activity is never going to overlap with the dummy activity, which is definitely placed directly after the sports activity.
So, math is never going to be placed directly after sports.
PLEASE BE CAREFUL TO SELECT THE MATH ACTIVITY AND THE SPORTS ACTIVITY FOR THE SAME STUDENT SET. ALSO, please be careful to create a different dummy activity for each student set which needs to have no maths activity after sports.
The above steps should be repeated for each student set.

If you have n-activities per week for sports and m-activities for maths:
1) Create n dummy activities, no teacher, no students set, duration = 1.
2) Select the constraint "Two activities are ordered". Import the 1st sports subactivity (as first activity) and 1st dummy activity (as second activity). Then, import the next sports subactivity (as first activity) and the next dummy activity (as second activity). Repeat this step until all sports subactivities (along with their corresponding dummy activities) are imported.
3) Select the constraint "A set of activities are not overlapping". Select all the dummy activities along with all the maths activities. This means that no maths subactivity is going to overlap with any of the dummy activities. So, maths is never going to be placed directly after sports.
PLEASE BE CAREFUL TO SELECT THE MATHS ACTIVITIES AND THE SPORTS ACTIVITIES FOR THE SAME STUDENT SET. AND YOU SHOULD CREATE DIFFERENT DUMMY ACTIVITIES FOR EACH STUDENTS SET WHICH NEEDS TO HAVE NO MATHS ACTIVITY AFTER SPORTS!
Of course, you should repeat the above steps for each students set.

I don't know if this solves your problem...
Title: Re: Math not to come after Sport in FET Algeria version
Post by: Vangelis Karafillidis on January 26, 2018, 07:54:09 PM
Oh! Actually I gave the same answer with Liviu! :D
Liviu is right! You should also add one more hour per day. My solution is inferior to Liviu's since with my solution sports can't be placed at the end of the day... With Liviu's solution, sports can be placed at the real last hour of the day, and this is the reason that an extra hour per day is needed for FET.
Title: Re: Math not to come after Sport in FET Algeria version
Post by: Liviu Lalescu on January 26, 2018, 08:13:42 PM
I modified my post, Vangelis's post reminded me something (to disallow real activities in the last (fake) hour).

This matter was discussed in another thread and I just remembered the tricks we devised then :)
Title: Re: Math not to come after Sport in FET Algeria version
Post by: Benahmed Abdelkrim on January 27, 2018, 08:24:37 AM
Quote from: Liviu Lalescu on January 26, 2018, 07:15:00 PM
Yes, this is what I thought, too.

A trick in the scenario Math cannot be immediately after Sport: increase the number of hours per day in FET to nh+1. Add a dummy activity (no teacher, no students, duration 1), add a constraint two activities consecutive so that dummy follows Sport. Then, add a constraint activities not overlapping, the dummy and the Math activities.

Edited to add: add constraints activities preferred time slots so that real activities cannot be in the last hour (which is nh+1 -> the fake one).

I think the solution suggested by liviu can be formulated in a simpler way by using the constraint: an activity ends the day of a set of students(all students).
personally I use this constraint for all students.
Title: Re: Math not to come after Sport in FET Algeria version
Post by: Volker Dirr on January 27, 2018, 10:04:10 AM
No. Livius suggestion is different. With his suggestion sports can be at any hour; from the first up to the last! Also Math can be at any hour; from the first up to the last. That is why the last new pseudo hour is highly needed!

If you say "activity ends the day", than you have of course never math after sports, BUT you will normaly have not enough rooms! It's impossible to place sport of all classes at the end of the day. You might even get a teachers problem if you have a very low number of sports teachers.
Title: Re: Math not to come after Sport in FET Algeria version
Post by: Volker Dirr on January 27, 2018, 10:12:27 AM
I understand the idea of the constraint "math not after sports" (since i am math teacher myself).
If you have an easy timetable you can try that suggestion of course.
But my timetable is too difficult even without that. In my opinion there are other much more important constraints.
Also, if i think closer about that request: what's about the native and foreign language (Also a "main" subjects).
What about doing athletics sports and after that the students should do music (sing softly, play instruments, ...) Also difficult.
What about doing athletics sports and after that the students should mix chemicals. Maybe that is even dangerous?
What about doing athletics sports and after that the students have art (paint or sew; so must place a thin thread trough needle eye, ...). Also problematic.
...
But like i wrote in my previous mail: Sport can't be always the last hour. Impossible.
Title: Re: Math not to come after Sport in FET Algeria version
Post by: Benahmed Abdelkrim on January 27, 2018, 12:01:26 PM
Quote from: Volker Dirr on January 27, 2018, 10:12:27 AM
...
But like i wrote in my previous mail: Sport can be always the last hour. Impossible.

you can see the schedules I produced with this constraint; sport finished the student day.
I did not find any problem.
the schedules were solvent.
hmm ... I understand now, the difference between you and me is the version used.

the custom version makes this constraint possible, as we can do sports in the morning or afternoon, ie 2 possibilities per real day. the official version only allows once a day.
Title: Re: Math not to come after Sport in FET Algeria version
Post by: Liviu Lalescu on January 27, 2018, 12:15:38 PM
Quote from: Benahmed Abdelkrim on January 27, 2018, 12:01:26 PM
Quote from: Volker Dirr on January 27, 2018, 10:12:27 AM
...
But like i wrote in my previous mail: Sport can be always the last hour. Impossible.

you can see the schedules I produced with this constraint; sport finished the student day.
I did not find any problem.
the schedules were solvent.
hmm ... I understand now, the difference between you and me is the version used.

the custom version makes this constraint possible, as we can do sports in the morning or afternoon, ie 2 possibilities per real day. the official version only allows once a day.

You are right in your way, Benahmed, if using FET-Algeria the constraint "ends students' day" is easier to respect than in the official FET. And this manner of solving the problem is much easier than our devised trick.
Title: Re: Math not to come after Sport in FET Algeria version
Post by: Volker Dirr on January 27, 2018, 12:37:47 PM
yes. Every guy need to calculate it hisself. Luckily it is easy.

At my school students have got 3 hours sport. split into 2+1.
So each class need 2 times "end day".
i have got 6*4=24 classes.
so i need 2*24=48 "end day".

i have got 3 gyms and 5 days. So only 3*5=15 "end days".
even if i use a custom version with morning and afternoon i will have only 2*15=30 hours.
so even with that it will be impossible at my school, since 30<<48.

of course if you have got a school with less sport and/or more gyms it might be possible.
Title: Re: Math not to come after Sport in FET Algeria version
Post by: bachiri401 on January 27, 2018, 03:40:01 PM
THANK YOU BUT THE PROBLEM WHEN YOU HAVE 30 CLASSES EACH CLASS HAS 2 COSECUTIVE HOURS OF SPORT  AND ONLY 2 STADUIMS
YOU HAVE TO START SPORT FOR SOME CLASSES AT THE FIRST HOUR OF THE MORNING AND AFTER SPORT YOU WILL HAVE AT LEAST ONE SESSION WHICH MUST NOT BE MATH BECAUSE PUPILS WILL BE TIRED
Title: Re: Math not to come after Sport in FET Algeria version
Post by: Liviu Lalescu on January 27, 2018, 03:46:50 PM
Then maybe use the complicated trick.
Title: Re: Math not to come after Sport in FET Algeria version
Post by: Benahmed Abdelkrim on January 27, 2018, 05:38:23 PM
Other solution:

maybe you can use the constraint: min gap between a set of activities, with a tag for sports and maths.
Title: Re: Math not to come after Sport in FET Algeria version
Post by: Liviu Lalescu on January 27, 2018, 05:39:38 PM
Quote from: Benahmed Abdelkrim on January 27, 2018, 05:38:23 PM
Other solution:

maybe you can use the constraint: min gap between a set of activities, with a tag for sports and maths.

No, because Math then immediately after it Sports should be allowed, but your solution denies this.
Title: Re: Math not to come after Sport in FET Algeria version
Post by: Benahmed Abdelkrim on January 27, 2018, 06:02:05 PM
Yes you are right. Sorry!
Title: Re: Math not to come after Sport in FET Algeria version
Post by: yahi on January 27, 2018, 06:26:41 PM
i would like to add  my humble contribution to  explain how  i fixed the probleme of  sport ..it is known that in algerian schools  sports is  two  hours either in the  last two  hours of the  morning  or the last two hours  of the  evening thus  i tried  the  constraint " preferred starting times":and  actually i  submitted  the  starting  times according to eqch stream and  level and  actually  it was  a success .
Title: Re: Math not to come after Sport in FET Algeria version
Post by: Volker Dirr on January 27, 2018, 09:27:45 PM
That hint won't help the topic starter. He has got 30 classes and only 2 gyms.
That mean he need 30:2=15 end hours.
But a week has only 5 days. So even with morning and afternoon prefered times there are only 2*5=10 end hours.
Sadly 10<<15. So your suggestion is impossible.

Livius suggestion is correct. With his suggestion it is possible (if he doesn't have got nearly only subject math. But i bet he has got also a lot of other subjects).
Title: Re: Math not to come after Sport in FET Algeria version
Post by: yahi on January 28, 2018, 06:11:15 AM
Quote from: Volker Dirr on January 27, 2018, 09:27:45 PM
That hint won't help the topic starter. He has got 30 classes and only 2 gyms.
That mean he need 30:2=15 end hours.
But a week has only 5 days. So even with morning and afternoon prefered times there are only 2*5=10 end hours.
Sadly 10<<15. So your suggestion is impossible.

Livius suggestion is correct. With his suggestion it is possible (if he doesn't have got nearly only subject math. But i bet he has got also a lot of other subjects).
well dear Volker Dirr sometimes it is  possible  especially if you have some  classes  which have  two or more  free  hours i mean here that  a teacher  may have  two  classes in the morning or  two classes  in the afternoon even if they  get sport  in the morning they may get  home at 10.00 or 15.00 with no  lectures  at  all and this is  possible  in highschools with  some  streams i joined  two  pics 
Title: Re: Math not to come after Sport in FET Algeria version
Post by: Volker Dirr on January 28, 2018, 08:28:59 AM
ah. ok. My students are not allowed to have free gaps by law. I sadly assumed he has got the same law. My timetables are also always 100% filled in the morning. If he doesn't have got that law, than at least 5 classes need gaps if you use evening and morning timetable. If he use morning timetable only, than there must be at least 20 classes with gaps. I am not sure what is more worse: gaps or math after sport.
Title: Re: Math not to come after Sport in FET Algeria version
Post by: Liviu Lalescu on January 28, 2018, 07:36:14 PM
Please see: https://lalescu.ro/liviu/fet/forum/index.php?topic=3582.0