Please help with room allocation

Started by fetko, February 11, 2009, 06:36:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Liviu Lalescu

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.

catalin

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

Liviu Lalescu

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.

catalin

In other words is it possible for a teacher to work only between 7.30 and 13 every day?

catalin

Liviu Lalescu

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

catalin


Hrobky

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

Liviu Lalescu

#22
I am not home, I will answer in 4 - 7 days

Volker Dirr

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


Liviu Lalescu

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.