Math not to come after Sport in FET Algeria version

Started by bachiri401, January 26, 2018, 05:19:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bachiri401

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

Liviu Lalescu

#1
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)?

yahi

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

Liviu Lalescu

#3
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).

Vangelis Karafillidis

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...

Vangelis Karafillidis

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.

Liviu Lalescu

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 :)

Benahmed Abdelkrim

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.
B.A/krim

Volker Dirr

#8
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.

Volker Dirr

#9
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.

Benahmed Abdelkrim

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.
B.A/krim

Liviu Lalescu

#11
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.

Volker Dirr

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.

bachiri401

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

Liviu Lalescu