Perbandingan Algoritma K-Nearest Neighbor, Greedy dan Brute Force dalam Menentukan Rute Pengiriman Barang

  • Muhamad Ihsan Maulidan Matematika, Universitas Islam Bandung
  • Gani Gunawan Matematika, Universitas Islam Bandung
  • M. Yusuf Fajar Matematika, Universitas Islam Bandung
Keywords: Rute Pengiriman Barang, Travelling Salesman Problem, Algoritma K-Nearest Neighbor (KNN), Algoritma Greedy, Algoritma Brute Force

Abstract

Abstract. The buying and selling transaction system that is widely used by the public today is the online buying and selling system. In the online buying and selling system, of course there is a process of sending goods. One of the goods delivery companies in Indonesia is J&T Express Cicurug, Sukabumi Regency, West Java. In the process of shipping goods, of course, a shipping line with the shortest distance is needed in order to streamline the process of sending goods. Delivery route problems can be solved using the Traveling Salesman Problem algorithm, in this study using the K-Nearest Neighbor (KNN) algorithm, the Greedy algorithm, and the Brute Force algorithm. This study aims to determine and compare the routes and distances traveled in the delivery of goods using the K-Nearest Neighbor algorithm, the Greedy algorithm and the Brute Force algorithm. The results obtained are that the K-Nearest Neighbor algorithm produces a total distance of 24.05 km, for the Greedy algorithm it produces a total distance of 23.5 km. Meanwhile, with the Brute Force algorithm, it is equal to 21.74 km. So using the Brute Force algorithm can produce better routes and total mileage compared to the K-Nearest Neighbor algorithm and the Greedy algorithm.

Abstrak. Sistem transaksi jual beli yang sudah banyak masyarakat memanfaatkannya saat ini adalah dengan sistem jual beli online. Pada sistem jual beli online tentu terdapat proses pengiriman barang. Salah satu perusahaan pengirim barang yang ada di Indonesia ialah J&T Express Cicurug Kabupaten Sukabumi Jawa Barat. Pada proses pengiriman barang tentu perlu suatu rute pengiriman dengan jarak tempuh yang terpendek agar dapat mengefisienkan proses pengiriman barang. Permasalahan rute pengiriman barang dapat diselesaikan dengan algoritma pada Travelling Salesman Problem, dalam penelitian ini yaitu menggunakan algoritma K-Nearest Neighbor (KNN), algoritma Greedy, dan algoritma Brute Force. Penelitian ini bertujuan untuk menentukan serta membandingkan rute dan jarak tempuh dalam pengiriman barang menggunakan algoritma K-Nearest Neighbor, algoritma Greedy dan algoritma Brute Force. Hasil yang diperoleh yaitu dengan algoritma K-Nearest Neighbor menghasilkan total jarak tempuh sepanjang 24,05 km, untuk algoritma Greedy menghasilkan total jarak tempuh sebesar 23,5 km. Sedangkan dengan algoritma Brute Force yaitu sebesar 21,74 km. Jadi, dengan menggunakan algoritma Brute Force dapat menghasilkan rute dan total jarak tempuh yang lebih baik dibandingkan dengan algoritma K-Nearest Neighbor dan algoritma Greedy.

Published
2023-01-28