FET Forum

FET Support (English) => General Stuff => Topic started by: teispng on July 06, 2016, 02:50:09 PM

Title: Allocate correctly classes in a gym
Post by: teispng on July 06, 2016, 02:50:09 PM
Hello. I just started to use FET for school timetable of my school
(ICS Orazio in Pomezia (RM)). I have a problem with the gym that I
try now to explain. We work on 5 days per week (Mon-Fri) for 6 hours
per day (30 hours total per week). We have 32 classes (11 first, 10
second and 11 third). The physical education teachers make two hours
of lessons per week in each class. We have a gym that can
simultaneously accommodate two classes in each hour. Now I have to
make sure that for each hour there are always two classes in the gym
and only for 4 hours a week there are 3 classes third contemporaneous
this because we have 32 classes and not 30, and because the thirds may
alternate in the gym because they have to play hours of theory. I appreciate very much
if you can help me to solve the problem guiding me step by step as a
beginner. Thank you very much for your support. Sorry form my
English. Giovanni Spina
Title: Re: Allocate correctly classes in a gym
Post by: Vangelis Karafillidis on July 06, 2016, 03:16:56 PM
Could you be more specific? What I mean is, could you write down which specific (sub)activities can be the simultaneous with two others? Or it doesn't matter? I.e. can you have ANY four (at most) of these 32 lessons forming triads of activities with the rest of them?
Title: Re: Allocate correctly classes in a gym
Post by: Liviu Lalescu on July 06, 2016, 04:30:13 PM
To ensure that from a set of activities there are maximum 3 at each moment of time, you can use the constraint activities max simultaneous in selected time slots.

Please let me know if this helps you, or let me know why my solution is wrong (give more details).
Title: Re: Allocate correctly classes in a gym
Post by: teispng on July 06, 2016, 05:35:23 PM
Which is the path for the constraint "activities max simultaneous in selected time slots"?
Title: Re: Allocate correctly classes in a gym
Post by: Liviu Lalescu on July 06, 2016, 05:39:52 PM
Time constraints -> Activities.

Add all activities that you want in this constraint, select all time slots of the week (all 30) and add max simultaneous = 3.
Title: Re: Allocate correctly classes in a gym
Post by: Vangelis Karafillidis on July 06, 2016, 05:48:35 PM
Liviu, max simultaneous activities = 3 might result in many triple activities, far more than teispng expects.
So, I think that teispng should try this one:
Go to: Time -> Activities -> Max simultaneous activities from a set in selected time slots.
Select all your activities except for the ones that can be "tripled"
Select all time slots. Set max simultaneous = 2

Then go to: Time -> Activities -> A set of activities are not overlapping
Select the activities that can be "tripled". (this step is necessary to avoid quadruple (or more than 3) simultaneous activities in the overall timetable).

Title: Re: Allocate correctly classes in a gym
Post by: teispng on July 06, 2016, 05:56:51 PM
I try to better explain my problem. The school has 32 classes (11 classes first, 10 classes second and 11 classes third). Each class must carry out two hours of physical education a week. In total 64 hours to be allocated for physical education to be carried out in the gym. The gym can accommodate two classes simultaneously. The school has 30 hours per week (Mon-Fri), ie 6 hours a day (from 8:00 am to 14:00 am). So the most I can allocate 60 hours to the gym and not 64. So for 4 hours in a week in the gym I must have three classes, not two. These three classes must be  classes third. How can I fix?
Title: Re: Allocate correctly classes in a gym
Post by: Vangelis Karafillidis on July 06, 2016, 06:09:01 PM
Did you try what I wrote? Doesn't it work?
Title: Re: Allocate correctly classes in a gym
Post by: teispng on July 06, 2016, 06:13:30 PM
Go to: Time -> Activities -> Max simultaneous activities from a set in selected time slots.
Select all your activities except for the ones that can be "tripled"
Select all time slots. Set max simultaneous = 2
Done !!

Then go to: Time -> Activities -> A set of activities are not overlapping
Select the activities that can be "tripled". (this step is necessary to avoid quadruple (or more than 3) simultaneous activities in the overall timetable).
Can you be more specific ? What exactly I have to do ?
Title: Re: Allocate correctly classes in a gym
Post by: Vangelis Karafillidis on July 06, 2016, 06:38:27 PM
In the second step select only the activities that can become the "third" ones (simultaneous with two others).
Title: Re: Allocate correctly classes in a gym
Post by: teispng on July 06, 2016, 06:56:20 PM
I need the activities that must be tripled must not be concomitant with all the activities set with the below step that you have suggested:

Go to: Time -> Activities -> Max simultaneous activities from a set in selected time slots.
Select all your activities except for the ones that can be "tripled"
Select all time slots. Set max simultaneous = 2.

Please, what can I do? Is it more clear now?
Title: Re: Allocate correctly classes in a gym
Post by: Liviu Lalescu on July 06, 2016, 07:02:20 PM
Select 60 activities and add a max simultaneous constraint.

Select the other 4 activities and add a not overlapping constraint. These are the activities which will come as the third in a day.

This works only if you can decide manually which activities can be the third in a day. Otherwise, we need to think of something else.
Title: Re: Allocate correctly classes in a gym
Post by: teispng on July 06, 2016, 07:13:33 PM
It's still not clear the problem. I'm very sorry for that.
In each hour I must have 2 activities concurrently.
Only in 4 hours I must have 3 activities and these activities refferring to classes third.
Let me know if you have understood now.
Please, please help me.
Title: Re: Allocate correctly classes in a gym
Post by: Liviu Lalescu on July 06, 2016, 07:39:17 PM
I have another idea. Use rooms. I did the attached file. Please see it, see how I added the constraints of space, and let me know.

Edited: This works if I know the exact activities to place in the third room.
Title: Re: Allocate correctly classes in a gym
Post by: Volker Dirr on July 06, 2016, 08:01:09 PM
Hi, i suggest to use rooms for this problem. we also have got this problem at our school.
there are 2 variants to solve this: (and we use(d) both variants.)

a) select 2 courses/hours that might be placed in an other room (for example computer lab). talk to the physics teachers, they will tell you hours that don't highly need the room). of course there guys (3 at the same time) can TALK to each other and share the 3rd room! so they can change it every week or half year!

b) add a 7th hour. of course, so two activities can be late. select yourself that activities and/or let FET choose. (so all other activities need an activity tag and allow only hour 1-6. so only physics can be in the 7th hour. disallow 7th hour for students in lower grades! then you need to think where the higher grades can have the free time slot. only in 1st hour or only in 6th hour. you need to care about that by adding students no gaps per week constraint and students early constraint.
Title: Re: Allocate correctly classes in a gym
Post by: teispng on July 06, 2016, 08:04:37 PM
Hi Liviu, I saw the timetable and now we have only four hours with three concurrent activities. That's good. The problem now is that the tree activities are not only y3 rooms as requsted but we have for example y1, y2 and y3.
May I have only y3 rooms in those 4 hours instead?
Thanks a lot for your help.
Title: Re: Allocate correctly classes in a gym
Post by: teispng on July 06, 2016, 08:08:49 PM
Hi Volker, I'm very "happy" that you had my same problem.
I'm a very beginner and I didin't get your suggestion.
Please can you drive me step by step?
Thanks a lot for your help and understanding.
I'm waiting for your reply.
Regards :-)
Title: Re: Allocate correctly classes in a gym
Post by: Volker Dirr on July 06, 2016, 08:42:31 PM
variant a)

add an activity tag "ph" (physical eductaion)

talk to the teachers. they should tell you 4 hours that don't always need the room.

add that tag"ph" to all other physical eductaion + 2 out of that 4 hours. so in total 60 hours.

add 2 rooms.

then add a constraint that physical eductaion should be in this 2 rooms.
fet -> data -> space constraint -> activity tags -> an activity tag has prefered roomS

then use
fet -> data -> time constraints -> activities -> a set of activities has prefred starting time
you need to use this constraint 2 times.
the first time add one out of that 4 hours with tag "ph" and one out of that 4 hours without tag "ph".
do the same for the other two activities.


PS: you can save a bit work by not doing it by tags, you can also change subject name in that 2 hours. and use subject preferred rooms. then call the "physics education" subject into something like "physics education -"; so that don't get a physics room. by this you save some work, but the statistics will be a bit "untidy".
Title: Re: Allocate correctly classes in a gym
Post by: Volker Dirr on July 06, 2016, 08:51:36 PM
variant b)

add an hour. (fet -> data -> days & hours -> hours)

disallow lower grades in 7th hour:
fet -> data -> time constraint -> students -> students set not available

{
MAYBE also allow only hours 1-6 and a single hour in hour 7 to the higher grades
fet -> data -> time constraint -> students -> students set not available

OR
fet -> data -> time constraint -> students -> min hours per day = 5
fet -> data -> time constraint -> students -> max gaps per week = 0
fet -> data -> time constraint -> students -> students begin early (depending on your needs with value 0 or 1)
}

add 2 rooms.

add subject prefreed roomS. add "physical education" into this 2 rooms.
Title: Re: Allocate correctly classes in a gym
Post by: Liviu Lalescu on July 06, 2016, 08:59:28 PM
Quote from: teispng on July 06, 2016, 08:04:37 PM
Hi Liviu, I saw the timetable and now we have only four hours with three concurrent activities. That's good. The problem now is that the tree activities are not only y3 rooms as requsted but we have for example y1, y2 and y3.
May I have only y3 rooms in those 4 hours instead?
Thanks a lot for your help.

If you know which activities should be in the same slots, you can do as in the attached file. See the time constraint activities occupy max time slots from selection.

Note that I added more teachers, which is needed to solve the timetable.
Title: Re: Allocate correctly classes in a gym
Post by: teispng on July 06, 2016, 11:13:32 PM
Hi Liviu,
I saw the timetable and it is correct but you have considered a teacher t1 that has only room y1, t2 only room y2 and etc.
In reality what happens is that one teacher has rooms y1, y2, y3. In my school for example, we have four teachers:

t1 has y1a, y1b, y1c, y2a, y2b, y2c, y3a, y3b, y3c
t2 has y1d, y1e,y1f,  y2d, y2e,y2f,  y3d, y3e,y3f
t3 has y1g, y1h, y1i, y2g, y2h, y2i,y3g, y3h, y3i,
t4 has y1j, y1k, y2j, y3j, y3k

Please, can you generate a new file that include the situation that exists in my school?
I really appreciate your support and help.
I'm waiting for your reply including a new file.
Thanks a lot indeed.
Regards
Title: Re: Allocate correctly classes in a gym
Post by: Volker Dirr on July 06, 2016, 11:20:04 PM
i suggest to use the same trick for the gym as i descripd it for the physics education.
Title: Re: Allocate correctly classes in a gym
Post by: teispng on July 06, 2016, 11:26:25 PM
Hi Volker,
In my school for example, we have four teachers:

teacher t1 has rooms y1a, y1b, y1c, y2a, y2b, y2c, y3a, y3b, y3c
teacher t2 has rooms y1d, y1e,y1f,  y2d, y2e,y2f,  y3d, y3e,y3f
teacher t3 has  rooms y1g, y1h, y1i, y2g, y2h, y2i,y3g, y3h, y3i,
teacher t4 has rooms y1j, y1k, y2j, y3j, y3k

Please, as I'm begginner,  could you generate a  file.fet that include the situation that exists in my school?
In this way I can see all the constraints e replicate them in my file.
I really appreciate your support and help.
I really hope that's possible for you.
I'm waiting for your reply including a  file.fet.
Thanks a lot indeed.
Regards
Title: Re: Allocate correctly classes in a gym
Post by: Volker Dirr on July 06, 2016, 11:36:35 PM
the teachers rooms are independ from the gyms problem.
please do what i wrote above. you only need to decide if you want to use trick a or b. (with 5*6=30 hours, or if you want to enlarge to 5*7=35 hours week for higher grades)
i can't write a file for you now, because:
a) i am too busy for that
b) you won't learn how to do it and then you will always ask me every year the same stuff.

so please do what i wrote. then you can sent me the file and i can check it if there are still problems.
Title: Re: Allocate correctly classes in a gym
Post by: teispng on July 07, 2016, 05:43:00 AM
OK, I'll try to do myself and the I'll sent to you the file to verify where still are problems.
Thanks a lot.
For variant b) I need some clarification:

step1: add an hour. (fet -> data -> days & hours -> hours). That simply means set 7 hours instead of six. Correct?

step 2: disallow lower grades in 7th hour:
fet -> data -> time constraint -> students -> students set not available.That means that Ihave to add 1 constraint for each lower grades, i.e one for 1A, one for 1B until 1K ( we have 11 rooms first) and also one for 2A, 2B until 2J (we have 10 rooms second). In total 21 constraint. Right?

Step 3:
{
MAYBE also allow only hours 1-6 and a single hour in hour 7 to the higher grades
fet -> data -> time constraint -> students -> students set not available.
As before I just allow for each day all the 1-6 hours for the student 3A, 3B until 3K (we have 11 rooms third). In total 11 constraints. Right?

OR (this is alternative to the previous one, right?)
fet -> data -> time constraint -> students -> min hours per day = 5
fet -> data -> time constraint -> students -> max gaps per week = 0
fet -> data -> time constraint -> students -> students begin early (depending on your needs with value 0 or 1) (What does it mean?)
}

Step 4: add 2 rooms. For example gym1 and gym2. Right?

Step 5: add subject prefreed roomS. Can you be more specific here? I didnt'get you. Thanks
Step 6 : add "physical education" into this 2 rooms. Can you be more specific here? I didnt'get you. Thanks

Step 7: run timetable

I don't need to define any  tag here I suppose
I'm waiting for your reply.
Thanks a lot for your precious support and help
Regards
Title: Re: Allocate correctly classes in a gym
Post by: Liviu Lalescu on July 07, 2016, 02:17:53 PM
Quote from: teispng on July 06, 2016, 11:13:32 PM
Hi Liviu,
I saw the timetable and it is correct but you have considered a teacher t1 that has only room y1, t2 only room y2 and etc.
In reality what happens is that one teacher has rooms y1, y2, y3. In my school for example, we have four teachers:

t1 has y1a, y1b, y1c, y2a, y2b, y2c, y3a, y3b, y3c
t2 has y1d, y1e,y1f,  y2d, y2e,y2f,  y3d, y3e,y3f
t3 has y1g, y1h, y1i, y2g, y2h, y2i,y3g, y3h, y3i,
t4 has y1j, y1k, y2j, y3j, y3k

Please, can you generate a new file that include the situation that exists in my school?
I really appreciate your support and help.
I'm waiting for your reply including a new file.
Thanks a lot indeed.
Regards

Please add the activities like you wrote above and try to find the solution yourself. If you cannot, post here another reply, with the file with activities as you need (you can do this yourself).
Title: Re: Allocate correctly classes in a gym
Post by: teispng on July 07, 2016, 03:12:45 PM
Hi Volker, I have tried method b but the timetable is not running.
File attached.
Regards
Title: Re: Allocate correctly classes in a gym
Post by: Benahmed Abdelkrim on July 07, 2016, 04:54:06 PM
  I have modified your file, perhaps a solution
Title: Re: Allocate correctly classes in a gym
Post by: teispng on July 07, 2016, 04:55:04 PM
Hi Liviu,
I have done as you suggested. I set four teachers and I have maintained all the setting that you have done in your file.
After 40 minutes no solution has been found by FET.
Attached the file.
Please could me tell me where I'm wrong?
Thanks a lot indeed
I'm waiting for your reply.
Kind Regards :-)
Title: Re: Allocate correctly classes in a gym
Post by: teispng on July 07, 2016, 05:19:36 PM
Hi B.A/krim,
Thanks for the file but after 20 minutes any solution had been found (62/64).
Have you run the timetable? How many time for the solution?
Thanks a lot
Regards
Title: Re: Allocate correctly classes in a gym
Post by: teispng on July 07, 2016, 05:56:44 PM
Hi Volker,
atteched file for method a.
The time table is not what I want. Same hours with one activity only. Only two times, trhee ativities but not all third rooms.
Probably I'm wrong the time constraint.
Please can you check?
Thanks a lot indeed.
I'm waiting for your reply.
Kind Regards
Title: Re: Allocate correctly classes in a gym
Post by: Liviu Lalescu on July 07, 2016, 06:55:04 PM
Quote from: teispng on July 07, 2016, 04:55:04 PM
Hi Liviu,
I have done as you suggested. I set four teachers and I have maintained all the setting that you have done in your file.
After 40 minutes no solution has been found by FET.
Attached the file.
Please could me tell me where I'm wrong?
Thanks a lot indeed
I'm waiting for your reply.
Kind Regards :-)

You were wrong because the constraint activities occupy max time slots from selection had 6 hours with teacher t3. I added 2 hours for t2 instead of 2 hours for t3 and it solves. See the attached file.
Title: Re: Allocate correctly classes in a gym
Post by: Benahmed Abdelkrim on July 07, 2016, 07:09:21 PM
Quote from: teispng on July 07, 2016, 05:19:36 PM
Hi B.A/krim,
Thanks for the file but after 20 minutes any solution had been found (62/64).
Have you run the timetable? How many time for the solution?
Thanks a lot
Regards
ah! sorry I corrected a file...
Title: Re: Allocate correctly classes in a gym
Post by: Volker Dirr on July 07, 2016, 07:54:05 PM
Quote from: teispng on July 07, 2016, 05:43:00 AM
step1: add an hour. (fet -> data -> days & hours -> hours). That simply means set 7 hours instead of six. Correct?

yes

Step 2 and 3 are done a bit complicated by you. You also need to care about year 3. you don't need to add each single group. just add the whole year "1", year "2" and "year 3". 

Quote from: teispng on July 07, 2016, 05:43:00 AM
Step 4: add 2 rooms. For example gym1 and gym2. Right?
Step 5: add subject prefreed roomS. Can you be more specific here? I didnt'get you. Thanks
Step 6 : add "physical education" into this 2 rooms. Can you be more specific here? I didnt'get you. Thanks
Step 7: run timetable

Setp 5 and 6 is in fact only a single step:
fet -> Data -> Space constraints -> Subject -> A subject has preferred roomS
Title: Re: Allocate correctly classes in a gym
Post by: Benahmed Abdelkrim on July 07, 2016, 08:26:36 PM
proposing another solution I found a contradiction using two constraints;
Mr. liviu I believe you should take a look at this file.
I used the following constraints:
1. a set of activities has same starting time (day + hour)
2. max simultaneous activities from a set in selected time slots/ max simultaneous = 2

but in some interval of time I got 4 activities,  it's weird right?
Title: Re: Allocate correctly classes in a gym
Post by: Liviu Lalescu on July 07, 2016, 08:31:51 PM
Mr. Benahmed, it is normal, because you did not add all the activities in the constraint. If you add them, the timetable is impossible.
Title: Re: Allocate correctly classes in a gym
Post by: Benahmed Abdelkrim on July 07, 2016, 08:59:19 PM
I think the activities has a same starting time, acts as a single activity to satisfy the constraint max similtaneous=2?
Title: Re: Allocate correctly classes in a gym
Post by: Liviu Lalescu on July 08, 2016, 06:38:30 AM
Quote from: Benahmed Abdelkrim on July 07, 2016, 08:59:19 PM
I think the activities has a same starting time, acts as a single activity to satisfy the constraint max similtaneous=2?

I don't understand.

The constraint is satisfied.
Title: Re: Allocate correctly classes in a gym
Post by: Vangelis Karafillidis on July 08, 2016, 10:28:32 AM
I didn't understand...
Please start it from the beginning.

PLEASE VERIFY IF I UNDERSTAND THE PROBLEM CORRECTLY.
1) You have totally 64 hours per week gym lessons.
2) Your timetable has 60 hours.
3) You want the gym lessons to occur for 56 times (hours) with two at most two lessons simultaneously and 4 times (hours) with three lessons simultaneously.

Right?
Title: Re: Allocate correctly classes in a gym
Post by: teispng on July 08, 2016, 01:42:38 PM
Hi Vangelis Karafillidis,
Right !! The only added information is that the 4 times (hours) with three lessons (all third rooms) simultaneous must be all third rooms.
Thanks
Regards
Giovanni
Title: Re: Allocate correctly classes in a gym
Post by: teispng on July 08, 2016, 01:47:05 PM
Hi Liviu.
I'm very happy to comunicate that your file liviu3.fet is exactly what I want.
I have inserted myself the solution in my school orazio.fet, I run  the timetable and the tool has find a fine solution.
Thank you Liviu.
You are precious :-)
:-)
:-)
:-)
Title: Re: Allocate correctly classes in a gym
Post by: Liviu Lalescu on July 08, 2016, 01:48:33 PM
I'm glad it works :)
Title: Re: Allocate correctly classes in a gym
Post by: Vangelis Karafillidis on July 08, 2016, 02:14:24 PM
You can also try the following:

1) Insert all the activities (without room constraints).
2) Create a DUMMY (pseudo) teacher, for example PSEUDO_GYM
3) Create an DUMMY (pseudo) activity (this means an activity with teacher the PSEUDO_GYM, and without students) out , split = 56, min days = 0, duration =1
4) Go to Time - > Activities -> Max simultaneous activities from a set in selected time slots
5) Insert all the gym lessons along with the DUMMY activity.
6) Select all time slots
7) Set max simultaneous = 3.

I think that this should work.

Title: Re: Allocate correctly classes in a gym
Post by: Volker Dirr on July 08, 2016, 02:28:04 PM
why are all using so complicated tricks? it is so easy with rooms like i suggested.
Title: Re: Allocate correctly classes in a gym
Post by: Volker Dirr on July 08, 2016, 02:39:12 PM
i attach the corrected file. i deactivited 3 constraints at the moment. they are currently not possible, because you didn't add enought activities. as soon as you added all activities, you must enable them.
Title: Re: Allocate correctly classes in a gym
Post by: teispng on July 08, 2016, 09:00:15 PM
Hi Volker, I have added all the other activities and enabled the constraints.
The result is not good yet because I have in several case that the 7 hours is used.
Attached the file.
Thanks
Regads
Title: Re: Allocate correctly classes in a gym
Post by: Volker Dirr on July 08, 2016, 09:24:46 PM
i guess you are not talking about ph in 7th hour, don't you.
i will check your file now.
Title: Re: Allocate correctly classes in a gym
Post by: Volker Dirr on July 08, 2016, 09:37:23 PM
ok. first of all.
please replace year "1" with year "3" in the "Students set must arrive early" constraint.
Title: Re: Allocate correctly classes in a gym
Post by: Volker Dirr on July 08, 2016, 09:40:19 PM
and as second improvement you need to set students work in an hourly intervall max 1 hour (for the last hour).
i attach the file.
Title: Re: Allocate correctly classes in a gym
Post by: Volker Dirr on July 08, 2016, 09:42:18 PM
we can also improve a bit more if you want (but we need to use activity tags than)
Title: Re: Allocate correctly classes in a gym
Post by: Volker Dirr on July 08, 2016, 10:04:30 PM
i added it with tags. i used "m" like "morning". you can rename and hide it of course.
i allowed "m" only from 1-6.
i disallowed friday the last hour.
i hope that is something you like to have.
see attached file.
Title: Re: Allocate correctly classes in a gym
Post by: Volker Dirr on July 08, 2016, 10:05:08 PM
hmmm. maybe think about using shortcuts for teacher names. it might look a bit better.
Title: Re: Allocate correctly classes in a gym
Post by: Volker Dirr on July 08, 2016, 10:07:34 PM
hmm..
you can even improve a bit more by set one room disabled in the last hour.
see attached file.
Title: Re: Allocate correctly classes in a gym
Post by: Volker Dirr on July 08, 2016, 10:12:14 PM
you maybe should do main subjects more early.
when do you have break? between 2 and 3 ; 4 and 5
or between 3 and 4?

i don't know your subject shortcuts.
which subjects should be early (like math, english, ...)?
which subjects can be late (like art, music, sports, ...)?
Title: Re: Allocate correctly classes in a gym
Post by: Volker Dirr on July 08, 2016, 10:14:48 PM
i guess Math and Let are your main subjects that should be early. i suggest to place some of them early. but i should know your break time to decide how to do it best.
Title: Re: Allocate correctly classes in a gym
Post by: Volker Dirr on July 08, 2016, 10:19:38 PM
you can also improve the teachers gaps and min days a bit more. (maybe even more later. add other constraints first)
Title: Re: Allocate correctly classes in a gym
Post by: teispng on July 09, 2016, 07:19:57 AM
I Volker,
thank you for your all suggestion.
Unfortunately the timetable is still not correct. As you can see for MO subject (i.e. physical education) the 7 hour is still usedby a 3 room.
What I'd like to have is:
1) two rooms in each hours  (7 hour not used at all) except in 4 hours.
2) only in 4 hours I need three 3 rooms (7 hour not used at all), for example 3A, 3C, 3F; 3F, 3H, 3G ...... (just example).
Thanks a lot for your interest.
Regards
Giovanni
Title: Re: Allocate correctly classes in a gym
Post by: Volker Dirr on July 09, 2016, 07:57:15 AM
You are funny. You decided for variant b) with 7th hour.

it is only used 1 room in 7th hour. not 3!

Now you ask me for variant a). can you please think about that next time earlier.
You should ask the physics teachers now which activities don't need to many times the physics rooms. that is depending on what they are teachering. in some years they highly need the room, because they will do much practical stuff. in other years it isn't highly needed. You should talk to them, not doing it randomly. i can show you how to do it randomly, but in my opinion that is a nasty way to do it (i am physics teacher myself).

Title: Re: Allocate correctly classes in a gym
Post by: Volker Dirr on July 09, 2016, 08:15:10 AM
ok. i attached a variant like you want. But it is not good. I highly recommend to talk with the physics teachers. maybe you can offer them to use the computer lab and/or the workshop in that 4 hours. So i highly recommend to use my variant a) if you don't like variant b). Don't use this c) variant. it is not good.
Title: Re: Allocate correctly classes in a gym
Post by: Vangelis Karafillidis on July 09, 2016, 10:43:38 AM
Quote from: Vangelis Karafillidis on July 08, 2016, 02:14:24 PM
You can also try the following:

1) Insert all the activities (without room constraints).
2) Create a DUMMY (pseudo) teacher, for example PSEUDO_GYM
3) Create an DUMMY (pseudo) activity (this means an activity with teacher the PSEUDO_GYM, and without students) out , split = 56, min days = 0, duration =1
4) Go to Time - > Activities -> Max simultaneous activities from a set in selected time slots
5) Insert all the gym lessons along with the DUMMY activity.
6) Select all time slots
7) Set max simultaneous = 3.

I think that this should work.

teispng: Did you try my "tricky" approach? Does it work?

Volker Dirr: I think that my solution is not the only "tricky" one!  ;)
Title: Re: Allocate correctly classes in a gym
Post by: Vangelis Karafillidis on July 09, 2016, 11:09:55 AM
Quote from: Vangelis Karafillidis on July 08, 2016, 02:14:24 PM
You can also try the following:

1) Insert all the activities (without room constraints).
2) Create a DUMMY (pseudo) teacher, for example PSEUDO_GYM
3) Create an DUMMY (pseudo) activity (this means an activity with teacher the PSEUDO_GYM, and without students) out , split = 56, min days = 0, duration =1
4) Go to Time - > Activities -> Max simultaneous activities from a set in selected time slots
5) Insert all the gym lessons along with the DUMMY activity.
6) Select all time slots
7) Set max simultaneous = 3.

I think that this should work.

EDITED... I found a mistake...

1) Insert all the activities (without room constraints).
2) Create a DUMMY (pseudo) teacher, for example PSEUDO_GYM
3) Create a DUMMY (pseudo) activity (this means an activity with teacher the PSEUDO_GYM, and without students) split = 26 (30 hours of the schedule - 4 hours of the "triple" gym courses), min days = 0, duration =1
4) Go to Time - > Activities -> Max simultaneous activities from a set in selected time slots
5) Insert all the gym lessons along with the DUMMY activities (step 3).
6) Select all time slots
7) Set max simultaneous = 3.
Title: Re: Allocate correctly classes in a gym
Post by: Volker Dirr on July 09, 2016, 11:38:16 AM
yes, that variant is also possible, but it also have got 3 (small) disadvantages:
- you need to care about dummy stuff; espicialy if you change the number of physics activities next year or if there are more or less classes/groups next year. so it is critical, because you might forgot to change again.
- teachers and students can't see who is in the physics lab and who is in class room
- it is randomly (so in worst case it "hit" always the same teacher in all his lessons! maybe that is ok, maybe not.)

why don't you talk with your physics teachers? why to you try to beat them randomly? if you simply TALK with them, they can tell you who can share a room. then they can prepare the lessons. they can also internaly swap ever 2 weeks.

So: talk with them! in easierst case you simply add 2 teachers and 2 groups into the same activity. you need to do that with 4 subactivities only.
it is so easy!
the advantage is:
- you won't do a bug next year. you don't need to change dummy stuff if the number of hours/activities/classes/groups change next year
- teachers and students can see who is in the lab
- it isn't randomly. the teachers know that already before and can prepare lessons very well.

Title: Re: Allocate correctly classes in a gym
Post by: Volker Dirr on July 09, 2016, 11:58:48 AM
i attach a file where you can see how to solve it if you talk with teachers. as you can see 2 of them share the room. so they can swap every 2 weeks the rooms.
but you need to TALK with the teachers. TALKING with them and getting a solutions from them is much better then beating them randomly.
i am a physics teacher myself and i hated the time when i was beaten randomly. I liked the time where guys talked with me and i just told them: No problem, i don't need the physics lab in hour X with students set Y if i get the computer lab instad of the physics lab. Or: No problem, i don't need the physics lab all 2 hours, with students set x i just need it 1 hour, in the other hour it is ok if i share it internaly with teachers Z. Today i am happly myself the guy in charge.
Title: Re: Allocate correctly classes in a gym
Post by: teispng on July 10, 2016, 03:32:15 PM
Thank you very much Volker,
I'll do ad  you suggested and I'll talk with the teachers.
I've perfectly understood your simply method.
I'm very happy.
I have now three different method to resolve the problem but your last one a think is good enough.
Than you again
Regards
:-)
Giovanni
Title: Re: Allocate correctly classes in a gym
Post by: Benahmed Abdelkrim on July 10, 2016, 06:46:59 PM
  here is an alternative solution
http://lalescu.ro/liviu/fet/forum/index.php?topic=2558.msg13770#new (http://lalescu.ro/liviu/fet/forum/index.php?topic=2558.msg13770#new)
Title: Re: Allocate correctly classes in a gym
Post by: Volker Dirr on July 10, 2016, 07:25:43 PM
yes, that is also a possible solution, but it has got the nearly the same disadvantages as Vangelis Karafillidis suggestion.
Title: Re: Allocate correctly classes in a gym
Post by: Volker Dirr on July 10, 2016, 07:41:19 PM
i forgot to say: if you use my last "trick" with different subactivities you should add 2 min days constraints to that 3 activities.
Title: Re: Allocate correctly classes in a gym
Post by: teispng on July 11, 2016, 09:26:41 PM
I didnt' get you.. What do you mean in details? Registra :-) Giovanni
Title: Re: Allocate correctly classes in a gym
Post by: teispng on July 11, 2016, 09:39:21 PM
I B.A./Krim,
yes, your solution has three activities 4 times but the three activities must be only third rooms (the highest grade) and not lower grades.
I hope it's clear.
Thanks
Regards
Giovanni
Title: Re: Allocate correctly classes in a gym
Post by: Volker Dirr on July 11, 2016, 09:40:31 PM
lets say you have this:

id 1 - teacher 1 - ph - group 3a
id 2 - teacher 1 - ph - group 3a

id 3 - teacher 2 - ph - group 3b
id 4 - teacher 2 - ph - group 3b

there are already 2 min day constraints added automaticly:
1.: id 1 and id 2
2.: id 3 and id 4

example a:
now you decide to merge id 1 with id 3.
and you merge id 1 and id 4.
id 1 - teacher 1 + teacher 2 - ph - group 3a + group 3b
id 2 - teacher 1 + teacher 2 - ph - group 3a + group 3b
in fact id 3 and id 4 should be removed now.
all is fine, because you still have the min day constraint with id 1 and id 2.

example b:
now you decide to merge id 1 with id 3.
BUT NOT merge id 2 and id 4 (Because you want to do that with other teachers/groups/activities.)
id 1 - teacher 1 + teacher 2 - ph - group 3a + group 3b
so id 2 and 4 stay the same.
but id 3 is "empty" now. you can (should!) remove it.

but now the min day constraints are incorrect.
there should be 2 min day constraints:
1.: id 1 and id 2 (that is still there and it is correct!)
2.: id 1 and id 4 (so you see, you need to add this one yourself!)