98
writer is using n times as a number of maximum iteration in this case.
8. Stop Condition
In lecturing scheduling system at Informatic Engineering major, there are some conditions that cause the genetic algorithm is
stopped, such: 1. Achieved the highest fitness value for three consecutive times.
2. Achieved the maximum iteration.
4.2.3. Modeling
After finishing the analysis stage, then the writer design the application that already defined in the previous. The system design
begins with creating the Data Flow Diagram DFD, flowchart and creating the database design.
4.2.3.1. Requirement Model Bussiness process that occur in this system is:
1. The academic staff must input the data: the course subject name, the lecturer name, the total of credit hour,
the time, the local room and the session. 2. After the data inserted into database, the system will
process it.
99
3. The system will give the output about the information about the course subject name, the lecturer name, the
total of credit hour, the time and the room class. 4. The function of using genetic algorithm is achieving the
optimaztion in a system. So in this case, when the system proceess the data, the system also trying to
match room class for the course subject then after matching it, the system will give the output like the
explanation above. 5. The final result of this system is giving a time table
report.
4.2.3.1.1 Data Flow Diagram DFD
The writer use data flow diagram to represent the process modeling. The data flow diagram that the
writer use: context diagram, data flow diagram level 1 and data flow diagram level 2. The figure below is
showing the data flow diagram.
100
Figure 4.6 : The Context Diagram of Lecturing Scheduling System
The figure above is a context diagram of lecturing scheduling system in all aspect. That figure shows how
the process scheduling starts from collecting data at academic of Informatic Engineering Major until the
arranging the schedule.
101
Figure 4.7 : The Data Flow Diagram Level 1
1.0
102
Figure 4.8 : The Data Flow Diagram Level 2 Process 4
The data flow diagram above is a data flow diagram level 2. In this level, the process in applying genetic
algorithm will be break down. The step in this level: 1. First, generate population in which it use the
datas, they are: day, session, course,
lecturer,class, room and schedule that already input in the process 1 and 2 in level 2, after
generating population, it will produce population. 2. Second process is Evaluating fitness value in
which in this stage will calculate and evaluate a fitness value to use in generating a schedule.
3. Third process is crossing over after done in this stage, it will produce the new population.
mic 4.1
103
4. Forth process is Mutation. In this stage will produce a new chromosome gene.
5. Fifth process is Evaluating fitness value for the second time in which in this stage will calculate
and evaluate a fitness value to use in generating a schedule.
6. After the schedule finished, the academic can use the schedule.
4.2.3.1.2. Entity Relationship Diagram ERD
The entity relationship diagram is very useful to represent the data modeling. The new lecturing
scheduling system that the writer proposed has a database which is consist of some tables. They are:
day, room, session, class, lecturer and course. The figure below is purposing to show the relationship
between one entity to another entity.
104
The Entity Relationship Diagram
Figure 4.9 : The ERD of The System
TABLE 4.6. The Table of The Day The Field
Type of field
Day_id Integer 2
Day_name Varchar 10
Day’s table is consisting of two kinds of field. The first field is containing the number of the day which
is the writer called it Day_id and the second field is containing the day in which the writer called it
room
session
105
Day_name. Day_id is representing by using integer number because it indicates the number of the day
and Day_name is represented by using varchar because this is the name of the day in which using
character. The gene has 3 digits number to represent the day, session and room. In this case, the day’s
table has contribution to fill the first digit of the gene.
TABLE 4.7. The Table of Room The Field
Type of field
Room_id Integer2
Room_name Varchar 5
Room ’s table is consisting of two kinds of field. The
first field is containing the total number of the local which is the writer called it Room_id and the second
field is containing the Room_name. Room_id is representing by using integer number because it
indicates the number of the rows and Room_name is representing by using varchar because this is the
name of the room in which using character. The gene has 3 digits number to represent the day,
session and room. In this case, the local’s table has
106
contribution to fill the third digit of the gene to catch up the session.
TABLE 4.8. The Table of Lecturer The Field
Type of field
Lecturer_id Integer 10
Lecturer_name Varchar 40
The lecturer’s table is consisting of 2 fields, they are: No and dosen. No is representing the
number of the lecturer and dosen is representing the name of the lecturer. This table is very helpfull to
give the information about lecturer based on the structure of the gene.
TABLE 4.9. The Table of Course The Field
Type of field
Course_id Varchar 7
Course_name Varchar 50
Credit Integer 2
Semester varchar 2
The Course table is consisting of 4 fields, they
are: course_id, course_name, credit and semester. Course_id is representing the number of the course
subject, course_name is representing the name of the course subject, credit is representing the total credit
107
of course subject and semester is representing the semester.
TABLE 4.10. The Table of Session The Field
Type of field
Session Integer 2
Start Varchar 5
End Varchar 5
The session’s table is consisting of 3 fields, they are: session, start and end. session is
representing the total number of the session, start is representing the start time of the credit hour and end
is representing the finish time of credit hour. This table is very helpfull to give the information about
the session and it useful to represent the second digit inside the gene.
TABLE 4.11. The Table of Schedule The field
Type of field
Schedule_id Integer 3
Course_id Varchar 10
Lecturer_id Varchar 7
Class_id Varchar 1
The table above is a relation table for the scheduling system. Based on the table, the primary
key is Schedule_id, the other fields is the foreign key from othe table.
108
4.2.3.2 Design Model
The writer designs the interface like the figure below: 1.
Input Form
Add Lecture No id
Add Lecture Name
Search By: Search
Add Lecturer
ShowHide
id NO ID
Action Lecturer Name
1 2
3 Paging
Figure 4.10 : Design Input 1
Mata Kuliah SKS
Dosen Semester
Kelas Simpan
Edit MK Kembali
Lanjutkan
Figure 4.11 : Design Input 2
109
2. Output Form
Figure 4.10 : Design Output
PART V IMPLEMENTATION
5.1. System Requirement
Building the lecturing scheduling system needs the hardware and the software like the specification below :
1. The Hardware : a. Computer Processor Unit Intel core i5 2,7GHz 4 CPU
b. Memory 2 GB c. Hard Disk Drive 160 GB
2. The Software : a. Operating System Windows 7
b. XAMPP Web Server Apache 1.3, PHP 5, MySQL 5. c. Adobe Dreamweaver
5.2. Construction
In this stage, the writer will do the coding part and the testing part.
5.2.1 Coding
In the coding part, the writer types the code to build the application system. Before coding, the writer must understand the flowchart, the
business process, the entity relationship diagram ERD and the database itself. Writer provided source code in appendix part.