1 Introduction
One of the main problems in university management is successful management of limited physical or human resources. Physical resources are the spaces designated to university activities. We focus on the main activity of a university which is the taught of undergraduate and postgraduate courses.
For this purpose are needed classrooms, laboratories, workshops, medical and art spaces to teach the classes. The management of human and physical resources for the above purpose is named as Timetabling or Multidimensional Assignment Problem (MAP), depending on whether we refer to the application or the theoretical problem respectively. The MAP has had an extensive study over the years. In [13] a compilation of some MAP results is shown. The decision problem associated with the MAP is NP-Complete, even with three assignment levels [8].
Due to the complexity of the problem, over the years, heuristics and metaheuristics have been developed both to solve the MAP and concrete application cases associated with timetabling. In the case of the timetabling applications that are of interest in this work, there is the additional difficulty of modeling the specific operating conditions of each case, that is, although, in essence, a timetabling problem is a MAP with other constraints. These constraints are the consequence of the specific operation of each school.
The timetabling problem can be viewed as two problems: Professor Assignment Problem (PAP) and Classroom Assignment Problem (CAP). In the first one, the objective is to satisfy the course requirements in an academic institution depending on the availability of academic staff.
In CAP we assume that each course has a professor and the objective is to find the most appropriate assignment of classroom depends on the availability of physical resources (classroom) which courses are taught. In this paper we deal with the CAP.
In [3,4,9,7] both solution methods and models for timetabling are shown. In the case of solution techniques, they focus on constraint satisfaction. In our case, we deal with constraint satisfaction or constraint programming (CP) as it allows us to model the problem with decision variables and restrictions. The reason why CP is used to model and solve timetabling problems is that there is no objective function to optimize and there is only a set of constraints to satisfy, and these restrictions are divided into two types [3]:
— Hard: Those related to the availability of resources, such as lecturers, professors or classrooms in a period.
— Soft: Those related to situations that would be desirable in an assignment such as the preference of schedule or course by academic staff, preference of classrooms for certain types of courses, academic performance of a member of academic staff for a specific course.
In [2] the timetabling is presented as a candidate problem to be solved by CP due to its unique characteristics, but no model associated with the problem in question has shown. In the same article, authors say that the model is a simplified case and that it does not reflect a real situation. However, the main idea in that work is how the limitations in infrastructure and personnel resources should be model.
Also in [12] it is mentioned that the problem can be seen as a matching problem in multi-party graphs in which case they solve the problem in each sub-level (each bipartition of the graph) as a classic linear assignment problem by the Hungarian method [10] although this does not ensure the optimality [8]. Additionally, in [12] some models are presented where they contemplate the preferences of the students and the availability of teachers as well as a cost function that varies from the needs of each institution. In [12] Shafer et al. propose the following possibilities.
— Academic cost: related to the preferences of students and teachers or with an evaluation of the performance of a professor for a specific course.
— Organizational costs: related to minimizing the difference between the availability of resources and real demand.
— Staff cost: related to the availability of academic personnel.
In our case, we consider the organizational costs since we have to deal with the availability of classrooms with enough space for the students enrolled in the courses.
On the other hand, for specific applications, in [5,6] shows an ILP model for two application cases in Greek universities. In those jobs, the hard constraints have become into constraints of the integer program, and soft constraints are part of the objective function. In both cases are considered six levels of assignment which are group, course, teacher, classroom, period and day. The objective function in both cases has academic and organizational purposes, in other words, the course would be assigned to the most qualified professor and that the classroom assigned to a course is the most appropriate under the University criteria.
In [1] another model for a Turkish University is presented. In this case, it is intended to satisfy the needs of the student in terms of covering the credits of their curriculum in the time specified by the university. The students have a teacher assigned with which they like to take some class, and at the same time, the teacher is trying to assign the course that he chose.
In the case of Mexico in [13] a case of an application associated with the Metropolitan Autonomous University Azcapotzalco at the Department of Basic Sciences and Engineering is shown. In that case, Perez proposed a model of three extended assignment levels. He collapses two or more assignment levels, and the size of each partition increase, it is solved by local search algorithms and a memetic algorithm proposed in [14,11].
The ILP model in this work is a novel one because we considering sessions with different length, in different periods for each day, for each course. In [6,5,1] they consider that all classrooms have the same capacity. We introduce the concept of capacity coefficient in order to assign the best possible classroom option for each course (related with capacity). In [6], they consider multi-period sessions, but they considered this situation as a soft constraint. In our case, we considering multi-period sessions as a hard constraint.
In all the above cases the size of the instances are small or medium because in [6] they considering 72 courses and 18 classrooms, 13 periods, and five days.
On the other hand, the ILP model of [1] tries to minimize the professors and students dissatisfaction and solves an instance with 50 courses, eight classrooms 12 periods, and five days. In [13] consider an instance with 3123 courses, ten periods, and five days but not consider the classroom, only the course requirement in each academic department. In the same work, Pérez-Pérez solves UAM instance by the department with no more than 377 courses by department.
In all above cases they purposes an ILP model and solves with a commercial MILP solver as Gurobi, CPLEX, or LINGO. FI-UAQ instance has 757 courses, 50 classrooms of different capacity, 30 periods, and five days.
In the specific case of the Faculty of Engineering of the Autonomous University of Queretaro (FI-UAQ) we considering the following specific conditions for our model:
— University assigned the student load to the entire group without inference from the students.
— The university gives the professor-course-schedule assignment in a previous stage.
— The courses have lengths between 1 hr and 4 hr with periods of 1/2 hr.
— The courses are taught from Monday to Friday from 7:00 a.m. to 10:00 p.m (30 periods of 1/2 hr).
— If a course has a schedule on a specific day, the same course cannot be assigned to a different time on the same day. For example, if a course has a schedule on Monday from 7:00 to 9:00, the same course can not have another schedule on the same Monday.
— The classrooms may have different capacities.
— Each course is associated with a group, and the capacity of the course is the capacity of the group.
2 Methodology
Now we model the specific conditions associated with the different duration of the sessions of the courses and the different capacities of the available classrooms. In our case the problem will be modeled as a MAP with five levels of assignment (group (g), course (c), room (s), period (t), day (k) ).
To build the model, we use the following definitions:
Def 1 A Basic Time Unit (BTU) is a set of 30 continuous minutes.
Def 2 A block is a set of at least one contiguous BTUs.
Def 3 A course consists of one or more blocks in one or more days. To refer to the blocks that form a course c in a day k we denote it as B(c, k).
Def 4 A group is a set of courses. To refer to the courses of a group g we write it as C(g). The set of all groups is G.
Def 5 The capacity of a group is the maximum number of students who can be enrolled in a group and is written as |g|. The capacity of a course is the capacity of the associated group.
Def 6 The capacity of a classroom is the maximum number of students who can be allowed in the classroom, and it is written as |s|.
Def 7 An overlapping set consists of courses that generate overlap in a classroom s during an BTU t and it is denoted as OS(s,t).
Now to model the availability of classrooms we considering the following conditions.
— A classroom can be used by at most one course in a BTU t on a specific day k.
— A BTU of a block of a course should be taught in one of the available classrooms.
— If taught a BTU of a block of a specific course into a specific classroom, the entire block must be taught in the same classroom.
2.1 ILP Model
To build the integer linear programming (ILP) model, we define the following decision variables and constraints:
In constraint (1) every BTU of a block of each course must be assigned to a classroom. Constraint (2) ensures that a classroom can be assigned at most to one course during a specific BTU. In constraints (3, 4) if a classroom is assigned to a course all block of the course must be taught in the same classroom.
Constraints (1, 3) are redundant because the constraint (1) is implicit in (3) due to if in last one each BTU of a block must be assigned to a classroom. Now it is possible remove constraint (1) from the model.
Additionally, if we assign a block to a classroom on a specific day, then the course must be assigned in the same room all week, in equation 5 we can observe this situation:
The objective function minimizes the cost of the assignment, in our case this cost it is organizational, in other words, we try to assign a classroom to a specific course if the classroom has enough space for the students of course as described below:
where
3 Results
In this section, we show an illustrative example to visualize the structure of the input and output of an instance of our problem.
In Tables 1 and 3 we show a small example of the input for the model. Table 1 contains the schedule of all courses in the planning and the capacity of each group and Table 3 contains the capacity of each available classroom. To solve the ILP model we use Gurobi and its python interface.
Table 1 Instance: courses
Group | Capacity | Course | Monday | Tuesday | Wednesday | Thursday | Friday |
---|---|---|---|---|---|---|---|
0 | 20 | c0 | 11:00- 13:00 |
13:00- 15:00 |
|||
0 | 20 | c1 | 13:00- 15:00 |
11:00- 13:00 |
14:00- 15:00 |
||
0 | 20 | c2 | 17:00- 19:00 |
18:00- 20:00 |
|||
0 | 20 | c3 | 19:00- 20:00 |
15:30- 18:00 |
18:30- 20:00 |
||
0 | 20 | c4 | 15:00- 17:00 |
18:00- 19:00 |
16:00- 18:00 |
||
0 | 20 | c5 | 13:00- 15:00 |
17:30- 18:30 |
13:00- 15:00 |
||
1 | 30 | c6 | 17:00- 20:00 |
||||
1 | 30 | c7 | 18:00- 20:00 |
14:00- 16:00 |
|||
1 | 30 | c8 | 10:30- 13:00 |
10:30- 13:00 |
|||
1 | 30 | c9 | 10:00- 12:00 |
10:00- 12:00 |
12:00- 13:00 |
The solution of the example is in Fig. 1, Fig. 2 and Table 2. In Fig 1 we represent the use of all classrooms all day for each day of the week, in Fig 2 we represent the use of a specific classroom during the week and in Table 2 it can see the values of μ(c,g).
Table 2 Classroom assignment
Course | Classroom | μ(g, s) |
---|---|---|
c0 | s1 | 1 |
c1 | s1 | 1 |
c2 | s1 | 1 |
c3 | s2 | 2/3 |
c4 | s2 | 2/3 |
c5 | s2 | 2/3 |
c6 | s2 | 1 |
c7 | s2 | 1 |
c8 | s2 | 1 |
c9 | s2 | 1 |
FI-UAQ instance consists of 757 courses and 50 classrooms with different capacity. This instance input and results are in complementary material.
All instances solved in a server with 24 Gb of ram and six processors INTEL XEON of 2.8 GHz each one.
We solved FI-UAQ instance with optimality in 403.92 seconds; therefore, it is not necessary the use of heuristic methods.
The main advantages obtained with the ILP model were:
4 Conclusions and Future Work
At the FI-UAQ the assignment of classrooms to the courses was done manually until the year 2018. The assignment process took about one month and was susceptible to errors that had to be corrected once the classes started.
This work makes it possible to obtain an assignment proposal in a few minutes. The decision maker only needs a couple of days to make adjustments to the initial assignment.
As future work, we considering the proximity of classrooms to minimize the classroom changes for a group during each day.