• Tidak ada hasil yang ditemukan

CHAPTER 5 IMPLEMENTATION AND TESTING

N/A
N/A
Protected

Academic year: 2019

Membagikan "CHAPTER 5 IMPLEMENTATION AND TESTING"

Copied!
13
0
0

Teks penuh

(1)

CHAPTER 5

IMPLEMENTATION AND TESTING

5.1 Implementation

Below is some code used to create this project.

Source Code index.php

On line number 2 explains that the csv file name that we will use, the csv file name used is Data_Paket_wisata.csv. Row number 3 is the command to read csv file, where csv file in read is Data_Paket_wisata.csv. Row 4 the explode command serves to be used to separate or break a string based on the separator we specify. Then the command below is used to display the Data_Paket_wisata.csv file that we will use.

1. <?php

2. if (($handle=fopen(“Data_Paket_wisata.csv”,”r”))!=FALSE){ 3. $row=1;

(2)

12.echo “<td>”.$data[5].”</td>”;

(3)

14. }

15. $_SESSION['temp']=$temp; ?>

On Line $gabungtanggal, $gabungtanggal serves to combine the $YYY, $mm and $dd variables into a timestamp. Strtotime() is a function to change a string from a date or time into a standard Unix timestamp. The 5th row converts the csv file into a string. The 8th preg_match line is used to search the string data. In this case preg_match is used to search the data string form the inut and matches the csv index number 0. In line 10 the implode is used tu unify some string data.

The first step is to create the criteria matrix

1. $data1 = $durasi;

The code abovexplains that the matrix of duration, inimum and price is variable with data1, data2, data3. Data1/data1 aims to generate a value of 1.

Calculate the number of matrix criteria

8. $jml1=$data1/$data1+$data1+$data3;

9. $jml2=1/$data2+$data2/$data2+data2;

10.$jml3=1/$data3+1/$data1+$data3/$data3;

(4)

Make normalization of criteria

Normalization is used to obtain a simpler value by means of the matrix value divided by the number of matrices.

Calculate the number of matrix normalization criteria

1. $jumlahnormalisasi = array (

2. array($normalisasimatrix[0][0]+$normalisasimatrix[1] [0]+$normalisasimatrix[2][0],

(5)

3. (($normalisasimatrix[1][0]+$normalisasimatrix[1][1]+ $normalisasimatrix[1][2])/3),

4. (($normalisasimatrix[2][0]+$normalisasimatrix[2][1]+ $normalisasimatrix[2][2])/3));

Each matrix normalization is summed per line then devided by3. In devide 3 because the number of criteria is 3 ie duration, minimum, and price.

Calculate the average number of criteria

1. $jumlahratarata = array (

2. array($ratarata[0]+$ratarata[1]+$ratarata[2]));

Calculate the matrix multiplication criteria

1. (($matrix[0][0]*$ratarata[0]) + ($matrix[0]

Max value is searched so that calculation process of CI and CR can run well.

(6)

1. $CI = (($nilaimax[0]- 3) / (3-1));

Find the value of CI by the value of max is deducted by the number of criteria and the number of criteria minus 1, after which in get the value of CI.

Compute Consistensy

3. $Consistensi = $CR<=0.1 ? 'consistent' : 'inconsistent';

Code above displays some data based on the number of criteria, the example criteria in this project is 3 then the balue of criterion 3 is 0.58 and next if the CR value is less than 0.1 then the data is consistent and if the data is more than 0.1 the data is declared inconsistent.

Calculate the highest value of the alternative

(7)

The above code is used to find the highest value of the matrix multiplication result, and the highest result of matrix multiplication means that the value is and the tour package data is recommended to the calculation result of AHP method.

5.2 Testing

The above view is the initial view of the tour package selecion project by using AHP method. The data appear is data from website www.yuktravel.com

which has been made in the form csv format.

(8)

The above view is the result of search data based on the name of the place is Bali with type tour is private and departure date is 1/8/2017. Above the table of data search result there is a form that serves as a data input form to run the AHP method.

(9)

The above view is the result of calculation using AHP method andgenerate a package that has the hoghest value from other Bali package data and with the same tour type, with the input value of the duration criterion is 2, the minimum is 4 and the price is 6.

(10)

The above view is a log view of the calculation with the description as it is in the picture. The first step is to create a 2D matrix with input duration, minimum and price, then the second step is the normalization of the criteria matrix. In step four is a table of matrix multiplication derived from the multiplication of the initial * avarage matrix. And the maximum value is the result of the calculation of the multiplication matrix devided by the average then and devided by 3. value 3 is the value of the number of criteria (duration, minimum and price). CI (Consistensy Index), this calculation is done to obtain result that will be used to calculate the value of CR (Consistensy Ratio).

(11)

Illustration 5.6: Calculation Log Page

(12)

In the above figure the average calculation result from the alternative data with the total number is 1, by means of the value of the normalization of alternative matrix summed on line and then devided by number of criteria, criteria consisting of duration, minimum and price then the number of criteria is 3.

Illustration 5.7: Calculation Log Page

(13)

Referensi

Dokumen terkait

Buat kartu ukuran 10X10 cm dan isilah ciri----ciri atau kata ciri atau kata ciri atau kata ciri atau kata----kata lainnya yang mengarah pada kata lainnya yang mengarah pada

Perkalian silang A x B pada vektor didefinisikan sebagai suatu vektor C yang arahnya tegak lurus pada bidang dimana vektor A dan B berada dan mengikuti aturan tangan kanan,

[r]

Ulat daun ( spodoptera exigue ) dan jamur altenaria porri merupakan organisme pengganggu tumbuhan yang menjadi faktor dari beberapa masalah yang dihadapi dalam budidaya

ASEAN Power Grid merupakan proyek kerja sama interkoneksi listrik regional, yang diharapkan dapat menjawab tantangan kebutuhan listrik ASEAN yang terus meningkat. Indonesia,

Apakah melalui penerapan media visual dapat meningkatkan proses pembelajaran matematika pada anak berkebutuhan khusus, khususnya siswa kelas VIII tunarungu di SLB

Berdasarkan observasi dan wawancara dengan karyawan yang dilakukan pada perusahaan Langgeng Laundry ditemukan adanya masalah tentang kepuasan kerja yang diduga

Rancang Bangun Alat Penuang Susu Otomatis Menggunakan Sensor Ping Berbasis Mikrokontroler ATMega16.. (2016: +31 Halaman + Daftar Pustaka + Gambar + Tabel + Lampiran)