of units scheduled 4 2 1 ...

Number of rows needed is equal to number of class names multiplied by number of lecture days in a week multiplied by number of lecture hours in a day. From Table 2, there are two names of class, *c1* and *c2,* are scheduled in the same day and time that is *d1,h1* and *d1,h2* for course *m1* taught by *l1*. It is possible because the type of class is *t0.* It means that it is a merge class of *n1* and *n2.* Number of units scheduled of that column is 4. It represents a number of

There are six functions that are applied to each cell in target matrix. Those functions are *fm , ft , fl , fc , fd* and *fh*, each of which is used to get information about course code, type course class, lecturer code, class name, day and hour respectively. As an example, the value of each function to cell *v11* are *fm(v11)=m1*, *ft*(*v*11)*=t0*, *fl*(*v*11)*=l1*, *fc*(*v*11)*= c1*, *fd*(*v*11)*= d1*, and *fh*(*v*11)*= h1*. All

<sup>101</sup> *mtl* , , 2 11 *mtl* , , <sup>322</sup> *mtl* , , ...

scheduled at day *d1* on hour *h1* with class name *c1.*

scheduled.

scheduled.

scheduled.

Table 2. Example of target matrix

hours has been allocated.

of these functions are used to create target matrix.

in target matrix, *V = {vij},* has three different values, those are :

There are some rules need to be considered in order to fill the target matrix:


For example, there are 3 courses and 4 lecturers to be scheduled within 2 class names, A and B, 2 days lecture a week and 3 hours lecture a day. There are also two type course classes, namely lecture and lab. It means that *n*(*M*)*=* 3*, n*(*T*)*=*3*, n*(*L*)*=*4*, n*(*C*)*=*2*, n*(*D*)*=*2*, n*(*H)=*3. *m*1 is course code opened for mixed class name *c*1 and *c*2 and lectured by l1, *m*2 is course code opened for both class name *c*1 and *c*2 but their were taught by the some lecturer, *l2* with type course class *t1* as lecture. *m3* is course code also opened for both class, type course class as lab, but with difference lecturer, *l3* and *l4*. If course credit of *m1, m2* and *m3* are 2, 1 and 2 credits and knowing the lecturer's availabilities time, we can produce the initial target matrix, in Table 3. From that target matrix, it can be determined that lecture code *l*2 and *l*<sup>4</sup> are not available for *d*1*,h*1 and *d*2*,h*3, while other lecturers are available at any time. These information and other constraints are inputted into the system and saved into databases.


Table 3. Example of initial target matrix

Solving Timetable Problem by Genetic Algorithm

**4. Experiment result** 

shown in Figure 4.

Course Name

Calculus 1 (*m2*) Nababan (*l2*) 2

Calculus 2 (*m3*) Nababan (*l2*) 2

Discrete Math (*m5*) Samuel (*l4*) 4

Reading Skills (*m7*) Univ (*l6*) Univ (*l7*) 2

Table 5. Relations among the 6 sets

and Heuristic Search Case Study: Universitas Pelita Harapan Timetable 313

semester. That is one time table for every batch. No matter is how big a batch in one departement, it has only one time table. It only impacts to the processing time. The bigger the batch is the longer the processing time to produce the time table. It is because not only the number of rows but also the number of columns in the target matrix will be larger.

Some experiments are performed to ensure how good the system is. There are 4 course groups from year 1 to year 4. In experiments, we would like making time table for odd semester data 2008 - 2009. Certain number of courses and lecturers to be scheduled in each course group are inputted. For example, in course group year 1 there are 7 courses and 10 lecturers with 2 type course classes (lecture and lab), 2 class names (A and B), 5 days lecture

From Table 5, it can be concluded that *n*(*M*)*=* 7*, n*(*T*)*=*3*, n*(*L*)*=*9*, n*(*C*)*=*2*, n*(*D*)*=*5*, n*(*H)=*10. All genes of the chromosome are *m*1,t0,l1, *m*2,t0,l2, *m*3,t0,l2, *m*4,t0,l3, *m*5,t0,l6, *m*6,t0,l5, *m*7,t1,l6, *m*7,t1,l7, *m*1,t2,l8, *m*2,t2,l9, *m*3,t2,l9, *m*4,t2,l10, *m*6,t2,l6. It means there are 13 columns and 100 rows in target matrix. After receiving initial data, such as what is the restricted day and time for a certain lecturer, what room can be used and also the capacity of that room. The system runs with 10 chromosomes in a population and 10 generations are set in the experiment, without considering probability of selection, crossover and mutation, the maximum best fitness value, that is 1, can be achieved. It means that all courses can be scheduled accordingly. Therefore, number of populations and generations does not need to be set high. It means less time is needed to make a schedule. One of the timetables of the course group year 1 is

ICT (*m1*) Budi Berlinton (*l1*) 3 Monika (*l8*) Monika (*l8*) 2

IPE (*m4*) Sutrisno (*l3*) 4 Andree (*l10*) Andree (*l10*) 2

Statistics (*m6*) Gunawan (*l5*) 3 Gunawan (*l5*) 2

The time table where the class meeting will take place should also be defined. From figure 4, it is clear that every class meeting has their room. Budi berlinton teaches course ICT on

Lecture Lab

A B units A B units

Finela (*l9*) Finela (*l9*) 2

a week and 10 hours lecture a day. Relation among all sets are represented in Table 5.

Suppose that sequence of courses represented by generated chromosome [1 3 2 4] represents *m*1,*t*0,l1 ; *m*3,t2,l3 ; *m*2,t1,l2 and *m*3,t2,l4 then, the first course to be scheduled is gene chromosome code *m*1,*t*0,l1 and the last is *m*3,t2,l4. The result of these is shown in Table 4. It can be seen that *m*1,*t*0,l1 is successfully scheduled on (*c*1, *d*1, *h*1), (*c*1, *d*1, *h*2) (*c*2, *d*1, *h*1) and (*c*2, *d*1, *h*2). Therefore other columns of those rows are set to -1. *M*3,t2,l3 and *m*2,t1,l2 are able to be placed but *m*3,t2,l4 is failed.

From Table 4, it can be said that the chromosome [1 3 2 4] is able to allocated 8 units out of 10 units for that two classes *c1* and *c2* for 3 courses. The value of 8 over 10 which is 0.8 is called as fitness of that chromosome. If the chromosome is [1 4 3 2] then the fitness is 1. The fitness of a chromosome represents the time table objective. In this case, the objective is to maximize the number of units to be scheduled for each timetable. If number of units scheduled for *kth* column is *s(k)*, *p* is a maximum column in a target matrix, *u(j)* means unit number of *jth* course to be scheduled for each class name, and *t* is total courses of each class name, then fitness of a chromosome is defined by (1)

$$fitness = \frac{\sum\_{k=1}^{p} s(k)}{n(\text{C}) \cdot \sum\_{j=1}^{t} u(j)}\tag{1}$$


Table 4. Example of target matrix after heuristic search

University time table consists of many timetables. Since one degree of each department is designed for four years studies, then each department has at least four time tables for every semester. That is one time table for every batch. No matter is how big a batch in one departement, it has only one time table. It only impacts to the processing time. The bigger the batch is the longer the processing time to produce the time table. It is because not only the number of rows but also the number of columns in the target matrix will be larger.

### **4. Experiment result**

312 Real-World Applications of Genetic Algorithms

Suppose that sequence of courses represented by generated chromosome [1 3 2 4] represents *m*1,*t*0,l1 ; *m*3,t2,l3 ; *m*2,t1,l2 and *m*3,t2,l4 then, the first course to be scheduled is gene chromosome code *m*1,*t*0,l1 and the last is *m*3,t2,l4. The result of these is shown in Table 4. It can be seen that *m*1,*t*0,l1 is successfully scheduled on (*c*1, *d*1, *h*1), (*c*1, *d*1, *h*2) (*c*2, *d*1, *h*1) and (*c*2, *d*1, *h*2). Therefore other columns of those rows are set to -1. *M*3,t2,l3 and *m*2,t1,l2 are able to be placed but *m*3,t2,l4

From Table 4, it can be said that the chromosome [1 3 2 4] is able to allocated 8 units out of 10 units for that two classes *c1* and *c2* for 3 courses. The value of 8 over 10 which is 0.8 is called as fitness of that chromosome. If the chromosome is [1 4 3 2] then the fitness is 1. The fitness of a chromosome represents the time table objective. In this case, the objective is to maximize the number of units to be scheduled for each timetable. If number of units scheduled for *kth* column is *s(k)*, *p* is a maximum column in a target matrix, *u(j)* means unit number of *jth* course to be scheduled for each class name, and *t* is total courses of each class

1

*k t*

*fitness*

=

*c1,d1,h1* 1 -1 -1 -1 *c1,d1,h2* 1 -1 -1 -1 *c1,d1,h3* -1 1 -1 -1 *c1,d2,h1* -1 -1 1 -1 *c1,d2,h2* -1 -1 1 -1 *c1,d2,h3* 0 0 0 -1 *c2,d1,h1* 1 -1 -1 -1 *c2,d1,h2* 1 -1 -1 -1 *c2,d1,h3* 0 -1 0 0 *c2,d2,h1* -1 1 -1 -1 *c2,d2,h2* 0 0 -1 0 *c2,d2,h3* 0 0 0 -1 # units 4 2 2 0

University time table consists of many timetables. Since one degree of each department is designed for four years studies, then each department has at least four time tables for every

*p*

1

<sup>101</sup> *mtl* , , 2 12 *mtl* , , <sup>323</sup> *mtl* , , <sup>324</sup> *mtl* , ,

( ) ()

=

*j*

*nC u j* =

⋅

( )

(1)

*s k*

name, then fitness of a chromosome is defined by (1)

Table 4. Example of target matrix after heuristic search

is failed.

Some experiments are performed to ensure how good the system is. There are 4 course groups from year 1 to year 4. In experiments, we would like making time table for odd semester data 2008 - 2009. Certain number of courses and lecturers to be scheduled in each course group are inputted. For example, in course group year 1 there are 7 courses and 10 lecturers with 2 type course classes (lecture and lab), 2 class names (A and B), 5 days lecture a week and 10 hours lecture a day. Relation among all sets are represented in Table 5.

From Table 5, it can be concluded that *n*(*M*)*=* 7*, n*(*T*)*=*3*, n*(*L*)*=*9*, n*(*C*)*=*2*, n*(*D*)*=*5*, n*(*H)=*10. All genes of the chromosome are *m*1,t0,l1, *m*2,t0,l2, *m*3,t0,l2, *m*4,t0,l3, *m*5,t0,l6, *m*6,t0,l5, *m*7,t1,l6, *m*7,t1,l7, *m*1,t2,l8, *m*2,t2,l9, *m*3,t2,l9, *m*4,t2,l10, *m*6,t2,l6. It means there are 13 columns and 100 rows in target matrix. After receiving initial data, such as what is the restricted day and time for a certain lecturer, what room can be used and also the capacity of that room. The system runs with 10 chromosomes in a population and 10 generations are set in the experiment, without considering probability of selection, crossover and mutation, the maximum best fitness value, that is 1, can be achieved. It means that all courses can be scheduled accordingly. Therefore, number of populations and generations does not need to be set high. It means less time is needed to make a schedule. One of the timetables of the course group year 1 is shown in Figure 4.


Table 5. Relations among the 6 sets

The time table where the class meeting will take place should also be defined. From figure 4, it is clear that every class meeting has their room. Budi berlinton teaches course ICT on

Solving Timetable Problem by Genetic Algorithm

*in Education*. Vol. 26. issue 4

Heidelberg*.* 

2007.

Heidelberg. pp 198-211.

*Shop Scheduling",* August 2011,

for Flow-Shop Scheduling.pdf

Q. Zhao, An Introduction to Genetic Algorithms, 2007.

Heidelberg. pp 181-197.

*Planning Systems"*, Digest No. 1993/144

*University Timetabling System*", August 2011,

defined accordingly.

**6. References** 

and Heuristic Search Case Study: Universitas Pelita Harapan Timetable 315

course has to be split into two segments then the name of that course should be differentiated. It could be assumed as two courses. In the experiment, it is showed that calculus is divided into calculus 1 and calculus 2. Thirdly, the objective of the system is to maximize the number of successful units being able to scheduled, otherwise it should be

Burke E.K., Elliman D.G. and Weare R.F. (1993a) "A University Timetabling System Based

Burke E.K., Elliman D.G. and Weare R.F. (1993b) "Automated Scheduling of University

Burke E.K., Elliman D.G. and Weare R.F. (1994) "A Genetic Algorithm for University

Burke E and Ross P (Eds) (1996): *Lecture Notes in Computer Science 1153 Practice and Theory of* 

Erben W and Keppler J (1995): A Genetic Algorithm Solving a Weekly Course- Timetabling

Enmund Burke, David Ellimand and Rupert Weare. (1994). "*A Genetic Algorithm Based* 

Joshua Poh-Onn Fan, Graham K. Winley. (2008). *A Heuristic Search Algorithm for Flow-*

http://www.informatica.si/PDF/32-4/26\_Fan - A Heuristic Search Algorithm

N.D. Thanh, "Solving Timetabling Problem Using Genetic and Heuristic Algorithms",

Negnevitsky, Michael. (2005). *Artificial Intelligence, A Guide to Intelligence System (2nd)*,

Rich DC (1995): A Smart Genetic Algorithm for University Timetabling. In Burke E and

Addison Wesley, pp. 222-245, IBN 0-321-20466-2, Harlow, England

Eighth ACIS International Conference on Software Engineering, Artificial Intelligence, Networking, and Parallel/Distributed Computing, hal. 472-477,

Ross P (Eds): *Lecture Notes in Computer Science 1153 Practice and Theory of Automated Timetabling First International Conference, Edinburgh, U.K., August/September 1995, Selected Papers.* New York: Springer-Verlag Berlin

Timetabling", AISB Workshop on Evolutionary Computing, Leeds.

Davis L. (1991) "Handbook of Genetic Algorithms" Van Nostrand Reinhold

http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.2.2659

on Graph Coloring and Constraint Manipulation", *Journal of Research on Computing* 

Exams", *Proceedings of I.E.E. Colloquium on "Resource Scheduling for Large Scale* 

*Automated Timetabling First International Conference, Edinburgh, U.K., August/September 1995, Selected Papers.* New York: Springer-Verlag Berlin

Problem. In Burke E and Ross P (Eds): *Lecture Notes in Computer Science 1153 Practice and Theory of Automated Timetabling First International Conference, Edinburgh, U.K., August/September 1995, Selected Papers.* New York: Springer-Verlag Berlin

Monday at 7.30 to 10.00 in room B212. The system can define the available room for that class by looking room table in the database. It is easy to search the room by comparing the room capacity, the location etc, from the requirement of that class. After a room is assigned, status of that room is not available any more of that day and hour.


Fig. 4. One example of time table for the first semester.

### **5. Conclusions and further research**

The proposed genetic algorithm and heuristic search are able to solve timetable problem. Although, room has not been included in target matrix, system is able to determine which room is used to a certain cell in time table. However, if the room is one of the critical factor, it should be included in the target matrix. If it happens then it is more likely to create three dimension target matrix instead of adding number of column.

There are some limitations of this research. Firstly, every parallel class of a course group which is represented in one target matrix, has to be scheduled to every course defined in that time table. Secondly, one lecture course can be scheduled only if there is available space consecutively at target matrix at least as much as number of units of the course. If that course has to be split into two segments then the name of that course should be differentiated. It could be assumed as two courses. In the experiment, it is showed that calculus is divided into calculus 1 and calculus 2. Thirdly, the objective of the system is to maximize the number of successful units being able to scheduled, otherwise it should be defined accordingly.

### **6. References**

314 Real-World Applications of Genetic Algorithms

Monday at 7.30 to 10.00 in room B212. The system can define the available room for that class by looking room table in the database. It is easy to search the room by comparing the room capacity, the location etc, from the requirement of that class. After a room is assigned,

The proposed genetic algorithm and heuristic search are able to solve timetable problem. Although, room has not been included in target matrix, system is able to determine which room is used to a certain cell in time table. However, if the room is one of the critical factor, it should be included in the target matrix. If it happens then it is more likely to create three

There are some limitations of this research. Firstly, every parallel class of a course group which is represented in one target matrix, has to be scheduled to every course defined in that time table. Secondly, one lecture course can be scheduled only if there is available space consecutively at target matrix at least as much as number of units of the course. If that

status of that room is not available any more of that day and hour.

Fig. 4. One example of time table for the first semester.

dimension target matrix instead of adding number of column.

**5. Conclusions and further research** 


http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.2.2659


**16** 

*Spain* 

**Genetic Algorithms for Semi-Static** 

A. Bahillo, R. de la Rosa and A. Alonso

*Optical Communications Group, University of Valladolid,* 

**Wavelength-Routed Optical Networks** 

R.J. Durán, I. de Miguel, N. Merayo, P. Fernández, J.C. Aguado,

Optical communication networks are an excellent option to establish backbone or transport networks due to the high-bandwidth provided by the optical fibres. In this kind of networks the information is transmitted through optical fibres in the infrared domain. Although fibres provide high bandwidth for the transmission of information (around 50 THz), the current electronic technology cannot work at these bit rates. Therefore, a new technology was developed to exploit the bandwidth of the fibre: Wavelength Division Multiplexing (WDM). In this technology, the part of the spectrum used to transmit information is divided into different channels, each one centred in a different wavelength (or frequency). Then, it allows the transmission of several channels through the same fibre by using a different

In first optical communication networks, the optical technology was only used for transmission between nodes that were directly connected by means of one or more optical fibres, i.e., adjacent nodes in the physical network. Therefore, when data should be transmitted between two non-adjacent nodes, the information should transverse intermediate nodes in which the information is converted into electrical domain in order to route the traffic through the appropriate output fibre and then transmit the information in

To solve this problem, new optical networks emerged with the capacity of using the wavelength to perform routing functions (Mukherjee, 1997). Thus, a network node can distinguish between traffic destined for other nodes and for itself without any processing, as it is determined by the wavelength and the input port of incoming data. This kind of networks are called Wavelength-Routed Optical Networks (WRONs) and they are based in circuit switching. WRONs allows the establishment of optical circuits between two network nodes (not necessarily adjacent in the physical topology) for the transmission of information. These circuits are called lightpaths. The lightpaths can be permanently (or semi-permanently) established in static (or semi-static) WRON, or established and released

The objective of this chapter is to show a set of single-objective and multi-objective genetic algorithms, designed by the Optical Communications Group at the University of Valladolid,

the optical domain. In this scenario, the nodes become the bottleneck of the network.

**1. Introduction**

wavelength for each of the channels.

on demand in dynamic WRONs.

S. Lukas, P. Yugopuspito and H. Asali, "Solving assignment problem by genetic algorithms using Cycle Crossover", *Universitas Pelita Harapan Computer Science Journal,* Vol. 3, No. 2, Mei 2005, pp. 87-93.
