H IGHLY C ONSTRAINED U NIVERSITY C LASS S CHEDULING U SING A NT C OLONY O PTIMIZATION

Solving University Class Scheduling Problem (UCSP) is a complex real-world combinatorial optimization task that has been extensively studied over the last several decades. Many meta-heuristic based techniques, including prominent swarm intelligence (SI) methods have been investigated to solve it in different ways. In this study, Ant Colony Optimization (ACO) based two methods are investigated to solve UCSP: ACO based method and ACO with Selective Probability (ACOSP). ACO is the well-known SI method that differs from other SI based methods in the way of interaction among individuals (i.e., ants); and an ant interacts with others indirectly through pheromone to solve a given problem. ACO based method considers probabilistically all the unassigned time slots to select next solution point for a particular course assignment. In contrast, ACOSP probabilistically selects next solution point for a particular course assignment from the selective probabilities. Such selective probability employment with ACO improves performance but reduces computational cost. The performances of the proposed methods have been evaluated comparing with Genetic Algorithm (GA) in solving real-world simple UCSPs. In addition, proposed methods are compared with each other for solving highly constrained UCSPs. Both the proposed methods outperformed GA and ACOSP was the best to solve the given problems.


INTRODUCTION
University Class Scheduling Problem (UCSP) is a scheduling problem concerned with assignment of classes for instructors and students among suitable time slots satisfying a set of constraints. UCSP can be described as: given a set of classes, a set of (contiguous) time slots, a set of students, and a set of instructors, the task is to assign classes to time slots for instructors and students satisfying a set of hard and soft constraints. Mathematically, the UCSP is defined as triple

C C i 
There are usually two types of constrains involved in UCSP: hard constraints [1,2,7] and soft constraints [1,2,7]. Hard constraints must be satisfied completely so that the generated solutions become feasible solutions. Soft constraints which are related with objective function and they must be satisfied as much as possible, but it is not necessary that soft constraints are being satisfied as hard constraints. UCSP has to maintain various types of constraints such as 22 instructors' constraints, students' constraints, rooms' constraints, and administrative constraints etc. The main feature of UCSP is to satisfy soft constraints as much as possible where there must be no violation of hard constraint. The main purpose of the study is to solve course scheduling problem of Khulna University of Engineering & Technology (KUET).It is to be noted that both hard and soft constraints may vary from university to university.
The UCSP has been extensively studied over the last 25 years [5]. Different Swarm Intelligence (SI) based techniques are investigated to solve UCSP. The popular SI based techniques are adaptive Particle Swarm Optimization (PSO) [2], PSO based algorithm with local search [3], PSO with interchange heuristic [14] and honey-bee mating optimization algorithm [11] are well studied for solving UCSP. Hybrid Particle Swarm Optimization (HPSO), one of the most recent algorithms, includes features to consider instructor's preferences, and employs a repair process updating instructor timetable with re-generated feasible time slots to solve UCSP [4].There are also different meta-heuristic based techniques such as Tabu Search (TS) based techniques [9,10] and Genetic Algorithm (GA) based techniques [6,8] have been investigated to solve UCSP. Moreover, other well-known techniques are also found effective to solve UCSP in the literature [12,13]. Ant Colony Optimization (ACO) is another well-known SI based method which has not been used to solve UCSP. Therefore, there is a scope to solve UCSPs using ACO based methods.

METHODOLOGY
There are two main reasons for solving UCSP is a challenging task. The first reason is the exponential growth problem of this problem is due to the faster growth students and secondly the numbers of constraints are varied from university to university. The proposed method follows ACO based strategy to solve UCSP. Based on this, two algorithms are proposed: ACO and ACO with Selective Probability (ACOSP). Originally, ACO was implemented for Travelling Salesman Problem (TSP), a well-known combinatorial optimization problem. To solve TSP using ACO, the number of cities is considered equal to the number of ants. But, in our proposed methods, each ant represents an UCSP solution. In the proposed method, the individual instructor's suitable solutions are found by calculating total preference value. The formula for calculating fitness of individual instructor, iif is given by-    The impact of the pheromone and the heuristic information can be weighted by parameters α and β respectively and the pheromone matrix is given by simple method for computing the heuristic information is the following: counts the additional number of soft constraints violations caused by Let Agbest be the assignment of the best solution found since the beginning. The following update rule is used: Here ρ is pheromone evaporation coefficient. The fitness of the UCSP solution is measured for k number of instructors is given by- Incorporation of selective probability (SP) technique with the ACO to form a novel algorithm named ACOSP in which probabilities of suitable unassigned time slots, instead of all the unassigned time slots is maintained to select a particular time slot. As a result, better result will be obtained. Another benefit of incorporating selective population is to provide better convergence.

ACO to Solve UCSP
In the proposed ACO based algorithm, each ant constructs a UCSP solution by choosing time slot of classes probabilistically. The probability of choosing time slots of classes is a function of pheromone value and heuristic information. The less conflicting (i.e., high heuristic value) route will be increasingly enhanced, and therefore become more attractive. On the other hand, more conflicting route will eventually disappear because pheromones are volatile. Initially, different ants construct different solutions. Overtime, the solutions will converge to a single optimal UCSP solution.
The pseudo code of proposed ACO based algorithm is given below:

ACO with Selective Probabilities (ACOSP) to Solve UCSP
The ACO based method use all unassigned time slots to select a particular time slot. The unassigned suitable time slot has chance to produce better optimal UCSP solution than the all unassigned time slots. To utilize this, modifications of the ACO is made and incorporate selective population to form another algorithm named ACOSP in which probabilities of suitable unassigned time slots, instead of all the unassigned time slots is maintained to select a particular time slot. As a result, better result will be obtained. Another benefit of incorporating selective probabilities is to provide better convergence. The bold text shows difference of these two algorithms.
The pseudo code of proposed ACOSP based algorithm is given below:

EXPERIMENTAL STUDIES
In the experimental environment, both instructors 'flexibility, and students' flexibility is considered. Due to the complexity of developing such type of algorithm, configuring of the algorithms are strongly relied on an experimental methodology. The instructors' preferences are varied from 0 to 5. 0 means lowest preference and 5 means highest preference. Experiments with real-world input data coming from department of Computer Science and Engineering (CSE) of Khulna University of Engineering & Technology (KUET) have been conducted. In KUET, there are 5 days for teaching in a week and 9 teaching hours for each day. Two instructors conduct a theory course and there is a common class between them. Moreover, two instructors must conduct a laboratory course and the duration of each laboratory class is three consecutive time slots. The experiments have been done with real data which is even term data of CSE for course schedule. The simulation of the ACO and ACOSP on UCSP has been performed on a PC (Intel Core 2 Duo E7500 @ 2.93 GHz CPU, 2GB RAM, Win2007 OS). The algorithm is implemented in C++ programming language on Code Blocks 10.05.

Experiments on Simple Environment
In the simple environment, only theory courses are considered and they must be assigned among the first six periods for every instructor. Also, all the classes of a particular course will be conducted by only one instructor. A comparison is made among GA, ACO based, and ACOSP method to solve UCSP for simple environment. The proposed ACO and ACOSP methods already been discussed. In the following, it will discuss about how the UCSP solution is encoded in the GA based method. Every solution is considered with one vector for UCSP, with the length of the vector equal to the number of theory classes.  The fitness of a solution is computed so that particular solution can be preferred than all other solutions. The fitness of solution is calculated using Eq. (5). Table 1 consists of which course related to which batch and also credit hour of each course. Table  2 consists of number of courses of each instructor and which instructor will conduct which course.

Experimental Analysis
A small data set is considered to conduct the experiment where 8 instructors, 10 courses, and 2 batches. The experiment is conducted varying population size and number of iterations. The individual fitness value is calculated using eq. (1) and UCSP fitness value is calculated using eq. (5). Actually, the UCSP fitness values are plotted against number of iteration and population. The experimental results are given after 10 trials. In Figure 2, 100 iterations are set for GA, ACO methods and 10% selective probability for ACOSP method. In this case the population size is varied. In Figure 3, 100 population is set for all three methods. In this case the numbers of iterations are varied.
It is seen from Figure 2 and Figure 3; the proposed two algorithms have better fitness value than that of GA. The main reason is GA assigns courses to the time slot without considering probabilities of time slots. Whereas both ACO and ACOSP calculate probabilities of time slot before selecting a particular time slot. Therefore, there is a chance to choose suitable time slots. On the other hand, ACOSP method provides better result than ACO method. The main reason is ACOSP maintains

Experiments on Highly Constrained Environment
In highly constrained environment, both theory and laboratory courses are considered. Two instructors conduct a class each and a common class for the theory course and the laboratory course must be conducted by two instructors using three consecutive time slots. In this environment, larger data set is considered than the simple environment. GA is excluded for highly constrained environment because it is quite difficult to encode a solution in such environment.

Input Data Preparation
For input data, 35 instructors, 37 courses, and 4 batches is considered. Table 3 consists of which course related to which batch and also credit hour of each course. Odd number of courses is treated as theory courses and even number of courses is treated as laboratory courses. Table 4 consists of number of courses of each instructor and which instructor will conduct which course.

Experimental Analysis
For highly constrained environment, r data consisting of 35 instructors, 37 courses, and 4 batches is considered to conduct the experiment. Experiment is conducted by varying number of iterations and number of ants. The individual fitness value is calculated using eq. (1) and UCSP fitness value is calculated using eq. (5). Actually, the UCSP fitness values are plotted against number of iteration and population or ant. The experimental results are given after 10 trials. In Figure 4, 300 ants are set for both the methods. In this case the numbers of iterations are varied. In Figure 5, 200 iterations are set for ACO method and 200 iterations with 50% selective population for ACOSP method. In this case the numbers of ants are varied. Figure 4 and Figure 5 represents the comparison of proposed ACO and ACOSP based methods for the same size of data varying number of iterations and number of ants respectively. From the above experimental data, it is seen that with the same volume of data and varying number of iterations and number of ants, the average fitness of solution is significantly improved in the ACOSP method rather than ACO method (Figure 4 and Figure 5 where bold line shows fitness of ACOSP method and dotted line shows the fitness of ACO method). Because, incorporating selective probabilities for unassigned suitable time slots with ACO has more pheromone value and more heuristic information for a particular time slots.
This pheromone value and heuristic information value is directly involved to calculate the probability of time slots. Thus, ACOSP considers some better of probabilities of time slots  rather than all the time slots. It indicates that better probabilities of time slots have more chance to be chosen. On the other hand, ACO algorithm selects time slots probabilistically for assigning the courses among all the unassigned time slots. Moreover, it is seen from the figures (Figure 4 and Figure 5), if the number of iterations and number of ants are increased the fitness of both algorithms are also increased. The main reason is that more number of iterations and more number of ants are able to find better solution.
From the experimental result it is seen that the ACOSP algorithm performs better than ACO algorithm i.e., better quality of UCSP solution as it operates with suitable time slots to select a particular time slot. On the other hand, ACO operates with all the unassigned time slots. Therefore, less chance the pheromone will be deposited to suitable time slots resulting better path of pheromone trail will be disappeared. Consequently, decrease the quality of the UCSP solution.
It is also seen that number of iteration ( Figure 4) and population or ant ( Figure 5) increases the fitness value is increases. The main reason is that both exploration and exploitation is increases area of the search space which guides the solution towards better solution. Solution is converged at 1000 iteration (Figure 4) and at 500 ant ( Figure 5) and optimum solution is found.

CONCLUSION
Solving Constrained Satisfaction Problem (CSP) has been an active research area for several decades. University Class Scheduling Problem (UCSP) is one of the most popular CSP and interest grows in last few years to solve it novel ways. Recently, Swarm Intelligence (SI) based methods had drawn great attraction to solve UCSP. In this paper an Ant Colony Optimization (ACO) and ACO with selective probability (ACOSP) methods are used for solving UCSPs. The experiment has been conducted for two different environments: simple and highly constrained. Varying number of ants/population size and number of iterations, at first a comparison is made for proposed ACO and ACOSP based methods with GA for simple environment. The experimental result shown that ACOSP based method performs better than GA and ACO based method. Then ACO and ACOSP based methods are applied for the highly constrained environment. From the experimental outcome it is shown that ACOSP based method is better than ACO based method. The main contribution is ACO algorithm is formulated and modified to solve course scheduling problem of KUET. The proposed algorithms are limited to applicable for particular domain of problem. In the future, the performance could be improved using more robust SI based algorithms. It is possible to solve similar domain or topic of problem with such algorithms.