Anda di halaman 1dari 18

Adapting Immune System Based Algorithms for Class Timetabling Muhammad Rozi Malim Faculty of Computer and Mathematical

Sciences University Technology MARA 40450 Shah Alam, Selangor, Malaysia e-mail: rozi@tmsk.uitm.edu.my Abstract Class timetabling is a highly constrained problem. Metaheuristic approaches have successfully been applied to solve the problem. This paper presents three immune system based algorithms for class timetabling; clonal selection, immune network, and negative selection. The ultimate goal is to show that the immune based algorithms may be adapted as new alternatives for solving class timetabling problems. The algorithms have been implemented on benchmark datasets. Experimental results have shown that all algorithms are good optimization algorithms. The algorithms are compared based on fitness values, relative robustness, and CPU times. Tests of hypotheses have significantly shown that the immune network is more effective than the other two algorithms. All algorithms can handle the hard and soft constraints very well. The values of relative robustness have shown that the timetables produced by clonal selection are more robust compared to the other two algorithms. The recorded CPU times have revealed that the immune network has acquired the longest time on all datasets. A comparison with published results has shown that all algorithms are as good as other solution methods. For future work, these algorithms will be employed to other domains of timetabling problems. Keywords: Artificial Intelligence; Timetabling Problem; Artificial Immune System I. INTRODUCTION Various facets of biology have always been the inspiration in developing computational models and problem solving methods. The immune system (IS) has recently drawn significant attention; and as a result, the artificial immune system (AIS) has emerged. In 1986, J.D. Farmer first suggested a possible relationship between immunology and computing [12]. Since then, the field has expanded rapidly, with numerous papers applying AIS to a diverse set of topics ranging from computer security [13] to robotics [20]. The potential application areas of the IS metaphors are those seeking robust and good-enough solutions to problems occurred in dynamic environments [17]. The task of producing robust schedules (large similarity) has a direct analogy with the task faced by the IS [17]; both operate in a dynamic and unpredictable environment. The AISs are relatively new techniques and have been successfully applied to optimization and scheduling problems [2, 3, 10, 18, 19, and 24]. Since timetabling is a special case of scheduling, and treated as optimization by the OR community, the AIS approaches may be adapted for timetabling problems to produce good quality (and robust) timetables. Class timetabling problem (CTP) is a specific case of the more general timetabling problem, and known to be a highly constrained optimization problem. The CTP, widely known as course or lecture timetabling, can be viewed as a multidimensional assignment problem. Given a set of class timetabling data, the problem is to assign teachers to courses, and class events of courses to timeslots and rooms satisfying a set of hard and soft constraints. Many approaches,

including evolutionary algorithms (EAs), Tabu search (TS), simulated annealing (SA), and their hybrids are developed for solving many different types of CTPs. This paper presents three immune system based algorithms, or AIS algorithms, for class timetabling; clonal selection, immune network, and negative selection. The ultimate goal is to show that the algorithms may be adapted as new alternatives for solving CTPs. Another objective is to compare the effectiveness of the algorithms on class datasets. The algorithms are compared based on the fitness values (soft constraint violations), the CPU times, and the relative robustness (similarity between timetables). A comparison with published results is also conducted to show that the algorithms are comparable with other solution methods. II. PROBLEM STATEMENT AND OBJECTIVES Timetabling problems are always studied because of its variety and complexity. The increase in the number of students (and courses) and complexity of program structures mean that timetables are becoming more complex and difficult to schedule. New timetables must be produced for every single semester to take account of staff, student and course changes, causing a large amount of administrative work. Small changes in timetabling data would ruin the feasibility of a timetable. AIS approaches may be applied to produce robust timetables (large similarity timetables). With a set of robust timetables, another feasible timetable (suite the changes) may be selected. In scheduling and AIS, the term robustness is synonym with the flow-shop and job-shop scheduling problems [19, 22] but not timetabling. Heuristic methods are often used to solve timetabling problems. The most popular and well-studied heuristics are metaheuristics which include SA, TS, and EAs. However, many of these approaches lack the robustness. AIS schedules are robust and observed to be robust than schedules produced by a standard genetic algorithm [19]. However, no timetabling researchers have applied AIS algorithms. AIS and Timetabling are two separate disciplines, and there already exist a large number of good timetabling algorithms. 978-1-4244-5651-2/10/$26.00 2010 IEEE 215 The aim of this paper is to introduce a number of AIS algorithms for CTP. The ultimate goal is not to compare the algorithms with other well-established algorithms, but to show that the algorithms may be adapted as new alternative approaches for timetabling problems. The main objectives are as follows: (a) Propose immune system based algorithms for CTP based on three immunological principles (clonal selection, immune network, and negative selection); i.e. three AIS algorithms are considered; (b) Formulate the CTP as a mathematical model; (c) Implement and compare the AIS algorithms on benchmark class timetabling datasets; and (d) Compare the results with other approaches. III. METHODOLOGY This section contains information on the approaches and methods employed to realize the objectives on which this paper is based. Section A outlines a model for CTP, the constraints, a mathematical approach for formulation, and the quality of a feasible timetable. Section B looks at the adaptation of AIS algorithms for CTP, mapping between AIS and CTP, and the main operators for AIS algorithms. Section C summarizes the implementation of the algorithms on class

datasets, a measure for robustness, the techniques to compare the algorithms, and the comparison with published results. A. Class Timetabling Model Nine variables are considered; Department (D), Academicprogram (M), Course (C), Student-group (G), Student (S), Staff (P), Event (E), Timeslot (T), and Room (R). The relationships between variables are represented by matrices. There are two types of matrices, input and output. The number of input matrices depends on the available timetabling data while the number of output matrices depends on the desired timetables. An input matrix shows the connection between two variables, and an output shows a timetable. Based on the nine variables, the hard and soft constraints are formulated using 0-1 integer programming (IP) approach. The formulation uses a logic function L( , , ); a function of timetabling variables, always has a logic value of either 0 or 1. Each logic function is unique and can only be applied for a particular constraint. For problems with a large number of hard constraints (over-constrained), obtaining timetables that satisfy all the hard constraints at once is reasonably difficult a constraint relaxation mechanism is usually employed. The relaxed hard constraints are considered as soft and will be satisfied during an improvement process. One must introduce a sort of hierarchy upon relaxed constraints. A weight is then proposed for each constraint. This weight allows the setting of a partial order relation between constraints. The lower the value of the weight is the more important the constraint is. The quality of a feasible timetable is usually determined by a set of different soft constraints. The constraints are formed as a fitness function (the total violations of the soft constraints - to be minimized). A penalty (weight) function f is required for each of the soft constraints. This function uniquely reflects the importance of each soft constraint in the fitness function. The most important soft constraint would acquire the highest penalty. A timetable with lowest fitness is always considered as the best quality timetable. B. Adapting AIS Algorithms for Class Timetabling The IS can be considered to be a remarkably efficient and powerful information processing system which operates in a highly parallel and distributed manner [17]. It contains a number of features which can be adapted in computer systems; recognition, feature extraction, diversity, learning, memory, distributed detection, self-regulation, threshold mechanism, co-stimulation, dynamic protection, and probabilistic detection. It is unnecessary to replicate all of these aspects in a computer model; rather they should be used as general guidelines in designing a system. This section presents a procedure for developing AIS algorithms for CTP. Three immunological principles are considered (clonal selection, immune network, and negative selection), and hence three different AIS algorithms are developed. It is important at this stage to establish an appropriate mapping between the IS and CTP. For some terms, different principles use different names. TABLE I. MAPPING BETWEEN IMMUNE SYSTEM AND CTP Immune System Class Timetabling (CTP) Antibody/immune cell/detector Feasible timetable Gene Event Antigen Cloned & mutated feasible timetable Antigen detectors / lymphocytes Initial population of feasible timetables

Monoclonal antibodies Duplicate/identical timetables Clonal deletion A process to remove duplicate timetables Clone (offspring antibody) Cloned timetable Cloning An operator to produce cloned timetables Mutation An operator to transform cloned timetables into new feasible timetables Genetic variation A process to produce new better quality timetables using cloning & mutation Receptor editing Mutation on a number of events Affinity / Stimulation level Inverse of a fitness value Network Population Metadynamics (antigens and genetic variations) A process to produce a population of mutated feasible timetables Network dynamics (immune cells and antigens interactions) A process to produce a new population of better quality feasible timetables A feasible timetable (antibody, immune cell, or detector) is an integer-valued vector, i.e. a string of events (genes). An initial population is a set of different feasible timetables (antigen detectors or lymphocytes). A duplicate timetable (self-reactive immature lymphocyte) is removed by cloning and mutation (clonal deletion). The fitness value (to be minimized) determines how good a feasible timetable is. The affinity (to be maximized) is inversely proportional to the fitness value. Good timetables (low fitness) are selected for cloning and mutation (genetic variation) using affinity. The primary objective of the cloning is to emphasize good timetables and eliminate bad timetables. So, overall fitness of a population becomes better. Mutation transforms duplicate timetables into different new feasible timetables. As claimed by previous researchers, algorithms based upon the clonal selection principle are adequate to solve optimization and scheduling problems [8, 14, and 18]. However, the other two principles were also applied to solve the same type of problems [1, 5]. The AIS is new in timetabling and no one can claim which principle is the best for timetabling. The clonal selection algorithm (CSA) is 216 inspired by the clonal selection principle [7], the immune network algorithm (INA) is based on the immune network theory [21], and the negative selection algorithm (NSA) is developed using the negative selection mechanism [7]. 1) Initialization Phase of the AIS Algorithms: All three AIS algorithms for CTP use the same initialization phase. An initial population of feasible timetables is generated using a heuristic or a set of heuristics depending on the difficulty of the hard constraints. Some of the heuristics are largest degree, saturation degree, largest weighted degree, largest enrolment, user defined priority groups, and random ordering. These heuristics order the events in some way and attempt to allocate each event to a timeslot (or a number of timeslots), satisfying all the hard constraints. For each timetable, a course is selected (one by one) until all events of all courses have been scheduled. Each event is assigned to staff, timeslots and rooms without violating the hard constraints. If the timetable is unique (no duplicates), it is added to the initial population; otherwise, it is eliminated.

The process is repeated until the number of feasible timetables in the initial population is equal to the population size. 2) Improvement Phase, Stopping Criteria, & Operators: The improvement phase is an iterative optimization process. At each iteration, the current population of feasible timetables is improved (optimized) using the inspired immune principle. The quality of each timetable is measured via a fitness function. This process is repeated until some stopping criteria are met. Generally the stopping criteria are the maximum number of generations and the maximum number of none improvement generations. The main reproduction operators in the improvement phase for all AIS algorithms are cloning and mutation. Cloning copies good timetables from the current population to the next generation population. It is expected that the timetables with lowest fitness (greatest affinity) will have more clones (i.e. the number of clones for a timetable is proportional to its affinity). Mutation transforms duplicate (cloned) timetables into a number of different feasible timetables with better fitness. The algorithm may be converging upon a local optimum, and mutation is a way to avoid getting stuck in local optimum. The multipoint mutation operator is considered for all AIS algorithms. It works by randomly selecting a small number of events, 1% or 2% of the total number of events, and reassign the events to the best available timeslots and rooms (minimize fitness), satisfying all the hard constraints. If the number of selected events is larger, 5% or more, the CPU time would increase exponentially. A small percentage of mutated events would maintain the large similarities between timetables (robust population). Each cloned timetable is mutated according to a mutation probability. The mutation probability of a cloned timetable is inversely proportional to its affinity. 3) Implementation Procedure of AIS Algorithms: This section summarizes how the algorithms are implemented, tested, and compared on benchmark datasets. The algorithms are encoded into C++ programming language. The results (the feasibility of timetables and the fitness values) are validated at the end of each algorithm. Four Schaerf class datasets are used to implement, test, and compare the three algorithms. The problems formulated as 0-1 IP models. These datasets provide a number of benchmark problems for comparison of various timetabling algorithms, and available from www.diegm.uniud.it/satt/ projects/EduTT/CourseTT (original version). Choosing the population size is a fundamental decision faced by all optimization algorithms researchers, and varies from 10 to 1000. If too small a population size is selected, the algorithms will converge too quickly [15]. On the other hand, a population with too many results in long waiting times for significant improvement. Koljonen and Alander [23] confirmed the common belief that decreasing population size increases optimization speed to a certain point, after which premature convergence slows the optimization speed down. The optimization reliability in turn usually increases monotonically with increasing population size. For timetabling algorithms, with complex and variety hard constraints, a population size of 10 feasible timetables is more appropriate. All implementations of the AIS algorithms use size 10. The number of generations (or iterations) seemed to

matter less than the population size. Selecting the number of generations for which an algorithm is run is often trial-anderror process [11]. The optimum number is often a function of the problem. For the three AIS algorithms on Schaerf datasets, the maximum number of generations is fixed to 1000. This would give enough time for the algorithms to converge and improve the fitness. The fixed number of generations would enable us to compare the CPU times on all algorithms. A greater number of generations, say 2000, would produce better fitness for some problems, but the CPU time would increase exponentially. The number of trials for each algorithm on each dataset is depending on the number of different initial populations that the algorithm can produce. For some datasets, it is difficult to produce even one population. For this reason, only 10 trials are applied for each algorithm on each dataset. Hence, each algorithm is required to generate 10 initial populations for each dataset. However, only five trials (best fitness) are selected as the final results. Hart et al. [19] defined robustness as similarity of two schedules and introduced a measure that based on Hamming Distance. The similarity of two schedules is directly compared by counting the number of events that the two schedules differ. For the three AIS algorithms, the robustness is measured for a population of feasible timetables, and not for a single timetable. For each final population produced by each algorithm, the robustness is measured as follows: (i) Compare the similarity of each feasible timetable with other timetables of the same population. For population size 10, there are 45 (10C2) comparisons. (ii) For each comparison, count the number of events with different timeslots/rooms. (iii) Calculate the total differences by summing the values obtained in (ii) from all comparisons. This gives a measure of robustness for a final population. However, the value calculated in (iii) is a large number for a large problem. To compare the robustness of two populations of two different problems, a relative measure of robustness must be determined. This measure should take into account the number of events and the population size. 217 The following measure of robustness for a population of timetables is seemed more reasonable: Relative Robustness = 2 1 1 1 1 / C L(e ,e ) m n n i m j i,j i ,j = = +

, (1) (1) where L(ei,j, ei+1,j) = 1 if ej is assigned at different timeslots /rooms in timetables i and i+1, 0 otherwise; m is the number of events, and n is the population size. Equation (1) represents the average relative differences of timetables in a population. A population with the lowest relative robustness (largest similarity) is considered as the most robust. The AI algorithms are compared based on the fitness values, the relative robustness, and the CPU times. A fitness value represents the total violations of the soft constraints. For each dataset, an algorithm with the lowest fitness is considered as the most effective. The average fitness is also calculated and compared for each dataset based on the best five trials. The values of relative robustness for all AI algorithms on each dataset are calculated using equation (1) and compared to determine which algorithm has produced the most robust population. Note that, the objective of solving timetabling problems is to produce good quality timetables (low fitness), and not to optimize the robustness. The comparison of CPU times (1000 generations) would indicate which algorithm is the fastest (or slowest). The CPU times (in seconds) are recorded on an Intel Celeron M Processor 370 1.5GHz 1.24GB RAM Notebook PC. The averages of the fitness values of the three AI algorithms are further compared using the statistical tests of hypotheses. Assuming the populations of the fitness values are normally and independently distributed, the two tailed ttests (small samples) may be applied to compare the averages. Three t tests were carried out to compare three averages (three algorithms) for each dataset. The sample size is n = 5. For each test, the H0 is two averages are equal and the H1 is two averages are not equal. ince the population variances are unknown, the test statistic t and the degrees of freedom are given by 2 2 2 t = n (X1 X 2 ) / s1 + s ; (2) ( 1)( ) /[( ) ( 2 )2 ] 2 2 2 1 2 2 2 2 = n s1 + s s + s ; (3) where 2 X1, s1 and 2 X2, s2 are the sample means and variances of the fitness val es of two algorithms being compared. Each t statistic (2) is compared with t/2, (t-distributio ) with =0.05. If t-st tistic is less th the correspo di g t/2,, the the ull hypothesis is ot rejected, d it m y be co cluded th t the two ver ges re equ l; otherwise, the ull hypothesis is rejected d the two ver ges re ot equ l. These tests of hypotheses re c rried out o e ch d t set. The best fit ess d the ver ge fit ess v lues for ll

lgorithms d d t sets re comp red with published results [9] to show th t the AIS lgorithms re comp r ble with other solutio methods. The results re comp red b sed o the fit ess v lues, d there were o results v il ble o robust ess d CPU times. IV. ARTIFICIAL IMMUNE ALGORITHMS This sectio prese ts three AIS lgorithms for cl ss timet bli g; clo l selectio , immu e etwork, d eg tive selectio . These lgorithms re developed b sed o the immu ologic l pri ciples d the AIS lgorithms developed by previous rese rchers, d the methodology described i Sectio III. E ch lgorithm m y be pplied to solve wide r ge of cl ss timet bli g problems. As described i Sectio III(B), e ch of the three lgorithms m i ly co sists of two ph ses; i iti liz tio d improveme t. A. Clo l Selectio Algorithm for Cl ss Timet bli g Figure 1 illustr tes the Clo l Selectio Algorithm for Cl ss Timet bli g (CSACT). This lgorithm is developed b sed o the clo l selectio pri ciple [7], AIS lgorithm proposed by Doye et l. [10], d CLONALG developed by de C stro [4]. I the improveme t ph se, t e ch ge er tio (iter tio ), the curre t popul tio is improved (optimized) usi g the clo l selectio pri ciple. Figure 1. Clo l Selectio Algorithm for Cl ss Timet bli g (CSACT) B. Immu e Network Algorithm for Cl ss Timet bli g Figure 2 illustr tes the Immu e Network Algorithm for Cl ss U iversity Timet bli g (INACT). This lgorithm is developed b sed o the immu e etwork theory [21], the ge er l INA by de C stro [4], d the opt- iNET by de C stro d Timmis [6]. I the improveme t ph se, t e ch ge er tio , the curre t popul tio is improved (optimized) usi g the immu e etwork theory. 1. I iti liz tio Ph se: [ s described i Sectio III(B)(1)] 2. Improveme t Ph se: While stoppi g criteri re ot met For e ch timet ble of the curre t popul tio Affi ity ev lu tio : Determi e the ffi ity of e ch timet ble ( ffi ity = 1/fit ess) Determi e the tot l ffi ity of ll timet bles d the mi imum ffi ity Selectio : C lcul te the selectio prob bility for e ch timet ble (= ffi ity/tot l ffi ity) Co struct the cum. selectio prob bilities Ge er te r dom prob bility Select timet ble b sed o cum. probs. Ge etic v ri tio : Clo e copies of the selected tibody ( o. of clo es=pop.size x cum.selectio prob) (clo i g & mut tio ) Determi e mut tio prob (= 1 - sel. prob) For e ch ge er ted clo e (clo ed timet ble) Ge er te r dom prob bility If r dom prob mut tio prob (f ilure) While mut tio = f ilure Mut te - multipoi t mut tio (select sm ll o. of eve ts & re ssig , s tisfyi g ll h rd co str i ts) If o duplic te timet bles determi e the ffi ity of ew clo e If the ffi ity ffi ity (origi l) mut tio = success else mut tio =f ilure, reset mut. else mut tio =f ilure, reset mut tio

Popul tio upd te: If the ffi ity ( ew clo e)> mi ffi ity, s y X, repl ce X with the ew clo e else elimi te the ew clo e else o mut tio & elimi te curre t clo e 218 Figure 2. Immu e Network Algorithm for Cl ss Timet bli g (INACT) C. Neg tive Selectio Algorithm for Cl ss Timet bli g Figure 3 illustr tes the Neg tive Selectio Algorithm for Cl ss Timet bli g (NSACT). This lgorithm is developed b sed o the eg tive selectio mech ism [7], the st d rd NSA proposed by de C stro [4], d the RNS lgorithm by Go z lez et l. [16]. I the improveme t ph se, the i iti l popul tio is improved (optimized) usi g the eg tive selectio mech ism. Figure 3. Neg tive Selectio Algorithm for Cl ss Timet bli g (NSACT) V. IMPLEMENTATION AND EXPERIMENTAL RESULTS I this sectio , the three AIS lgorithms re impleme ted d comp red o four be chm rk cl ss d t sets. The CTPs of the d t sets re formul ted s 0-1 IP models. A. Cl ss Timet bli g Be chm rk D t sets & Formul tio The Sch erf cl ss timet bli g d t sets re the re l-world cl ss timet bli g i st ces from the School of E gi eeri g t the U iversity of Udi e, c lled Sch erf d t sets. The d t sets d ch r cteristics re show i T ble II. TABLE II. SCHAERF CLASS DATASETS AND CHARACTERISTICS D t set No. of Courses No. of Te chers Timeslots per d y No. of Rooms (R) No. of Timeslots (T) Tot l timeslots (RXT) Tot l lectures (L) Co flict De sity Occup cy (L/(RT)) 1 46 39 4 12 20 240 207 4.64% 86.25% 2 52 49 4 12 20 240 223 4.75% 92.92% 3 56 51 4 13 20 260 252 4.61% 96.92% 4 55 51 5 10 25 250 250 4.78% 100% E ch d t set comes i five files; courses.d t co t i s the i form tio bout the courses, periods.d t co t i s the list of two-hour timeslots, curricul .d t co t i s the i form tio bout stude t-groups, co str i ts.d t co t i s i form tio bout u v il bility of timeslots, d rooms.d t co t i s i form tio bout rooms. The cl ss timet bli g horizo is of five d ys; d t sets 1, 2 d 3 h ve four timeslots per d y, while d t set 4 h s five timeslots per d y. The co flicts

de sity shows the perce t ge de sity of the co flict m trix of courses d curricul , d the occup cy shows the perce t ge of the tot l timeslot-rooms required to schedule ll lectures of ll courses. These v lues i dic te the degrees of difficulty of the problems. Obviously, d t set 4 is the most complex d would cquire the lo gest CPU time. The Sch erf CTP for ll d t sets is defi ed s follows (usi g the v ri bles defi ed e rlier). There re 1 pre ssig ed te chers (st ff) pi, i{1,..., 1}, 2 eve ts of courses (lectures) ej, j{1,..., 2}, 3 timeslots tk1, k1{1,..., 3}, d 4 rooms rk2, k2{1,..., 4}. E ch lecture ej h s weekly freque cy f(ej) to be scheduled i disti ct timeslots, d it is tte ded by (ej) stude ts. E ch room rk2 h s c p city cs(rk2), expressed i terms of v il ble se ts. There re lso 5 groups of courses, c lled curricul , gk3, k3{1,..., 5}, such th t y two lectures of curriculum h ve stude ts i commo . For d t sets 1, 2 d 3, there re 20 timeslots per week of five d ys (45), d d t set 4 h s 25 timeslots (55). Five h rd co str i ts re co sidered; (i) ll lectures of ll courses must be scheduled, (ii) two disti ct lectures c ot t ke pl ce i the s me room d timeslot, (iii) lectures of courses (s me curriculum) must be scheduled t differe t timeslots, (iv) lectures of courses t ught by the s me te cher must be scheduled t differe t timeslots, d (v) te chers might be ot v il ble for some timeslots. Three soft co str i ts re co sidered d used to ev lu te the fit ess v lue of e ch timet ble; (vi) the umber of stude ts th t tte d course should ot exceed the umber of se ts of ll rooms th t host its lectures, (vii) the lectures of e ch course should be spre d i to ot less th specified mi imum umber of d ys, d (viii) the d ily schedule of lectures (s me curriculum) should be s comp ct s possible, 1. I iti liz tio Ph se: [ s described i Sectio III(B)(1)] 2. Improveme t Ph se: While stoppi g criteri re ot met For e ch fe sible timet ble of the curre t pop Determi e the fit ess vi fit ess fu ctio Determi e the ver ge fit ess of curre t pop Ce sori g: If ll fit ess v lues re equ l, elimi te the seco d h lf of the timet bles (h lf of the pop) else For e ch fe sible timet ble If the fit ess ver ge, elimi te timet ble else the timet ble rem i s i curre t pop Mo itori g: While o. of fe sible timet bles < pop size R domly select timet ble ccordi g to fit ess v lues Clo e the timet ble (si gle clo i g) While mut tio = f ilure Mut te - multipoi t mut tio (select sm ll umber of eve ts d re ssig , s tisfyi g ll the h rd co str i ts) If o duplic te timet bles, determi e the fit ess of the ew fe sible timet ble If fit ess ver ge, mut tio =success Add ew timet ble to curre t pop else (mut tio = f ilure) reset else (mut tio = f ilure) reset mut tio 1. I iti liz tio Ph se: [ s described i Sectio III(B)(1)] 2. Improveme t Ph se: While stoppi g criteri re ot met For e ch timet ble of the curre t popul tio Network i ter ctio s : Determi e the fit ess vi fit ess fu ctio

d Stimul tio level C lcul te the stimul tio level (= 1/fit ess) Determi e tot l stimul tio of curre t pop. C lcul te the stimul tio prob. for e ch timet ble (= stimul tio /tot l stimul tio ) Met dy mics: I iti lize pop.of mut ted timet bles ( tige s) (A tige s d For e ch fe sible timet ble Ge etic v ri tio s) Clo i g ge er te o. of clo es ( o. of clo es = pop. size x stimul tio prob.) Determi e mut tio prob (=1-stim prob) For e ch clo ed timet ble Ge er te r dom prob bility If r dom prob mut tio prob, mut te While mut tio = f ilure Mut te - multipoi t mut tio If o duplic tes (orig. & mut ted) C lcul te the stimul tio level If stimul tio stimul tio (orig) mut tio = success Add timet ble to mut ted pop. else mut tio = f ilure, reset else mut tio = f ilure, reset else o mut tio -elimi te curre t clo e Network dy mics: G ther ll fe sible timet bles (orig & mut ted) ( tige s i ter ctio s, Sort timet bles ccordi g to stimul tio levels & popul tio upd te) Select the best (high stimul tio ) timet bles (= pop size) to form ew popul tio Repl ce the origi l pop with the ew pop 219 voidi g g ps betwee courses. A g p is free timeslot betwee two lectures (s me curriculum) scheduled o the s me d y. The objective is to produce umber of cl ss timet bles such th t ll h rd co str i ts re s tisfied, d the tot l viol tio s of the soft co str i ts re mi imized. The pe lty of the soft co str i t (vi) is the umber of stude ts without se ts, where s the weights of the soft co str i ts (vii) d (viii) were fixed to 5 d 2, respectively. The h rd co str i t viol tio s (if y) re ssig ed the weight 1000. With this weight, the viol ted h rd co str i t(s) would be s tisfied i the improveme t ph se. There re five v ri bles (st ff, eve t, timeslot, room, d stude t-group). The st ff h ve bee pre ssig ed to courses (eve ts). The problem is to ssig lectures of courses to timeslots d rooms, s tisfyi g ll the h rd co str i ts d mi imizi g the tot l viol tio s of the soft co str i ts. Usi g the 0-1 IP ppro ch, the m them tic l formul tio m y be c rried out s follows: The i put m trices re stude t-group eve t lloc tio (A), st ff-eve t pre ssig me t (B), d eve t-timeslot restrictio (C). The required output m trices (timet bles) re eve t-timeslot ssig me t (X) d eve troom ssig me t (Y). For e ch d t set, the i put m trices re co structed usi g the give d t files, d the the output m trices re co structed by solvi g the problem. The 0-1 IP model for the Sch erf CTP, with five h rd co str i ts d three soft co str i ts, m y be formul ted s: mi imize = = 3 1 4 1 2 1 1 2 ) ( nk nk

LRC e j ,tk ,rk + (5 )) 1 2 1 j k nj = E (e ,t L + ( = = ( ) = = 5 3 2 1 1 2 1 3 1 5 1 2 1 2 n k D T k T nj ak j x jk ( ) ( )) = + = + 2 3 1 2 1 1 3 ( 1 1) 1 ( 2) nj k j j k nj ak j x j k a x ,(4) subject to = 2 = 1 1 0 ) ( nj LEF e j ,t k , (5) = = 3 = 1 4 1 2 1 1 2 0 ) ( nk nk LR e j ,t k ,rk , (6) 5 ) 0 3 1 2 1 2 1 2 1 3 1 3 2 3 1 1 1 = = = = + nk EC j k nj n j j ak j ak j L (e ,t , (7) 1 3 ( ) 0 1 1 1 1 = = = n i nk L e j ,pi ,tk , (8) 2 (1 ) 0

1 3 1 1 1 1 = = = nj jk nk c jk x , (9) all variables are integers 0 1; where ) ( ) ( ) 2 2 1 2 1 ( 1 ) 2 cs k nj LRC (e j ,t k ,rk = = nG e j y jk k n r if 1 2 2 1 ( ) ( ) jk k nj = nG e j y > ( ) ncs rk2 , 0 otherwise; nG(ej) is the number of students in class event ej, and ( ) ncs rk2 is the room capacity for rk2 ; ( ) 1 1 LE e j ,tk = if = 5 1 ( ) D LE D ej ,tk1 <nmind(ej), 0 otherwise; ( ) 1 1 LE D ej ,tk = if = = 2 2 1 1 1 1 1 nj T k T x jk , 0 otherwise; nmind(ej) is a specified minimum days for event ej; T1, T2 are respectively the first and last timeslots on day D; ( ) 0 1 LEF ej ,tk = if 3 ( ) ( ) 1 1 1 f j j nk = x jk = n e l e , 1 otherwise; nf(ej) and l(ej) are the weekly frequency and the length (hours) of ej, respectively; ( ) 0 1 2 LR ej,tk ,rk = if 2 1 =1 ( 1) 2 nj y jk k , 1 otherwise; ( ) 0 LEC3 ej ,tk1 = if 3 0 1 1 1 1 2 1 = = nk x j k x j k , 1 otherwise; and ( ) 0 1 L e j ,pi ,tk = if 2 1 1 1 = nj a ji x jk , and 1 otherwise. B. Implementation and Comparison of AI Algorithms on Class Timetabling Datasets In this section, the three AI algorithms are implemented on four chaerf datasets. The main objective is to show that each algorithm may produce good quality (low fitness) class timetables. Other objectives are to compare the effectiveness of the algorithms, the relative robustness, and the CPU times. A comparison with a published result [9] is carried out to show that the AI algorithms are capable of producing good quality class timetables as good as other solution methods. On all datasets, a constraint relaxation approach has been applied since it is almost impossible to generate timetables that satisfy all the five hard constraints at once. For datasets 1 and 2, the third hard constraint is relaxed (considered as soft). This constraint will be satisfied in the improvement

phase. Thus, for each pair of lectures of the same curriculum that scheduled in the same timeslot, a penalty 1000 is incurred. For the datasets 3 and 4, two hard constraints (second and third) are relaxed. For the second constraint, a penalty 500 is incurred to each room at each timeslot if two or more lectures were scheduled simultaneously. imilarly, for the third constraint, a penalty 500 is added for each pair of lectures of the same curriculum that are scheduled at the same timeslot. ince there are two relaxed hard constraints, instead of 1000, the weight 500 is enough to ensure that the relaxed constraints will be satisfied in the improvement phase. For dataset 4, the 100% occupancy would make the mutation impossible (not enough rooms to reassign events). However, two dummy rooms (zero seats) are introduced to solve the problem. If a lecture is assigned to a dummy room, then all students attended that lecture are considered as students without seats. For all algorithms and datasets, the multipoint mutation operator selects and reassigns only 2% of the number of courses. However, only one course is selected for all datasets since the maximum number of courses is 56. As defined earlier, the maximum number of generations (stopping criterion) for each algorithm is 1000, and the population size is 10. For each dataset, all algorithms are implemented using the same set of initial populations. 1) Implementation and Comparison of AI Algorithms on Benchmark Datasets: The C ACT, INACT, and N ACT have been implemented on each chaerf dataset (10 trials). An initial population of 10 feasible timetables is generated using a random ordering heuristic; i.e. a course is randomly selected (one by one) and then all lectures of the course are assigned to random timeslots and rooms, satisfying all the hard constraints. The fitness value of each timetable is evaluated via the fitness function (4) plus the total weighted violations of the relaxed hard constraints. The multipoint mutation operator selects one course at random, and reassigns all lectures to random timeslots and the best available rooms (minimize students without seats), always maintaining a feasible timetable. The improvement phase is repeated for 1000 generations. The best fitness value, the average fitness, the average relative robustness, and the average CPU time (1000 generations) for the best five trials (low fitness) produced by each algorithm on each dataset are summarized and compared in Table III. 220 TABLE III. IMPLEMENTATION AND COMPARI ON OF AI ALGORITHM ON CHAERF DATA ET Dataset Fitness Values C AUT INAUT N AUT Best Fitness Ave. Rel. Robustness Best Fitness Ave. Rel. Robustness Best Fitness Ave. Rel.

Robustness Ave.Fitness Ave. CPU Ave.Fitness Ave. CPU Ave.Fitness Ave. CPU 1 244 0.031798 256 0.148406 232 0.033859 256.2 375.0s 264.4 529.0s 261.2 420.4s 2 25 0.023976 4 0.153383 22 0.036472 49.6 112.0s 7.8 204.2s 27.2 80.8s 3 35 0.013898 27 0.159630 67 0.015961 59.6 151.2s 37.2 242.0s 71.6 145.4s 4 129 0.013760 108 0.034098 139 0.019271 145.8 4028.6s 119.6 9185.0s 157.2 1082.6s For the best fitness, INACT has achieved the first position in three datasets (2, 3, and 4), and N ACT in one dataset (1). For the average fitness, C ACT has achieved the first position in one dataset (1), and INACT in three datasets (2, 3, and 4). It may be concluded that, for chaerf datasets, INACT is the most effective algorithm. However, a further investigation is required to compare the average fitness of the algorithms. For the average relative robustness, C ACT has the minimum values on all datasets; hence, C ACT class timetables are more robust (large similarity) compared to INACT and N ACT. Finally, for the average CPU time, INACT has acquired the longest times on all datasets. 2) Tests of Hypotheses: Comparing the Averages of the Fitness Values: Now the two tailed small sample t tests are applied to further compare the averages of the fitness values. Three separate tests are considered for each dataset since there are three averages. The sample size is n = 5 (five best trials). For each test, H0: two averages are equal, and H1: two averages are not equal. The test statistic t and the degrees of freedom are calc lated sing eq ations (2) and (3). The req ired t tests (at 5% level) and the res lts of the tests are s mmarized in Table IV. From the 12 tests of hypotheses, INACT is more effective than C ACT and N ACT on datasets 2, 3, and 4, and C ACT is better than N ACT on only one dataset (2). It may be concl ded that, INACT is the most effective algorithm on chaerf datasets. TABLE IV. TE T OF HYPOTHE E ( CHAERF DATA ET ) Dataset C ACT vs. INACT X 1 X2 2 s1 2 s 2 t statistic t0.25, H0 1 256.2 264.4 65.2 100.8 8 -1.423 2.306 ot reject 2 49.6 7.8 231.3 23.2 5 5.859 2.571 reject 3 59.6 37.2 208.3 39.7 5 3.181 2.571 reject 4 145.8 119.6 201.7 104.3 7 3.349 2.365 reject D t set CSACT vs. NSACT X 1 X2 2 s1 2 s 2 t statistic t0.25, H0 1 256.2 261.2 65.2 286.7 6 -0.596 2.447 ot reject 2 49.6 27.2 231.3 22.7 5 3.143 2.571 reject 3 59.6 71.6 208.3 14.8 5 -1.796 2.571 ot reject 4 145.8 157.2 201.7 244.7 8 -1.207 2.306 ot reject D t set INACT vs. NSACT X 1 X2 2 s1 2 s 2 t statistic t0.25, H0

1 264.4 261.2 100.8 286.7 7 0.363 2.365 ot reject 2 7.8 27.2 23.2 22.7 8 -6.403 2.306 reject 3 37.2 71.6 39.7 14.8 7 -10.419 2.365 reject 4 119.6 157.2 104.3 244.7 7 -4.500 2.365 reject 3) Comp ri g AIS Algorithms o Cl ss D t sets with Other Methods: The published results by Di G spero d Sch erf [9] were co sidered to ssess the effective ess of the AIS lgorithms. They i vestig ted the use of loc l se rch tech iques b sed o v rious combi tio s of eighborhood fu ctio s d pplied it to Sch erf d t sets. A umber of pl i Multi-Neighborhood Hill Climbi g d T bu Se rch lgorithms, d umber of Multi-Neighborhood (Ru d Kick) Hill-Climbi g d T bu Se rch lgorithms, h ve bee impleme ted usi g two b sic eighborhood structures timeslot d room. The best results of the four multi eighborhood lgorithms o four Sch erf d t sets re summ rized d comp red with the best fit ess v lues produced by the three AIS lgorithms i T ble V. TABLE V. COMPARING AIS ALGORITHMS WITH OTHER METHODS D t set Best Fit ess V lues AIS Algorithms Di G spero & Sch erf [9] CSACT INACT NSACT MN-HC MN-TS MN-HC-RK MN-TS-RK 1 244 256 232 285 238 200 208 2 25 4 22 18 35 17 13 3 35 27 67 72 98 55 71 4 129 108 139 140 150 113 78 [MN-HC: pl i Multi-Neighborhood Hill Climbi g lgorithms] [MN-TS: pl i Multi-Neighborhood T bu Se rch lgorithms] [MN-HC-RK: Multi-Neighborhood Hill Climbi g + Kick lgorithms] [MN-TS-RK: Multi-Neighborhood T bu Se rch + Kick lgorithms] From T ble V, the AIS lgorithms h ve chieved the first positio i two d t sets (2 d 3) comp red to Di G spero d Sch erf [9], d the followi g m y be co cluded. For d t set 1, ll AIS lgorithms re better th MN-HC, d NSACT is better th MN-TS; for d t set 2, ll AIS lgorithms re better th MN-TS, d INACT is better th ll multi- eighborhood lgorithms; for d t set 3, both CSACT d INACT re better th ll multi- eighborhood lgorithms, d NSACT is better th MN-HC, MN-TS d MN-TSRK; d fi lly for d t set 4, ll AIS lgorithms re better th MN-HC d MN-TS, d INACT is better th MNHCRK. He ce, the AIS lgorithms re c p ble of produci g good qu lity cl ss timet bles s good s other methods. VI. DISCUSSION This p per h s prese ted d comp red three AIS lgorithms for cl ss timet bli g (CSACT, INACT d NSACT). The experime t l results o four Sch erf d t sets h ve sig ific tly show th t the three lgorithms re good timet bli g lgorithms. The lgorithms h ve successfully produced good qu lity (low fit ess) cl ss timet bles, d he ce c be pplied to solve v rious cl ss timet bli g problems. The three lgorithms h ve lso successfully pplied co str i t rel x tio ppro ch o ll d t sets. B sed o the fit ess v lues, INACT is more effective th CSACT d NSACT o Sch erf d t sets. The eight tests of hypotheses o INACT, t 5% level, h ve sig ific tly show th t six tests f vored INACT. The v lues of rel tive robust ess h ve show th t the CSACT cl ss timet bles re more robust (l rge simil rity) comp red to

INACT d NSACT. The CPU times recorded o ll 221 lgorithms h ve reve led th t INACT is the slowest lgorithm. The comp riso with published results [9] h s sig ific tly show th t the AIS lgorithms re c p ble of produci g good qu lity cl ss timet bles s good s other methods such s hill-climbi g d T bu se rch lgorithms. Eve though AIS lgorithms re ew i timet bli g, the results produced re comp r ble with the well-est blished timet bli g lgorithms such s met heuristics (T bu se rch d evolutio ry lgorithms). The reproductio process i AIS lgorithm does ot i volve crossover oper tor s i evolutio ry lgorithms; i ste d, the m i oper tor is clo i g. The power of clo i g is the vit l stre gth th t co tributes to the success of the AIS lgorithms. Clo i g d mut tio cre tes high simil rity timet bles, while crossover d mut tio cre tes differe t timet bles (sm ll simil rity). All AIS lgorithms show gre t promise i the re of educ tio l timet bli g, p rticul rly i its bility to co sider, solve d optimize differe t cl ss timet bli g problems. The lgorithms c h dle the h rd d soft co str i ts very well. The results h ve show th t the three lgorithms c successfully be pplied to solve d optimize v rious CTPs. These lgorithms m y be ccepted s ew members of evolutio ry lgorithms (EAs) for timet bli g. E ch lgorithm h s ll the steps i volved i EA (reproductio , ge etic v ri tio , ffi ity d selectio ). For future work, these AIS lgorithms will be employed to other dom i s of timet bli g such s tr sport (driver timet bli g) d he lthc re i stitutio s ( urse timet bli g). ACKNOWLEDGMENT The work prese ted i this p per w s p rt of my PhD thesis. Therefore, I would like to express my deep d si cere gr titude to my c demic supervisors, Associ te Professor Dr Ah m d T judi Kh der d Dr Adli Must f , for their wise cou seli g, v lu ble dvice, motiv tio , help d guid ce throughout the dur tio of my doctor te study t U iversiti S i s M l ysi , Pe g. Without their support d cooper tio , I could ot h ve completed the study. REFERENCES [1] F. C mpelo, F.G. Guim res, H. Ig r shi, J.A. R mrez, d S. Noguchi, A Modified Immu e Network Algorithm for Multimod l Electrom g etic Problems, IEEE Tr s ctio s o M g etics, Vol. 42(4), 2006, pp. 1111-1114. [2] A. C rlos, C. Coello, D.C. River , d N.C. Cortes, Use of Artifici l Immu e System for Job Shop Scheduli g. Artifici l Immu e Systems (ICARIS2003), LNCS 2787, Spri ger-Verl g, 2003, pp. 1-10. [3] C. Coello, D.C. River , d N.C. Cortes, Job Shop Scheduli g usi g the Clo l Selectio Pri ciple, Ad ptive Computi g i Desig d M uf cture VI, Spri ger-Verl g, 2004, pp. 113-124. [4] L.N. de C stro, 2002. Immu e, Sw rm, d Evolutio ry Algorithms, P rt I: B sic Models, Proc. I ter tio l Co fere ce o Neur l I form tio Processi g (ICONIP2002), Workshop o Artifici l Immu e Systems, Nov 2002, Vol. 3, pp. 1464-1468. [5] L.N. de C stro, d J. Timmis, Artifici l Immu e Systems: A New Comput tio l I tellige ce Appro ch, Spri ger-Verl g, 2002. [6] L.N. de C stro, d J. Timmis, A rtifici l immu e etwork for multimod l, Proc. Co gress o Evolutio ry Comput tio 2002 (CEC02), M y 2002, Vol. 1, pp. 699-704. [7] L.N. de C stro, d F.J. Vo Zube , Artifici l Immu e Systems: P rt

I - B sic Theory d Applic tio s, Tech ic l Report 1, RT-DCA 01/99, St te U iversity of C mpi s, Br zil, 1999. [8] L.N. de C stro, d F.J. Vo Zube , The Clo l Selectio Algorithm with E gi eeri g Applic tio s, Proc. Ge etic d Evolutio ry Comput tio Co fere ce (GECCO-2000), Artifici l Immu e Systems Workshop, July 2000, pp. 36-37. [9] L. Di G spero, d A. Sch erf, Multi- eighbourhood loc l se rch with pplic tio to course timet bli g, Pr ctice d Theory of Autom ted Timet bli g IV, LNCS 2740, Spri ger-Verl g, 2003, pp. 263-278. [10] A. Doye , O. E gi , d C. Ozk , A New Artifici l Immu e System Appro ch to solve Permut tio Flow Shop Scheduli g Problems, Proc. I ter tio l XII Turkish Symposium o Artifici l I tellige ce d Neur l Networks (TAINN 2003), July 2003, pp.1-11. [11] R.C. Eberh rt, d Y. Shui, Comput tio l I tellige ce: Co cepts to Impleme t tio s, Elsevier/ Morg K ufm Publishers, 2007. [12] J.D. F rmer, N.H. P ck rd, d A.S. Perelso , The immu e system, d pt tio , d m chi e le r i g, Physic 22D, 1986, pp. 182-204. [13] S. Forrest, A.S. Perelso , L. Alle , d R. Cherukuri, Self- o self discrimi tio i computer, Proc. IEEE Symposium o Rese rch i Security d Priv cy, M y 1994, pp. 202-212. [14] T. Fukud , K. Mori, d M. Tsuki m , P r llel Se rch for MultiMod l Fu ctio Optimiz tio with Diversity d Le r i g of Immu e Algorithm, Artifici l Immu e Systems d Their Applic tio s, Spri ger-Verl g, 1999, pp. 210-220. [15] D.E. Goldberg, Sizi g Popul tio s for Seri l d P r llel Ge etic Algorithms, Ge etic Algorithms, IEEE Computer Society Press, 1989, pp. 20-29. [16] F. Go z lez, D. D sgupt , d R. Kozm , Combi i g eg tive selectio d cl ssific tio tech iques for om ly detectio , Proc. Co gress o Evolutio ry Comput tio (CEC02), M y 2002, pp. 705-710. [17] E. H rt, Immu ology s Met phor for Comput tio l I form tio Processi g: F ct or Fictio ?, PhD Thesis, U iv. of Edi burgh, 2002. [18] E. H rt, d P. Ross, A Immu e System Appro ch to Scheduli g i Ch gi g E viro me ts, Proc. Ge etic & Evolutio ry Comput tio Co fere ce (GECCO-99), July 1999, Morg K ufm , pp.1559-1565. [19] E. H rt, P. Ross, d J. Nelso , Produci g robust schedules vi rtifici l immu e system, Proc. I ter tio l Co fere ce o Evolutio ry Computi g (ICEC98), M y 1998, IEEE Press, pp. 464-469. 1998 [20] A. Ishiguro, T. Ko do, Y. W t be, Y. Shir i, d Y. Ichik w , Emerge t Co structio of Artifici l Immu e Networks for Auto omous Mobile Robots, Proc. IEEE I ter tio l Co fere ce o Systems, M , d Cyber etics 1997 (SMC 97), Oct 1997, pp. 1222-1228. [21] N.K. Jer e, N.K., Tow rds Network Theory of the Immu e System, A ls of Immu ology, Vol. 125, 1974, pp. 373-389. [22] Y. K w t , K. Morik w , K. T k h shi, d N. N k mur , Robust ess Optimiz tio of the Mi imum M kesp Schedules i Job Shop, I ter tio l Jour l M uf cturi g Tech ology d M geme t, Vol. 5(1/2), 2003, pp. 1-9. [23] J. Koljo e , d J.T. Al der, Effects of popul tio size d rel tive elitism o optimiz tio speed d reli bility of ge etic lgorithms, Proc. Ni th Sc di vi Co fere ce o Artifici l I tellige ce 2006 (SCAI2006), Oct 2006, pp. 5460. [24] J.H. W lker, d S.M. G rrett, Dy mic Fu ctio Optimiz tio : Comp ri g the Perform ce of Clo l Selectio d Evolutio Str tegies, Artifici l Immu e Systems, LNCS 2787, Spri ger-Verl g, 2003, pp. 273-284. 222

Anda mungkin juga menyukai