# A Novel Optimization Approach for Educational Class Scheduling with considering the Students and Teachers’ Preferences

Authors: Yu Chen; Mahmonir Bayanati; Maryam Ebrahimi; Sadaf Khalijian
Journal: Discrete Dynamics in Nature and Society
 (2022)

---

## Abstract

University class scheduling problem is one of the most important and complex issues in the academic field. This problem is recognized as one of the NP-HARD issues due to its various limitations. On the contrary, genetic algorithms are commonly used to solve NP-HARD problems, which is one of the decision-making problems and is basically one of the most fundamental classes of complexity. The university course planning includes severe constraints such as classroom, classroom curriculum, and faculty. At the same time, some soft constraints should be considered, such as student and faculty preferences and favorite class time. In this research, as a novel contribution, an integer model for scheduling university classes is presented. In this model, the preferences of professors and students are in accordance with the satisfaction values obtained through questionnaires. Moreover, a genetic algorithm has been developed to solve the model. The results show that the classroom timeline by this algorithm goes well during each run. Moreover, considering an exploratory search for the genetic algorithm can greatly improve the performance of this algorithm.


---

## Body

## 1. Introduction

Curriculum planning and schedules are among the most complex problems confronting colleges, schools, and educational institutions. In this regard, an attempt is made to assign a collection of specific services, such as classrooms, instructors, and courses, to a set of teaching hours under specific conditions. Universities and schools have different requirements. The allocation of units to classes and professors to units is one of the most significant disparities between universities and colleges. In most colleges, the professor assigned to a course is not specified ahead of time [1, 2].In other words, a professor can teach multiple courses, while each course is listed in professor schools. In addition, in colleges, the class assigned to each subject is unknown in advance, while in schools, this is not the case [3].To put it another way, there are lots of constraints to providing appropriate planning for educational classes. One of them is the availability of professors. Not all instructors are available at all times and offer their free time. Other things like the number of classes and courses are provided. The number of classes, courses, the room’s availability, or the class’s place must be considered for planning [1].The following constraint is the students’ preferences and conditions. For example, top students finish about four semesters of their studies. In other words, they must pass about 18 courses per semester on average. It is obvious that, in the same semester, all the courses should be planned differently from one another so that the student can complete the course without any overlapping plans. All these courses are registered as a group. For a specific unit, the number of students in a group becomes very large, and it is impossible to plan them for a specific period in a class. Therefore, holding a parallel class is likely to happen. Suppose 100 students pass a specific course in the same semester, and on the contrary, the capacity of a class is a maximum of 30 students, so four parallel classes will be opened for that course.It should be noted that the program of that parallel class is not necessarily the same. It depends on the instructor’s availability. In addition, there are facilities for a specific course where some classes are merged into one class. Suppose a teacher can teach a number of courses. This makes the timetable more difficult. On the contrary, the timetable of the university program includes several sections. Timetable constraints in the first stage are 8 hours of classes per day and five days per week. Secondly, there are two types of lecturers, full-time and part-time lecturers.In general, a maximum of 16 theory units per week is planned for a part-time lecturer, while a maximum of 12 units is planned for a full-time lecturer. There is no particular limit for the room where the classroom is held. However, for some specific courses, there is also a workshop and laboratory modes, which have different schedules and make the schedule more difficult[2, 4].Researchers all around the world have assessed the optimization of curriculum planning and course scheduling in different universities. Cruz–Rosales et al. [3] created a two-stage model in which they first considered a feasible solution using novel approaches such as local search and taboo search and then soft constraints using the simulated annealing process. By simulated annealing (SA) algorithm and graph coloring, they obtained a solvable solution. Next, the SA algorithm then eliminates soft constraints, as well as rearranges time intervals and moves courses between time intervals [3].A meta-innovative approach based on the forbidden quest was presented by Aldeeb et al. [5]. Different neighborhood structures are discussed in this study. The problem of scheduling courses at the university’s department of statistics with four separate neighborhood structures was solved, and the results were compared. Assi et al. [6] provided a model for scheduling the exams at Napier University by removing unscheduled courses using an evolutionary genetic algorithm and local search.Muklason et al. [7] proposed an integer programming model for the class schedule that ensured the constraints met the requirements. The objective function of this study is to represent the desires of students and professors. Mokhtari et al. [8] provided a study on the topic of nurses’ class planning, which is comparable in terms of modeling to educational planning. With the aid of mixed-integer programming, a two-stage creative model was proposed to improve the program’s user-friendliness and high versatility in switching between nurses. Luo et al. [9] developed a model to minimize professors’ working days and hours of unemployment between the two groups, using simultaneous linear programming of integers combined with real numbers as a convergent approximation tool to the neighborhood.After a complete review of the literature, the main contribution of this research can be summarized as follows:(i)
Optimizing the university class scheduling problem considering the preference of teachers(ii)
Optimizing the university class scheduling problem considering the preference of students(iii)
Considering the deviation of ideal plans in optimizing the studied problem(iv)
Proposing a metaheuristic algorithm to optimize the proposed mathematical modelIn the rest of the study and in Section2, the methodology, including the proposed mathematical model and the genetic algorithm, will be discussed. In Section 3, the numerical results obtained from solving the model are presented, and in Section 4, the research summary is presented.


## 2. Methodology

### 2.1. Proposed Mathematical Model

In this section, an integer linear programming model is presented. In this regard, the principles of proposing a new mathematical model are inspired by [10–14]. Based on modeling from the subject literature [15–17], the objective function of the model is divided into two parts. The first part is for professors, and the second part is for students. Moreover, since it was required to maximize the number of classes in a specific time period, its negative deviations are minimized too. In the following, variables, parameters, and sets are defined. Next, various constraints of the model are presented, and then, the objective of the function and determination of the cost coefficients are presented.


#### 2.1.1. Indices and Sets

i: index of coursesj: index of courses’ codel: index of professorsd: index of dayst: index of periodsS: index of student groupsl: the set of courses that must be presentedl1v: a set of one-unit courses (courses that require half a session per week)l2v: sets of two-unit courses (courses that require one session per week)l3v: three-unit course set (courses that require one and a half sessions per week)l4v: four-unit course set (courses that require two sessions per week)llL: courses that can be presented by the L professorlsS: courses in which the sth group of students is applying for registrationJi: the codes that can be provided for the ith courseLi: professors who can teach my course.T: the set of time intervals, T=0,1,2,…TE: set of even time intervals, T=0,2,4,…TO: set of odd time intervals, T=0,1,3,5,…TK: set of time intervals of kth time packets


#### 2.1.2. Decision Variables

Xijldt: binary variable takes 1 if the code of the class i is provided at the hour t of day d, and is 0 otherwiseXijldts: binary variable takes 1 if the code j of the class i is provided by the lth professor at the hour t of the day d and the sth group of students participate in it, and 0 otherwiseyij: binary variable will take 1 if the code j of the three-unit class i has two sessions in an odd week and one session in an even week, and if it has one session in an odd week and two sessions in an even week, it will take 0ddkss+,ddkss−: positive and negative deviations of the number of classes of the sth group of students in the tth time block on the day d from the desired number of classesydkss: binary variable is equal to 1 if the sth group of students in the kth time block has class, and 0 otherwiseddksi+, ddksi−: positive and negative deviations of the number of classes of teachers l in the kth time block on the day d from the desired number of classesydksl: binary variable is equal to 1 if a teacher l has a class in kth time block on day d, and 0 otherwisezijl: binary variable is equal to 1 if the teacher l teaches the ith course, and 0 otherwisewijs: binary variable is equal to 1 if group s of students enrolls in code j of course i and 0 otherwise


#### 2.1.3. Parameters

Ll: minimum number of hours that the professor l must teach (for faculty members)Ul: maximum number of hours that the lth professor should teach (for professors who are not faculty members)ai: capacity of the ith class (the maximum number of students who can enroll in the ith class)ks: number of students in the sth student groupbdt: number of available rooms for class scheduling in the tth interval from the dth daymld: desired number of classes of the lth teacher in the kth time package on the dth daynks: desired number of classes of the sth student group in the kth time block on the dth dayvi: number of units for the course icijldt: cost factor of the formation of the Jth class of the ith class by the lth teacher at hour t of the day dcijldt': coefficient of the cost of forming the class code J of the ith class by the lth teacher at the hour t of the day d and registering the sth group of students in it.a1: importance of cost factor in the objective functiona2: importance of number of classes (negative deviation) in the objective functiona3: importance of the number of classes (positive deviation) in the objective functiona3: importance of students’ preferences in the class schedulea4: importance of teachers’ preferences in the class schedule


#### 2.1.4. Hard Constraints

(1) One-Unit Courses. Constraint (1) has been presented for one-unit courses, which specifies that one of the half-intervals must take the value of one on different days and at different time intervals:(1)∑d∈D∑t∈T∑l∈Lxijldt=1∀i∈l1v,j∈Ji.(2) Two-Unit Courses. For two-unit courses, Constraints (2)-(3) are used. Constraint (2) makes one of the even half-intervals equal to one and is equivalent to the fact that the first part of a class is formed in one of the even half-intervals, and Constraint (3) equals the next half-interval. It places one so that the continuation of the class is also formed exactly after the first half of the class:(2)∑d∈D∑t∈T∑lεLxijldt=1∀i∈l2v,j∈Ji,(3)xijldt=xijldt+1∀i∈l2v,j∈Ji,d∈D,t∈TE,lεLi.(3) Three-Unit Courses. As the courses suggest, for the assignment of these courses, three half-intervals of one must be taken. There are two situations here: either two half intervals of even and one half interval of odd value or two odd half intervals and an even one are taken. Constraints (4)-(5) show that if yij takes the value of one, we will have two even half-intervals and one odd half-interval, and vice versa, if it takes the value of zero:(4)∑d∈D∑t∈TE∑l∈Lxijldt=1+yij∀i∈l3v,j∈Ji,(5)∑d∈D∑t∈TO∑l∈Lxijldt=2−yij∀i∈l3v,j∈Ji.Constraint (6) guarantees that two of the three half intervals that are supposed to have a value of one are consecutive so that it can be considered as a full session:(6)yij−1≤xijldt−xijldt+1≤yij∀lεLi,t∈TE,i∈l3v,∈Ji,d∈D.Constraint (7) guarantees that each course does not have more than two half-periods (one session) per day:(7)∑t∈Txijldt≤2,∀d∈D,i∈l3v,j∈Ji,lεLi.(4) Four-Unit Method. There are four series of constraints for four-unit courses. Constraint (8) makes two of the even half-intervals equal to one, and it is equivalent to the fact that the first part of a class is formed in two even half-intervals. Moreover, Constraint (9) of their next half-interval is equal to that (one) so that the continuation of the class is formed exactly after the first half of the class:(8)∑t∈Ttxijldt=2,∀i∈l3v,j∈Ji,lεLi,d∈D,(9)xijldt=xijldtt+1,∀i∈l4vlεLi,t∈TE,j∈Ji.Constraint (10) guarantees that each four-unit course does not have more than half a period (one session) per day:(10)∑t∈Ttxijldt≤2,∀i∈l4v,j∈Ji,lεLi,d∈D.


#### 2.1.5. Constraint of Professors

Constraint (11) guarantees the noninterference of the courses related to each professor in each time period:(11)∑i∈l∑j∈Jixijldt≤1,∀l∈L,d∈D,t∈T.Constraint (12) is related to the minimum and maximum teaching hours of professors, which are the minimum teaching hours for faculty members and the maximum teaching hours for some nonfaculty professors who set a maximum time for teaching:(12)L≤∑d∈D∑t∈TE∑l∈L∑i∈lixijldt≤U,∀l∈L.Constraints (13)-(14) guarantee that each code teaches each course by one and only one professor. If the lth teacher teaches the jth code of the ith course, the variables related to that teacher can take values. The first Constraint (13) makes it possible to be scheduled in the timetable only when a professor has taught the course code. Furthermore, Constraint (14) guarantees that each course code is taught by only one professor:(13)∑i∈li∑j∈lj∑l∈Lxijldt≤vizijs,∀s∈S,i∈lss.j∈J,(14)∑l∈Lizijl=1,∀i∈I,j∈Ji.


#### 2.1.6. Constraint of Students

Constraint (15) guarantees the noninterference of courses related to each group of students in each time period:(15)∑i∈Il∑j∈Ji∑l∈Lixijldt≤1,∀s∈S,d∈D,t∈T.Constraint (16) shows that if a course is offered in a day and hour, the number ai of students who apply for that course should register in the code of that course:(16)aixijldt=∑s∈Siksxijldts,∀i∈I,j∈Ji,d∈D,t∈T.Constraints (17) and (18) guarantee that each student group can register one and only one-course code, and if it is registered, the variables related to that code can be set. In fact, the following constraint shows that if course i was presented with vi units for the students of group s, it will be Wijs=1, and the number vi of half the interval will be one.These constraints guarantee that each group of students can register in one and only one of the course codes they want, and if they register, the variables related to that code can be set. In fact, Constraint (17) shows that if course i of code j is presented with vi units for students of the group s, it will be Wijs=1, and the number vi of half interval will be one. Constraint (18) shows that each group of students must register in one code for the courses they want. Moreover, Constraint (19) shows the number of classes available in each time period:(17)∑i∈Il∑j∈Ji∑l∈Lixijldt≤viwijs,∀s∈S,i∈Iss,j∈Ji,(18)∑j∈liwijs=1,∀s∈S,i∈Iss,(19)∑i∈Il∑j∈Ji∑l∈Lixijldt≤bdt,∀d∈D,t∈T.


#### 2.1.7. Soft Constraints

The soft constraints include the following. Constraint (20) from the professors’ point of view shows the minimum number of classes that professors want to have in each time frame package:(20)∑i∈Il∑j∈Ji∑t∈Tkxijldtddkll−−ddkll+=mklykdll,∀l∈L,k∈K,d∈D.Constraint (21), which is raised from the perspective of students, shows the minimum number of classes that students have in each time package:(21)∑i∈li∑j∈l∑l∈Li∑t∈Tkxijldt+ddkls−−ddkls+=nksykdss,∀s∈S,k∈K,d∈D.


#### 2.1.8. Objective Function

(22)Minz=a1∑i∈li∑j∈l∑l∈Li∑d∈D∑t∈Tcijldtxijldt+a2∑s∈S∑d∈D∑k∈Kddkss−+a3∑s∈S∑d∈D∑k∈Kddkss++a4∑l∈L∑d∈D∑k∈Kydkll++a5∑s∈S∑d∈D∑k∈Kydkss.Equation (22) shows the objective function of the mathematical model. In general, the different parts of the objective function are measured with coefficients a, and their relative importance is determined. The first part is for the cost of forming a class, and the second part is the cost of choosing a class of students. The third and fourth sections try to maximize the number of classes in the time package as much as possible, so its negative deviations are minimized. The fifth section makes the class less time-bound.


### 2.2. The Structure of the Genetic Algorithm

The genetic algorithm (GA) is a classic metaheuristic algorithm based on the evolutionary ideas of natural selection and genetics [18]. In this way, GA represents the intelligent use of a random search algorithm to solve optimization problems. Although genetic algorithms use random phenomena, it has an evolutionary process to achieve the best possible solution [19]. The main aspects of GA are designed in such a way that they can simulate the processes necessary for evolution in natural systems. Among the most important of these processes are those that follow the laws that were first proposed by Charles Darwin and named “Survival of the Fittest.” The reason for this is that, in nature, the competition between living organisms to obtain scarce resources leads to the dominance of the fittest organisms over the weaker ones [20, 21].In order to solve mathematical models using genetic algorithms, it simulates the principle of fitness with an encoding scheme. It produces several solutions as a “generation.” Each generation contains a population of strings of characters that are similar to the chromosomes found in our DNA. Each person (solution) will represent a point in the search space and a possible solution. Next, the members of each generation enter into a process similar to the process of evolution of living organisms [22].Genetic algorithms operate using specific principles, such as the genetic structure and behavior of chromosomes in a population of individuals [23]. These basics are(i)
Selecting a set of solutions and generating new solutions using crossover and mutation(ii)
Members who are more successful in each competition produce more offspring than members who do not perform well(iii)
Genes from good-performing members spread within the population, so good parents sometimes produce offspring that are better than either parentTherefore, each successive generation will be better suited to live in its surroundings. A summary of the steps of the genetic algorithm is presented in Figure1.Figure 1
The main operators in genetic algorithm.To use a genetic algorithm, a population of individuals is maintained within a search space. Each of these people is actually a possible solution to the problem. Each member is coded with a finite-length vector of components or variables and with the help of special alphabets. These special alphabets are usually binary alphabets. To implement a genetic algorithm structure, each member is interpreted as a chromosome which is known as solution representation. Therefore, a chromosome (a solution to the problem) consists of several genes (variables). To show the abilities of each member to compete with other members of the population, each possible answer is assigned a fitness score. The member with an optimal fitness score (or, more generally, close to optimal) is our favorite [24, 25]. The main reason for choosing GA for optimizing the proposed mathematical model is its acceptable performance in the previous related research items. The flowchart of the proposed genetic algorithm is illustrated in Figure 2.Figure 2
The flowchart of the proposed genetic algorithm.


### 2.3. Solution Representation

The encryption method used in this study is permutation encryption. In this technique, chromosomes are coded as integers. Each integer is a unique gene for a specific period, and the sequence of integer genes representing genes in a chromosome determines the order of the sequence of periods to be programmed [25]. For example, a five-gene chromosome represented by 4 3 2 1 5 means that the first period is programmed by the integer 4 for the first time. Next, subsequent courses are followed by others in succession. The length of courses is equal to the total number of courses planned in a course group. If there are four periods for planning, and each of them is planned twice a week, the length of the chromosome is 8.The selection process is based on a short selection. Chromosomes are classified according to their fitness function value from largest to smallest. Some chromosomes, starting from the smallest fitness strands, are replaced by new ones [26]. A new chromosome is obtained by reversing the position of all bits in an old chromosome. Unlike other selection methods, short selection does not copy the best chromosome for the population. For example, Table 1 contains the classified chromosomes of five genes. If the selection probability is 0.4, it means that the number of old chromosomes to be replaced with new ones is 2 = 0.4 × 5. Chromosomes 1 2 5 3 4 are replaced by 4 3 5 2 1, while chromosomes 5 2 3 4 1 are replaced by 1 4 3 2 5.Table 1
Selected chromosomes before crossover.
Chromosomes1 4 5 2 3 13 5 2 1 4 0.952 4 5 1 3 0.71 2 5 3 4 0.55 2 3 4 1 0.3


### 2.4. Crossover Operator

In this research, a random-based crossover is applied. In the operator, the multiplication of chromosomes is performed based on population size and rate of crossover. The number of crossovers and the number of mutations must be the same. An example of a crossover is presented in Figure3.Figure 3
An illustrative example of the crossover operator.


### 2.5. Mutation Operator

In this research, a random-based mutation is applied. For the mutation operator, two cells are selected randomly; then, the value of these cells are moved with each other. An example of mutation is presented in Figure4.Figure 4
An illustrative example of the mutation operator.


### 2.6. Timetable Design

A schedule is actually a schedule that various constraints must accompany. Constraints are almost universally used by people with scheduling problems [16, 18, 20]. Constraints, in turn, are roughly divided into two categories: soft and hard constraints. A hard constraint is a constraint in any work schedule; it does not create any considerations. For example, a lecturer cannot be in two places simultaneously [22, 23]. Soft constraints may be broken, but their violation should be minimized. In addition to constraints, a number of exceptions must be considered when building an automatic scheduling system. For example, each class should be scheduled exactly once, students’ classes should not have two instructors at the same time, and reservations should not be made if the instructor is not available.On the contrary, some classes need special rooms. Some classes must be held consecutively. While soft constraints for some professors prefer hours to be scheduled, most students do not want to have empty courses on their schedule. The distance students have to travel should be kept to a minimum. Classes should be evenly distributed throughout the week, classrooms should be reserved close to their office or home, and classrooms that are much larger than the standard classroom size should be reserved. In addition, there are exceptional limits that have been considered. For example, a part-time instructor can be scheduled for more than six units, while for full-time, it is twelve units.


## 2.1. Proposed Mathematical Model

In this section, an integer linear programming model is presented. In this regard, the principles of proposing a new mathematical model are inspired by [10–14]. Based on modeling from the subject literature [15–17], the objective function of the model is divided into two parts. The first part is for professors, and the second part is for students. Moreover, since it was required to maximize the number of classes in a specific time period, its negative deviations are minimized too. In the following, variables, parameters, and sets are defined. Next, various constraints of the model are presented, and then, the objective of the function and determination of the cost coefficients are presented.


### 2.1.1. Indices and Sets

i: index of coursesj: index of courses’ codel: index of professorsd: index of dayst: index of periodsS: index of student groupsl: the set of courses that must be presentedl1v: a set of one-unit courses (courses that require half a session per week)l2v: sets of two-unit courses (courses that require one session per week)l3v: three-unit course set (courses that require one and a half sessions per week)l4v: four-unit course set (courses that require two sessions per week)llL: courses that can be presented by the L professorlsS: courses in which the sth group of students is applying for registrationJi: the codes that can be provided for the ith courseLi: professors who can teach my course.T: the set of time intervals, T=0,1,2,…TE: set of even time intervals, T=0,2,4,…TO: set of odd time intervals, T=0,1,3,5,…TK: set of time intervals of kth time packets


### 2.1.2. Decision Variables

Xijldt: binary variable takes 1 if the code of the class i is provided at the hour t of day d, and is 0 otherwiseXijldts: binary variable takes 1 if the code j of the class i is provided by the lth professor at the hour t of the day d and the sth group of students participate in it, and 0 otherwiseyij: binary variable will take 1 if the code j of the three-unit class i has two sessions in an odd week and one session in an even week, and if it has one session in an odd week and two sessions in an even week, it will take 0ddkss+,ddkss−: positive and negative deviations of the number of classes of the sth group of students in the tth time block on the day d from the desired number of classesydkss: binary variable is equal to 1 if the sth group of students in the kth time block has class, and 0 otherwiseddksi+, ddksi−: positive and negative deviations of the number of classes of teachers l in the kth time block on the day d from the desired number of classesydksl: binary variable is equal to 1 if a teacher l has a class in kth time block on day d, and 0 otherwisezijl: binary variable is equal to 1 if the teacher l teaches the ith course, and 0 otherwisewijs: binary variable is equal to 1 if group s of students enrolls in code j of course i and 0 otherwise


### 2.1.3. Parameters

Ll: minimum number of hours that the professor l must teach (for faculty members)Ul: maximum number of hours that the lth professor should teach (for professors who are not faculty members)ai: capacity of the ith class (the maximum number of students who can enroll in the ith class)ks: number of students in the sth student groupbdt: number of available rooms for class scheduling in the tth interval from the dth daymld: desired number of classes of the lth teacher in the kth time package on the dth daynks: desired number of classes of the sth student group in the kth time block on the dth dayvi: number of units for the course icijldt: cost factor of the formation of the Jth class of the ith class by the lth teacher at hour t of the day dcijldt': coefficient of the cost of forming the class code J of the ith class by the lth teacher at the hour t of the day d and registering the sth group of students in it.a1: importance of cost factor in the objective functiona2: importance of number of classes (negative deviation) in the objective functiona3: importance of the number of classes (positive deviation) in the objective functiona3: importance of students’ preferences in the class schedulea4: importance of teachers’ preferences in the class schedule


### 2.1.4. Hard Constraints

(1) One-Unit Courses. Constraint (1) has been presented for one-unit courses, which specifies that one of the half-intervals must take the value of one on different days and at different time intervals:(1)∑d∈D∑t∈T∑l∈Lxijldt=1∀i∈l1v,j∈Ji.(2) Two-Unit Courses. For two-unit courses, Constraints (2)-(3) are used. Constraint (2) makes one of the even half-intervals equal to one and is equivalent to the fact that the first part of a class is formed in one of the even half-intervals, and Constraint (3) equals the next half-interval. It places one so that the continuation of the class is also formed exactly after the first half of the class:(2)∑d∈D∑t∈T∑lεLxijldt=1∀i∈l2v,j∈Ji,(3)xijldt=xijldt+1∀i∈l2v,j∈Ji,d∈D,t∈TE,lεLi.(3) Three-Unit Courses. As the courses suggest, for the assignment of these courses, three half-intervals of one must be taken. There are two situations here: either two half intervals of even and one half interval of odd value or two odd half intervals and an even one are taken. Constraints (4)-(5) show that if yij takes the value of one, we will have two even half-intervals and one odd half-interval, and vice versa, if it takes the value of zero:(4)∑d∈D∑t∈TE∑l∈Lxijldt=1+yij∀i∈l3v,j∈Ji,(5)∑d∈D∑t∈TO∑l∈Lxijldt=2−yij∀i∈l3v,j∈Ji.Constraint (6) guarantees that two of the three half intervals that are supposed to have a value of one are consecutive so that it can be considered as a full session:(6)yij−1≤xijldt−xijldt+1≤yij∀lεLi,t∈TE,i∈l3v,∈Ji,d∈D.Constraint (7) guarantees that each course does not have more than two half-periods (one session) per day:(7)∑t∈Txijldt≤2,∀d∈D,i∈l3v,j∈Ji,lεLi.(4) Four-Unit Method. There are four series of constraints for four-unit courses. Constraint (8) makes two of the even half-intervals equal to one, and it is equivalent to the fact that the first part of a class is formed in two even half-intervals. Moreover, Constraint (9) of their next half-interval is equal to that (one) so that the continuation of the class is formed exactly after the first half of the class:(8)∑t∈Ttxijldt=2,∀i∈l3v,j∈Ji,lεLi,d∈D,(9)xijldt=xijldtt+1,∀i∈l4vlεLi,t∈TE,j∈Ji.Constraint (10) guarantees that each four-unit course does not have more than half a period (one session) per day:(10)∑t∈Ttxijldt≤2,∀i∈l4v,j∈Ji,lεLi,d∈D.


### 2.1.5. Constraint of Professors

Constraint (11) guarantees the noninterference of the courses related to each professor in each time period:(11)∑i∈l∑j∈Jixijldt≤1,∀l∈L,d∈D,t∈T.Constraint (12) is related to the minimum and maximum teaching hours of professors, which are the minimum teaching hours for faculty members and the maximum teaching hours for some nonfaculty professors who set a maximum time for teaching:(12)L≤∑d∈D∑t∈TE∑l∈L∑i∈lixijldt≤U,∀l∈L.Constraints (13)-(14) guarantee that each code teaches each course by one and only one professor. If the lth teacher teaches the jth code of the ith course, the variables related to that teacher can take values. The first Constraint (13) makes it possible to be scheduled in the timetable only when a professor has taught the course code. Furthermore, Constraint (14) guarantees that each course code is taught by only one professor:(13)∑i∈li∑j∈lj∑l∈Lxijldt≤vizijs,∀s∈S,i∈lss.j∈J,(14)∑l∈Lizijl=1,∀i∈I,j∈Ji.


### 2.1.6. Constraint of Students

Constraint (15) guarantees the noninterference of courses related to each group of students in each time period:(15)∑i∈Il∑j∈Ji∑l∈Lixijldt≤1,∀s∈S,d∈D,t∈T.Constraint (16) shows that if a course is offered in a day and hour, the number ai of students who apply for that course should register in the code of that course:(16)aixijldt=∑s∈Siksxijldts,∀i∈I,j∈Ji,d∈D,t∈T.Constraints (17) and (18) guarantee that each student group can register one and only one-course code, and if it is registered, the variables related to that code can be set. In fact, the following constraint shows that if course i was presented with vi units for the students of group s, it will be Wijs=1, and the number vi of half the interval will be one.These constraints guarantee that each group of students can register in one and only one of the course codes they want, and if they register, the variables related to that code can be set. In fact, Constraint (17) shows that if course i of code j is presented with vi units for students of the group s, it will be Wijs=1, and the number vi of half interval will be one. Constraint (18) shows that each group of students must register in one code for the courses they want. Moreover, Constraint (19) shows the number of classes available in each time period:(17)∑i∈Il∑j∈Ji∑l∈Lixijldt≤viwijs,∀s∈S,i∈Iss,j∈Ji,(18)∑j∈liwijs=1,∀s∈S,i∈Iss,(19)∑i∈Il∑j∈Ji∑l∈Lixijldt≤bdt,∀d∈D,t∈T.


### 2.1.7. Soft Constraints

The soft constraints include the following. Constraint (20) from the professors’ point of view shows the minimum number of classes that professors want to have in each time frame package:(20)∑i∈Il∑j∈Ji∑t∈Tkxijldtddkll−−ddkll+=mklykdll,∀l∈L,k∈K,d∈D.Constraint (21), which is raised from the perspective of students, shows the minimum number of classes that students have in each time package:(21)∑i∈li∑j∈l∑l∈Li∑t∈Tkxijldt+ddkls−−ddkls+=nksykdss,∀s∈S,k∈K,d∈D.


### 2.1.8. Objective Function

(22)Minz=a1∑i∈li∑j∈l∑l∈Li∑d∈D∑t∈Tcijldtxijldt+a2∑s∈S∑d∈D∑k∈Kddkss−+a3∑s∈S∑d∈D∑k∈Kddkss++a4∑l∈L∑d∈D∑k∈Kydkll++a5∑s∈S∑d∈D∑k∈Kydkss.Equation (22) shows the objective function of the mathematical model. In general, the different parts of the objective function are measured with coefficients a, and their relative importance is determined. The first part is for the cost of forming a class, and the second part is the cost of choosing a class of students. The third and fourth sections try to maximize the number of classes in the time package as much as possible, so its negative deviations are minimized. The fifth section makes the class less time-bound.


## 2.1.1. Indices and Sets

i: index of coursesj: index of courses’ codel: index of professorsd: index of dayst: index of periodsS: index of student groupsl: the set of courses that must be presentedl1v: a set of one-unit courses (courses that require half a session per week)l2v: sets of two-unit courses (courses that require one session per week)l3v: three-unit course set (courses that require one and a half sessions per week)l4v: four-unit course set (courses that require two sessions per week)llL: courses that can be presented by the L professorlsS: courses in which the sth group of students is applying for registrationJi: the codes that can be provided for the ith courseLi: professors who can teach my course.T: the set of time intervals, T=0,1,2,…TE: set of even time intervals, T=0,2,4,…TO: set of odd time intervals, T=0,1,3,5,…TK: set of time intervals of kth time packets


## 2.1.2. Decision Variables

Xijldt: binary variable takes 1 if the code of the class i is provided at the hour t of day d, and is 0 otherwiseXijldts: binary variable takes 1 if the code j of the class i is provided by the lth professor at the hour t of the day d and the sth group of students participate in it, and 0 otherwiseyij: binary variable will take 1 if the code j of the three-unit class i has two sessions in an odd week and one session in an even week, and if it has one session in an odd week and two sessions in an even week, it will take 0ddkss+,ddkss−: positive and negative deviations of the number of classes of the sth group of students in the tth time block on the day d from the desired number of classesydkss: binary variable is equal to 1 if the sth group of students in the kth time block has class, and 0 otherwiseddksi+, ddksi−: positive and negative deviations of the number of classes of teachers l in the kth time block on the day d from the desired number of classesydksl: binary variable is equal to 1 if a teacher l has a class in kth time block on day d, and 0 otherwisezijl: binary variable is equal to 1 if the teacher l teaches the ith course, and 0 otherwisewijs: binary variable is equal to 1 if group s of students enrolls in code j of course i and 0 otherwise


## 2.1.3. Parameters

Ll: minimum number of hours that the professor l must teach (for faculty members)Ul: maximum number of hours that the lth professor should teach (for professors who are not faculty members)ai: capacity of the ith class (the maximum number of students who can enroll in the ith class)ks: number of students in the sth student groupbdt: number of available rooms for class scheduling in the tth interval from the dth daymld: desired number of classes of the lth teacher in the kth time package on the dth daynks: desired number of classes of the sth student group in the kth time block on the dth dayvi: number of units for the course icijldt: cost factor of the formation of the Jth class of the ith class by the lth teacher at hour t of the day dcijldt': coefficient of the cost of forming the class code J of the ith class by the lth teacher at the hour t of the day d and registering the sth group of students in it.a1: importance of cost factor in the objective functiona2: importance of number of classes (negative deviation) in the objective functiona3: importance of the number of classes (positive deviation) in the objective functiona3: importance of students’ preferences in the class schedulea4: importance of teachers’ preferences in the class schedule


## 2.1.4. Hard Constraints

(1) One-Unit Courses. Constraint (1) has been presented for one-unit courses, which specifies that one of the half-intervals must take the value of one on different days and at different time intervals:(1)∑d∈D∑t∈T∑l∈Lxijldt=1∀i∈l1v,j∈Ji.(2) Two-Unit Courses. For two-unit courses, Constraints (2)-(3) are used. Constraint (2) makes one of the even half-intervals equal to one and is equivalent to the fact that the first part of a class is formed in one of the even half-intervals, and Constraint (3) equals the next half-interval. It places one so that the continuation of the class is also formed exactly after the first half of the class:(2)∑d∈D∑t∈T∑lεLxijldt=1∀i∈l2v,j∈Ji,(3)xijldt=xijldt+1∀i∈l2v,j∈Ji,d∈D,t∈TE,lεLi.(3) Three-Unit Courses. As the courses suggest, for the assignment of these courses, three half-intervals of one must be taken. There are two situations here: either two half intervals of even and one half interval of odd value or two odd half intervals and an even one are taken. Constraints (4)-(5) show that if yij takes the value of one, we will have two even half-intervals and one odd half-interval, and vice versa, if it takes the value of zero:(4)∑d∈D∑t∈TE∑l∈Lxijldt=1+yij∀i∈l3v,j∈Ji,(5)∑d∈D∑t∈TO∑l∈Lxijldt=2−yij∀i∈l3v,j∈Ji.Constraint (6) guarantees that two of the three half intervals that are supposed to have a value of one are consecutive so that it can be considered as a full session:(6)yij−1≤xijldt−xijldt+1≤yij∀lεLi,t∈TE,i∈l3v,∈Ji,d∈D.Constraint (7) guarantees that each course does not have more than two half-periods (one session) per day:(7)∑t∈Txijldt≤2,∀d∈D,i∈l3v,j∈Ji,lεLi.(4) Four-Unit Method. There are four series of constraints for four-unit courses. Constraint (8) makes two of the even half-intervals equal to one, and it is equivalent to the fact that the first part of a class is formed in two even half-intervals. Moreover, Constraint (9) of their next half-interval is equal to that (one) so that the continuation of the class is formed exactly after the first half of the class:(8)∑t∈Ttxijldt=2,∀i∈l3v,j∈Ji,lεLi,d∈D,(9)xijldt=xijldtt+1,∀i∈l4vlεLi,t∈TE,j∈Ji.Constraint (10) guarantees that each four-unit course does not have more than half a period (one session) per day:(10)∑t∈Ttxijldt≤2,∀i∈l4v,j∈Ji,lεLi,d∈D.


## 2.1.5. Constraint of Professors

Constraint (11) guarantees the noninterference of the courses related to each professor in each time period:(11)∑i∈l∑j∈Jixijldt≤1,∀l∈L,d∈D,t∈T.Constraint (12) is related to the minimum and maximum teaching hours of professors, which are the minimum teaching hours for faculty members and the maximum teaching hours for some nonfaculty professors who set a maximum time for teaching:(12)L≤∑d∈D∑t∈TE∑l∈L∑i∈lixijldt≤U,∀l∈L.Constraints (13)-(14) guarantee that each code teaches each course by one and only one professor. If the lth teacher teaches the jth code of the ith course, the variables related to that teacher can take values. The first Constraint (13) makes it possible to be scheduled in the timetable only when a professor has taught the course code. Furthermore, Constraint (14) guarantees that each course code is taught by only one professor:(13)∑i∈li∑j∈lj∑l∈Lxijldt≤vizijs,∀s∈S,i∈lss.j∈J,(14)∑l∈Lizijl=1,∀i∈I,j∈Ji.


## 2.1.6. Constraint of Students

Constraint (15) guarantees the noninterference of courses related to each group of students in each time period:(15)∑i∈Il∑j∈Ji∑l∈Lixijldt≤1,∀s∈S,d∈D,t∈T.Constraint (16) shows that if a course is offered in a day and hour, the number ai of students who apply for that course should register in the code of that course:(16)aixijldt=∑s∈Siksxijldts,∀i∈I,j∈Ji,d∈D,t∈T.Constraints (17) and (18) guarantee that each student group can register one and only one-course code, and if it is registered, the variables related to that code can be set. In fact, the following constraint shows that if course i was presented with vi units for the students of group s, it will be Wijs=1, and the number vi of half the interval will be one.These constraints guarantee that each group of students can register in one and only one of the course codes they want, and if they register, the variables related to that code can be set. In fact, Constraint (17) shows that if course i of code j is presented with vi units for students of the group s, it will be Wijs=1, and the number vi of half interval will be one. Constraint (18) shows that each group of students must register in one code for the courses they want. Moreover, Constraint (19) shows the number of classes available in each time period:(17)∑i∈Il∑j∈Ji∑l∈Lixijldt≤viwijs,∀s∈S,i∈Iss,j∈Ji,(18)∑j∈liwijs=1,∀s∈S,i∈Iss,(19)∑i∈Il∑j∈Ji∑l∈Lixijldt≤bdt,∀d∈D,t∈T.


## 2.1.7. Soft Constraints

The soft constraints include the following. Constraint (20) from the professors’ point of view shows the minimum number of classes that professors want to have in each time frame package:(20)∑i∈Il∑j∈Ji∑t∈Tkxijldtddkll−−ddkll+=mklykdll,∀l∈L,k∈K,d∈D.Constraint (21), which is raised from the perspective of students, shows the minimum number of classes that students have in each time package:(21)∑i∈li∑j∈l∑l∈Li∑t∈Tkxijldt+ddkls−−ddkls+=nksykdss,∀s∈S,k∈K,d∈D.


## 2.1.8. Objective Function

(22)Minz=a1∑i∈li∑j∈l∑l∈Li∑d∈D∑t∈Tcijldtxijldt+a2∑s∈S∑d∈D∑k∈Kddkss−+a3∑s∈S∑d∈D∑k∈Kddkss++a4∑l∈L∑d∈D∑k∈Kydkll++a5∑s∈S∑d∈D∑k∈Kydkss.Equation (22) shows the objective function of the mathematical model. In general, the different parts of the objective function are measured with coefficients a, and their relative importance is determined. The first part is for the cost of forming a class, and the second part is the cost of choosing a class of students. The third and fourth sections try to maximize the number of classes in the time package as much as possible, so its negative deviations are minimized. The fifth section makes the class less time-bound.


## 2.2. The Structure of the Genetic Algorithm

The genetic algorithm (GA) is a classic metaheuristic algorithm based on the evolutionary ideas of natural selection and genetics [18]. In this way, GA represents the intelligent use of a random search algorithm to solve optimization problems. Although genetic algorithms use random phenomena, it has an evolutionary process to achieve the best possible solution [19]. The main aspects of GA are designed in such a way that they can simulate the processes necessary for evolution in natural systems. Among the most important of these processes are those that follow the laws that were first proposed by Charles Darwin and named “Survival of the Fittest.” The reason for this is that, in nature, the competition between living organisms to obtain scarce resources leads to the dominance of the fittest organisms over the weaker ones [20, 21].In order to solve mathematical models using genetic algorithms, it simulates the principle of fitness with an encoding scheme. It produces several solutions as a “generation.” Each generation contains a population of strings of characters that are similar to the chromosomes found in our DNA. Each person (solution) will represent a point in the search space and a possible solution. Next, the members of each generation enter into a process similar to the process of evolution of living organisms [22].Genetic algorithms operate using specific principles, such as the genetic structure and behavior of chromosomes in a population of individuals [23]. These basics are(i)
Selecting a set of solutions and generating new solutions using crossover and mutation(ii)
Members who are more successful in each competition produce more offspring than members who do not perform well(iii)
Genes from good-performing members spread within the population, so good parents sometimes produce offspring that are better than either parentTherefore, each successive generation will be better suited to live in its surroundings. A summary of the steps of the genetic algorithm is presented in Figure1.Figure 1
The main operators in genetic algorithm.To use a genetic algorithm, a population of individuals is maintained within a search space. Each of these people is actually a possible solution to the problem. Each member is coded with a finite-length vector of components or variables and with the help of special alphabets. These special alphabets are usually binary alphabets. To implement a genetic algorithm structure, each member is interpreted as a chromosome which is known as solution representation. Therefore, a chromosome (a solution to the problem) consists of several genes (variables). To show the abilities of each member to compete with other members of the population, each possible answer is assigned a fitness score. The member with an optimal fitness score (or, more generally, close to optimal) is our favorite [24, 25]. The main reason for choosing GA for optimizing the proposed mathematical model is its acceptable performance in the previous related research items. The flowchart of the proposed genetic algorithm is illustrated in Figure 2.Figure 2
The flowchart of the proposed genetic algorithm.


## 2.3. Solution Representation

The encryption method used in this study is permutation encryption. In this technique, chromosomes are coded as integers. Each integer is a unique gene for a specific period, and the sequence of integer genes representing genes in a chromosome determines the order of the sequence of periods to be programmed [25]. For example, a five-gene chromosome represented by 4 3 2 1 5 means that the first period is programmed by the integer 4 for the first time. Next, subsequent courses are followed by others in succession. The length of courses is equal to the total number of courses planned in a course group. If there are four periods for planning, and each of them is planned twice a week, the length of the chromosome is 8.The selection process is based on a short selection. Chromosomes are classified according to their fitness function value from largest to smallest. Some chromosomes, starting from the smallest fitness strands, are replaced by new ones [26]. A new chromosome is obtained by reversing the position of all bits in an old chromosome. Unlike other selection methods, short selection does not copy the best chromosome for the population. For example, Table 1 contains the classified chromosomes of five genes. If the selection probability is 0.4, it means that the number of old chromosomes to be replaced with new ones is 2 = 0.4 × 5. Chromosomes 1 2 5 3 4 are replaced by 4 3 5 2 1, while chromosomes 5 2 3 4 1 are replaced by 1 4 3 2 5.Table 1
Selected chromosomes before crossover.
Chromosomes1 4 5 2 3 13 5 2 1 4 0.952 4 5 1 3 0.71 2 5 3 4 0.55 2 3 4 1 0.3


## 2.4. Crossover Operator

In this research, a random-based crossover is applied. In the operator, the multiplication of chromosomes is performed based on population size and rate of crossover. The number of crossovers and the number of mutations must be the same. An example of a crossover is presented in Figure3.Figure 3
An illustrative example of the crossover operator.


## 2.5. Mutation Operator

In this research, a random-based mutation is applied. For the mutation operator, two cells are selected randomly; then, the value of these cells are moved with each other. An example of mutation is presented in Figure4.Figure 4
An illustrative example of the mutation operator.


## 2.6. Timetable Design

A schedule is actually a schedule that various constraints must accompany. Constraints are almost universally used by people with scheduling problems [16, 18, 20]. Constraints, in turn, are roughly divided into two categories: soft and hard constraints. A hard constraint is a constraint in any work schedule; it does not create any considerations. For example, a lecturer cannot be in two places simultaneously [22, 23]. Soft constraints may be broken, but their violation should be minimized. In addition to constraints, a number of exceptions must be considered when building an automatic scheduling system. For example, each class should be scheduled exactly once, students’ classes should not have two instructors at the same time, and reservations should not be made if the instructor is not available.On the contrary, some classes need special rooms. Some classes must be held consecutively. While soft constraints for some professors prefer hours to be scheduled, most students do not want to have empty courses on their schedule. The distance students have to travel should be kept to a minimum. Classes should be evenly distributed throughout the week, classrooms should be reserved close to their office or home, and classrooms that are much larger than the standard classroom size should be reserved. In addition, there are exceptional limits that have been considered. For example, a part-time instructor can be scheduled for more than six units, while for full-time, it is twelve units.


## 3. Numerical Results

Some tests are conducted to make sure how the system works. There are four groups of courses from year 1 to year 4. In experiments, we want to create a timeline for a particular semester’s data. A certain number of courses and professors are planned.From Table2, it can be concluded that nM=7,nT=3,nL=9,nC=2,nD=5,andnH=10, and all chromosome genes include m1, t0, l1, m2, t0, l2, m3, t0, l2, m4, t0, l3, m5, t0, l6, m6, t0, l5, m7, t1, l6, m7, t1, and l7.Table 2
The relation between all sets.
Course nameLectureLabABunitsABunitsICT(m1)Budi Berlinton(l1)3Monika (l8)Monika (l8)2Calculus 1(m2)Nababan(l2)2Finela (l9)Finela (l9)2Calculus 2(m3)Nababan(l2)2IPE(m4)Sutrisno(l3)4Andree (l10)Andree (l10)2Discrete math(m5)Samuel(l4)4Statistics(m6)Gunawan(l5)3Gunawan (l5)2Reading skills(m7)Univ (l6)Univ (l7)22This means that there are 13 columns and 100 rows in the target matrix after receiving the basic data, such as what room can be used for a specific teacher in a limited time and day, and also according to the capacity of that room. This system is run with ten chromosomes in a population, and ten generations are set in the experiment. Regardless of the probability of selection, crossover, and mutation, the maximum of the best value of the fitness function, i.e., 1, is obtained. This means that less time is needed to develop the program, and all courses can be planned based on it.The timetable in which the class session will be held should also be defined. The system can define the available room for it, so after assigning a room, the status of that room is no longer available for that day and time.


### 3.1. Findings

As previously mentioned, the problem is planned and solved in conjunction with real data taken from the Faculty of Electrical Engineering of one of the international universities, which we will discuss below, to discuss the findings of the proposed model. This problem contains five courses with three units, three courses with two units, and one course with one unit, for a total of 39 units (39 half intervals). Table3 contains a list of courses with descriptions. Furthermore, it has nine professors; each professor can teach a few or no courses. Moreover, Table 4 includes information on professors. These courses are available for twelve different student classes (groups of ten).Table 3
The available list of courses and their specifications.
Course codeCourse titleCode of professors who can teachNumber of course unitsGroups of applicant studentsNumber of codes available1Electric car 31 and 6311-9-8-5-4-322Airline design and project131-5-1013Special electric machines2 and 8312-10-9-6-5-124Power system analysis2 and 432-6-7-8-9-1125Special topics4 and 532-3-4-6-7-1226Technical reporting337-4-217Digital systems 3321-3-5-8-9-1128Numerical calculations722-3-7-4-10-1229Ethics911-6-8-10-11-122Table 4
List of students and their characteristics.
Elective course codesCollect unit12-3-7-9924-5-6-81031-5-7-81041-5-6-81151-2-3-71063-4-5-91074-5-6-8981-4-7-9991-3-4-711102-3-8-99111-4-7-99122-3-8-99Since each class has a capacity of 30 students, each class must enroll three groups of students, as shown in Table5. In each section, there are between nine and eleven selected units. Every week, we have three working days. It is also considered, given that we have 39 credits and the institute’s objectives of broadcasting activities in the classroom. There are a few details in the model that is not included. There are no minimum or maximum time constraints for professors, for example. All objective coefficients are set to one since we are just searching for a reasonably suitable response and testing the model’s correctness. Two-time packages per day (morning and evening) are considered, with at least three-morning classes and four-evening classes.Table 5
List of available professors and their specifications.
Professors codeCourse codesAvailable time periods11-2Day 1 and morning of day 323-4Day 3 and morning of day 234-5Day 245Morning of day 2 and morning of day 358Day 163Morning of day 1 and morning of day 279Evening of day 3The problem’s outputs are provided using the GAMS software. The outputs are divided into three categories after extracting and classifying the variables that take the value: the first category is the institution’s results, the second category is the professors’ results, and the third category is the students’ results. Table6 will be used to display the following results.Table 6
Schedule class variables.
0123456789Day 1X31812X11114X11115X12116X12117X21118X2119Day 2X31820X52521X51522X32223X72324X72325X72326X71327X61328X61329X41220X42221X51523Day 3X11130X51531X21133X12132X42234X422355X41236X41237X32230X32231X52533X52532After converting the final solution to the schedule, we reach the following schedule. It should be noted that there is a break between 3 and 4 (two hours for lunch from 12 to 14). The results are presented in Tables7 and 8.Table 7
Schedule of the institution.
8–10 AM10–12 AM2–4 PM4–6 PM6–8 PMDay 1Numerical calculations code 1Special electric machines code 1Electric car 3 code 1Electric car 3 code 2Airline design and project code 1Day 2Operations research code 1 (f)Electric machines for code 2 (g) special topics for code 1Electricity generation code 2Electricity generation code 1Technical reporting code 1Day 3Special topics code 2 (g)“Electric machines 3 code 2 (F)Code analysis of power system code 2Code analysis power system 1—Table 8
Assignment of courses to professors.
RowCourseCourse codeCourse professor codeProfessor1Electric machine 3Code 11A2Electric machine 3Code 21A3Airline design and projectCode 11A4Special electric machinesCode 18B5Special electric machinesCode 22C6Power system analysisCode 12C7Power system analysisCode 22C8Special topicsCode 15D9Special topicsCode 25D10Technical reportingCode 13E11Electricity generationCode 13E12Electricity generationCode 23E13Numerical topicsCode 18F14Numerical topicsCode 28F15EthicsCode 19G16EthicsCode 29G


## 3.1. Findings

As previously mentioned, the problem is planned and solved in conjunction with real data taken from the Faculty of Electrical Engineering of one of the international universities, which we will discuss below, to discuss the findings of the proposed model. This problem contains five courses with three units, three courses with two units, and one course with one unit, for a total of 39 units (39 half intervals). Table3 contains a list of courses with descriptions. Furthermore, it has nine professors; each professor can teach a few or no courses. Moreover, Table 4 includes information on professors. These courses are available for twelve different student classes (groups of ten).Table 3
The available list of courses and their specifications.
Course codeCourse titleCode of professors who can teachNumber of course unitsGroups of applicant studentsNumber of codes available1Electric car 31 and 6311-9-8-5-4-322Airline design and project131-5-1013Special electric machines2 and 8312-10-9-6-5-124Power system analysis2 and 432-6-7-8-9-1125Special topics4 and 532-3-4-6-7-1226Technical reporting337-4-217Digital systems 3321-3-5-8-9-1128Numerical calculations722-3-7-4-10-1229Ethics911-6-8-10-11-122Table 4
List of students and their characteristics.
Elective course codesCollect unit12-3-7-9924-5-6-81031-5-7-81041-5-6-81151-2-3-71063-4-5-91074-5-6-8981-4-7-9991-3-4-711102-3-8-99111-4-7-99122-3-8-99Since each class has a capacity of 30 students, each class must enroll three groups of students, as shown in Table5. In each section, there are between nine and eleven selected units. Every week, we have three working days. It is also considered, given that we have 39 credits and the institute’s objectives of broadcasting activities in the classroom. There are a few details in the model that is not included. There are no minimum or maximum time constraints for professors, for example. All objective coefficients are set to one since we are just searching for a reasonably suitable response and testing the model’s correctness. Two-time packages per day (morning and evening) are considered, with at least three-morning classes and four-evening classes.Table 5
List of available professors and their specifications.
Professors codeCourse codesAvailable time periods11-2Day 1 and morning of day 323-4Day 3 and morning of day 234-5Day 245Morning of day 2 and morning of day 358Day 163Morning of day 1 and morning of day 279Evening of day 3The problem’s outputs are provided using the GAMS software. The outputs are divided into three categories after extracting and classifying the variables that take the value: the first category is the institution’s results, the second category is the professors’ results, and the third category is the students’ results. Table6 will be used to display the following results.Table 6
Schedule class variables.
0123456789Day 1X31812X11114X11115X12116X12117X21118X2119Day 2X31820X52521X51522X32223X72324X72325X72326X71327X61328X61329X41220X42221X51523Day 3X11130X51531X21133X12132X42234X422355X41236X41237X32230X32231X52533X52532After converting the final solution to the schedule, we reach the following schedule. It should be noted that there is a break between 3 and 4 (two hours for lunch from 12 to 14). The results are presented in Tables7 and 8.Table 7
Schedule of the institution.
8–10 AM10–12 AM2–4 PM4–6 PM6–8 PMDay 1Numerical calculations code 1Special electric machines code 1Electric car 3 code 1Electric car 3 code 2Airline design and project code 1Day 2Operations research code 1 (f)Electric machines for code 2 (g) special topics for code 1Electricity generation code 2Electricity generation code 1Technical reporting code 1Day 3Special topics code 2 (g)“Electric machines 3 code 2 (F)Code analysis of power system code 2Code analysis power system 1—Table 8
Assignment of courses to professors.
RowCourseCourse codeCourse professor codeProfessor1Electric machine 3Code 11A2Electric machine 3Code 21A3Airline design and projectCode 11A4Special electric machinesCode 18B5Special electric machinesCode 22C6Power system analysisCode 12C7Power system analysisCode 22C8Special topicsCode 15D9Special topicsCode 25D10Technical reportingCode 13E11Electricity generationCode 13E12Electricity generationCode 23E13Numerical topicsCode 18F14Numerical topicsCode 28F15EthicsCode 19G16EthicsCode 29G


## 4. Conclusion

The scheduling problem is one of the issues that has been the focus of many researchers in recent years. This problem is used in different fields in the real world. One of the practical aspects in which the scheduling problem is used is the scheduling problem of university courses, which is a complex decision-making issue at the beginning of each academic semester for university teaching groups. Educational groups in universities have always been in pursuit of providing courses and having a suitable timetable schedule according to the needs and educational laws. This issue has received more attention in recent years, and today, it has been raised as a decision-making issue. One of the most challenging tasks for university administrators and planners is scheduling university courses. The presence of multiple and overlapping constraints in planning is the primary cause of these difficulties. On the one hand, students and professors each have their own set of constraints. As an influential factor, university rules can impose constraints on planning in this region.The proposed genetic algorithm and heuristic search are able to solve the timetable scheduling problem in academic institutions. The main finding of this research is that using the proposed approximate solution method can provide some solutions that satisfy all constraints, including the students’ and professors’ preferences. In this regard, in the optimal solution, planning includes allocating the courses to the available time periods which are achieved in a way that student satisfaction is maximized. Although some entities, such as class location, are not included in the target matrix, the system is able to determine which room to use for a specific cell in a timeline. If it is placed in the target matrix, it is likely that instead of adding the number of columns, a three-dimensional target matrix will be created.On the other hand, there are limitations in this study that will be solved as a problem in the future. First, each parallel class of a subject group shown in a target matrix must be scheduled for each period defined in that timetable. Secondly, a course is only possible if it has at least the number of course units in the target matrix. If that period is divided into two parts, the name of that period must be different, and it can be assumed as two periods. Third, the system’s main goal is to maximize the number of successful units in planning. Otherwise, it should be designed based on that definition.On the contrary, using the proposed mathematical modeling tools is suggested as an effective method for scheduling university classes. This model helps in the optimization of mathematical relationships in order to achieve the best possible solution to a variety of problems. The results of this study show that the use of optimization tools can create a straightforward program with all possible constraints.



---

*Source: 5505631-2022-10-15.xml*