FET Forum

FET Support (English) => Get Help => Topic started by: fetko on February 11, 2009, 06:36:36 PM

Title: Please help with room allocation
Post by: fetko on February 11, 2009, 06:36:36 PM
We have been testing your timetable software at our school for some time now. We have been pleased so far; however, one major problem has arisen.

We defined 6 rooms and 6 subjects (ECO221 to ECO226).

We defined activity tags for each activity (pred or vjez).

We also defined subgroups which are used to create final output.

The following is our problem:

We defined the following constraints (a subject+activity tag have a set of preferred rooms). Attached is the screenshot for those constraints.

When we generate our schedule, the software does not allocate some subjects to rooms.  For example, we have ECO226 that is apparently planned for Thursdays from 16:00 to 18:00 but ECO226 does not have a room even though we have listed the following constraint: subject tag preffered rooms, WP:95%, S:ECO226AT:vjez, R:PDS1, R:PDS2, R:PDS3. Provided is our sample output.

Attached is also our fet file.

Please let us know if you can help us. We would appreciate your help very much so.

Regards,
Title: Re: Please help with room allocation
Post by: Liviu Lalescu on February 11, 2009, 06:59:38 PM
Please use 100% weight. Why did you use 95%? 100% means satisfied all the time, 95% means in some cases constraints are not respected.
Title: Re: Please help with room allocation
Post by: fetko on February 12, 2009, 11:43:49 AM
Thank you very much!  It works now.

We will be posting about our progress on this forum.
Title: Re: Please help with room allocation
Post by: catalin on March 29, 2009, 12:31:57 PM
Hi,

I have almost the same problem, but I've specified IP 100%.

As activities I have defined only 3 courses but they do not get allocated rooms.

I've specified constrains only for some subjects which are not defined yet as activities...

Why these 3 courses/defined activities do not get rooms?
Thank you,
Catalin
Title: Re: Please help with room allocation
Post by: Volker Dirr on March 29, 2009, 02:05:44 PM
Because your space constraints use activity tag "laboratory", but your activities have activity tag "course".

so there are 2 solutions:
a) change activity tag "laboratory" to "course" in the space constraints
or
b) also add (or change) activity tag "laboratory" to the activities.

(just the variant that is best for your dataset)
Title: Re: Please help with room allocation
Post by: catalin on March 29, 2009, 05:53:40 PM
So I should understand that each activity has to have space constraints?

In my case I do not care where (building/room) the courses would be allocated - that is why I did not allocate a space constraint for them; but I do care about the laboratories (for which I've defined space constraints)

Catalin
Title: Re: Please help with room allocation
Post by: Volker Dirr on March 29, 2009, 08:19:37 PM
please check your sampleset. you added 3 times the same space constraint.
you have only activities with activity tag "course", but you don't have a space constraint with activity "course". that is why no room is used.

if you don't have room problems to your courses, then you don't need to add a space constarint at all.
if you have room problems, then of course you need to add space constraints.

schools normaly have home rooms to students or teachers. i am not sure about (your) university.
of course you shouldn't add a constraint to every single activity. that is normaly much to much work.

so schools normaly use only teacher or students home rooms and subject space constraint.

i saw your datafile contain many subjects.
so i guess you maybe need an other feature.

how did you "select" the room in the last timetable? i guess you have room problems and just took a room that is free without any priority?

so you need a "default room(s) space constraint"? Similar to "home room constraint", just for all activities that doesn't have a space constraint (and not only to activities of special teachers or students).
or maybe an option in the settings that is called "every avtivitiy must get a room".

currently that is not implemented, because most schools i know have home rooms to students/classes and every class have an own room. so that schools schedule without caring about (home) rooms, because they will never have a problem.

let us wait for Livius answer. i guess he will implement one of that ideas.
Title: Re: Please help with room allocation
Post by: catalin on March 30, 2009, 11:15:54 AM
>>please check your sampleset. you added 3 times the same space constraint.
OK. Solved.
>>you have only activities with activity tag "course", but you don't have a space constraint with activity "course". that is why no room is used.
That is why I have suggested the addition of "Tag+Space constraints" at http://lalescu.ro/liviu/fet/forum/index.php?topic=620.0, because I wanted the "courses" to go in certain locations like big rooms/amphitheaters and no in any room...

>>if you don't have room problems to your courses, then you don't need to add a space constarint at all.
>>if you have room problems, then of course you need to add space constraints.

>>schools normaly have home rooms to students or teachers. i am not sure about (your) university.
>>of course you shouldn't add a constraint to every single activity. that is normaly much to much work.

>>so schools normaly use only teacher or students home rooms and subject space constraint.

>>i saw your datafile contain many subjects.
>>so i guess you maybe need an other feature.

>>how did you "select" the room in the last timetable? i guess you have room problems and just took a room that is free without any priority?
YES. That's it...
we have rooms for seminaries, for labs (with computers) and amphitheaters. Each room has a certain capacity (and I've seen that FET supports this). In FET we could use the "activity tags" to specify courses/seminaries/labs and each activity would take place in rooms specific for each activity. Because at a "course" participate many students we could define rooms for "courses" using a "Tag+Space constraint" and so on.

I think that, exepting the capacity for each rooms, this is our most important space constraint. Otherwise it does not matter is course C1 takes place in room A1 or A2 as soon as it has the capacity...

>>so you need a "default room(s) space constraint"? Similar to "home room constraint", just for all activities that doesn't have a space >>constraint (and not only to activities of special teachers or students).
>>or maybe an option in the settings that is called "every avtivitiy must get a room".
Of course that this is important. At last, it does not matter if seminar S1 takes place in a big room/amphiteater as soon as it get a room.

Ordering the priorites:
1. "Tag+Space constraints" (e.g.:activities tag as courses go to their rooms, the same for labs)
2. "every activitiy must get a room" (as above: for seminars and other activities)

>>currently that is not implemented, because most schools i know have home rooms to students/classes and every class have an own room. so that >>schools schedule without caring about (home) rooms, because they will never have a problem.

>>let us wait for Livius answer. i guess he will implement one of that ideas.
Title: Re: Please help with room allocation
Post by: catalin on April 02, 2009, 08:01:16 AM
Hi,

I have a new set where I've specified students, teachers, rooms and activities without any tags

Space Constraints: none

Still FET does not fill in rooms in the allocated timetable

Title: Re: Please help with room allocation
Post by: Liviu Lalescu on April 02, 2009, 02:33:18 PM
QuoteHi,

I have a new set where I've specified students, teachers, rooms and activities without any tags

Space Constraints: none

Still FET does not fill in rooms in the allocated timetable


Of course, because you need to define space constraints for that.
Title: Re: Please help with room allocation
Post by: catalin on April 03, 2009, 07:06:20 AM
But I do not want any space constraint. I just want the the activities in some rooms, it does not matter where... (I did not remove the basic compulsory constraints)

Also, do you think there are any possibilities regarding my post(s) above?

Thank you,
Catalin
Title: Re: Please help with room allocation
Post by: Liviu Lalescu on April 03, 2009, 07:28:45 AM
QuoteBut I do not want any space constraint. I just want the the activities in some rooms, it does not matter where... (I did not remove the basic compulsory constraints)

Also, do you think there are any possibilities regarding my post(s) above?

Thank you,
Catalin

The basic space constraints take care that the rooms are not overwhelmed: the capacity is respected and there is not a room with 2 activities at the same time. But there can be, for an activity, an unspecified room. This is necessary for some schools, to avoid impossible timetables.

Activity tag preferred room is possible easily. But I don't like this solution, because some users might use it wrongly and obtain impossible timetables. Normally, people should care that a certain subject goes into a chosen room. I'll think about this.
Title: Re: Please help with room allocation
Post by: catalin on April 03, 2009, 07:45:55 AM
Thank you for your answer.

Regarding activity tag constraint: it would be simpler this way to allocate all "course" to a certain set of rooms, "seminars" to another set of rooms, etc.

I still don't know how could I get a timetable with rooms if I do not specify any space constraint (except basic space constraint)

Also, I've found out that the constraint in the menu "A teacher works in an hourly interval max days per week" has no effect. In my case, for me I've specified the interval "7.30-13" but FET allocates the activities all over the day.

Thank you again,
Catalin
Title: Re: Please help with room allocation
Post by: Liviu Lalescu on April 03, 2009, 07:57:22 AM
Quote

Regarding activity tag constraint: it would be simpler this way to allocate all "course" to a certain set of rooms, "seminars" to another set of rooms, etc.


OK, I'll think about it and maybe will be done. You are right.

Quote

I still don't know how could I get a timetable with rooms if I do not specify any space constraint (except basic space constraint)


You cannot, because FET allows activities with unspecified room, because there are users who do not add rooms.

Quote

Also, I've found out that the constraint in the menu "A teacher works in an hourly interval max days per week" has no effect. In my case, for me I've specified the interval "7.30-13" but FET allocates the activities all over the day.


I think you are wrong. This constraint was verified. Did you specify interval 7.30-13 max days per week 0 (zero)?
Title: Re: Please help with room allocation
Post by: catalin on April 03, 2009, 08:31:08 AM
I've specified the interval 7:30-9:25 as starting and 11:20-12:50 as ending and 5 at Max days per week, as in the attached file

Catalin
Title: Re: Please help with room allocation
Post by: Liviu Lalescu on April 03, 2009, 08:44:19 AM
QuoteI've specified the interval 7:30-9:25 as starting and 11:20-12:50 as ending and 5 at Max days per week, as in the attached file

Catalin

It is not right. You must specify the number of days you want the teacher to work in this interval, per week. If you want the teacher to work only one day in this interval (say, Monday), then select 1 days per week. If you want the teacher not to have lessons in this interval, then select the max days per week 0.
Title: Re: Please help with room allocation
Post by: catalin on April 03, 2009, 09:00:18 AM
What I understand from the menu is that a teacher should get hours between the allocated interval for Max days per week. In my case I was expecting to get hours from 7.30->13.00 in 5 days per week.

Is it possible something like this?

Catalin
Title: Re: Please help with room allocation
Post by: Liviu Lalescu on April 03, 2009, 09:04:22 AM
I am not sure I understand. This constraint specifies the maximum days, not the minimum.

To add max 5 days in a 5 days week is useless.
Title: Re: Please help with room allocation
Post by: catalin on April 03, 2009, 09:12:02 AM
In other words is it possible for a teacher to work only between 7.30 and 13 every day?

catalin
Title: Re: Please help with room allocation
Post by: Liviu Lalescu on April 03, 2009, 09:16:48 AM
QuoteIn other words is it possible for a teacher to work only between 7.30 and 13 every day?

catalin

Of course, specify the interval 13...end of day, max days 0 :-)
Title: Re: Please help with room allocation
Post by: catalin on April 03, 2009, 09:21:50 AM
Thank you very much!

Catalin
Title: Re: Please help with room allocation
Post by: Hrobky on May 10, 2009, 12:33:50 PM
QuoteBut I do not want any space constraint. I just want the activities in some rooms, it does not matter where...
Implementing "every activitiy must get a room" would be beautiful! Becuse it's not fully replaceable by "An activity tag has a set of preferred rooms".

You can add activity tag to every activity and set all rooms to be preferred for that tag, but preferred rooms take precedence over home rooms. As a result FET could generate time tables where classes unnecessarily change rooms with each other.

Another approach is to define additional preferred room constraint with small weight (const*100/n_classes). But this actually just ensures schedules not to be "too bad" - FET does not find optimal schedule (not possible) - just one with < 100% weight. (Tell me if I'm wrong) This is because when placing an activity you don't know which constaint is better to break: this one or one that arises in the future based on this decision.

Is the order of preferred rooms considered too? Or are they choosen from the set randomly? Is it possible to create an activity tag for each class (student set) and corresponding space constraint defining home room as the first in the list?

I think that the easiest way to implement this is to consider the home room (try to place the activity there) every time a space chioce is made. Or just giving it greather chance, if the algorithm is not based on backtracking. Moreover, it would be great if the home rooms enumeration was done recursively: If you set R1 as home room for year Y1, then it should be preferred for all the groups of Y1. This practically means that when a lesson is split to two rooms, it is preferrable that one group stays in the home room.

PS: Another init check should be added: peferred rooms enough time-slots. Problem: 1 Day, 3 time slots, 3 years-teachers-activities - each activity occupies 2 time-slots, enough (3) rooms, not enough (2) preferred rooms. Each activity has the same preferred rooms (R1, R2) 100% weight.
With this scenario FET will never yield output: it seems that we have enough space: 2 rooms * 3 time-slots = 3 activities * 2 time-slots each.
I think that 5 minutes should have been enough for the algorithm to test all possibilities, but it seems that it's not based on backtracking. Is it a bug in the cycle-detection part?
The problem is that this check is equivalent to solving a knap-sack problem over the rooms :(
Title: Re: Please help with room allocation
Post by: Liviu Lalescu on May 10, 2009, 01:38:31 PM
I am not home, I will answer in 4 - 7 days
Title: Re: Please help with room allocation
Post by: Volker Dirr on May 10, 2009, 04:58:56 PM
QuoteMoreover, it would be great if the home rooms enumeration was done recursively: If you set R1 as home room for year Y1, then it should be preferred for all the groups of Y1.

That will cause problems, because a group can be shared in different years.

For example year y1 contains group g1 and year y2 also contains group g1. So what should happen if you add a room constraint to y1 and an other to year y2.
Same problem with subgroups.

Title: Re: Please help with room allocation
Post by: Liviu Lalescu on May 14, 2009, 08:18:42 PM
It is not elegant to add a constraint "each activity must get a room", it sounds very weird for me. But I'll think about it.

Yes, we cannot define recursively home rooms, because you might get impossible timetables by that. Say year Y (groups G1, G2). If you add home room for G1 = R1 and G2=R2, then Y cannot be placed in a room. That is why I chose that if an activity has exactly the same set, it goes into the home room.

The order of choosing a room is random from each related constraint.

Maybe you can try using preferred rooms instead of home rooms, and add a preference for home rooms with weight below 100%.

Please tell me if I missed one of your questions or want more details, I am a bit tired now.