key: cord-0057923-oug0jh6c authors: Baytürk, Engin; Esnaf, Sakir; Kucukdeniz, Tarik title: Two-Phase Fuzzy C-Means and Genetic Algorithm for Food Distribution date: 2020-10-05 journal: Digital Conversion on the Way to Industry 4.0 DOI: 10.1007/978-3-030-62784-3_38 sha: a6316bdd1835a65e35f2f8bc487b7df31153c506 doc_id: 57923 cord_uid: oug0jh6c Covid-19 is a pandemic that effects all around the world nowadays. Some countries decided to isolate areas to reduce the spreading of the virus. During this isolation, one of the most important things for people to get food and necessary items to survive during lockdown period. In this study, two-phase Fuzzy C-Means and Genetic Algorithms proposed for this problem. Proposed algorithm compared with genetic algorithm in a real case study in Kuwait. As a result, prosed algorithm gives better result according to total travelled distance by all trucks. COVID-19 is a virus that has been reported by health officials in China on September 2019 as a first time. The first infected group of people are detected in Wuhan City, China [4] . Since then, thousands of people were infected and died because of the virus in China. The virus continued to spread across the world very quickly. Nowadays, more than 7 million of people affected by the virus in all around the world. World Health Organization (WHO) determined many precautionary plans to reduce spreading of the virus. During Covid-19, some countries isolate the areas where number of cases count considerably a lot to reduce rate of virus spread. However, people who are in the lockdown areas need basic goods such as water, bread and so on to survive during this period. Kuwait, one of the Middle East countries fighting with Covid-19, provides basic goods to people who are in lockdown areas during this time period. While people collect their needs from trucks, there are a lot of people that build a line, and thus, they may increase the rate of virus spread. Travelling salesman problem (TSP) is an NP-hard problem which aims to reach find minimum total travelled distances or minimum total time in a case that each city is visited only once [7] . Travelling salesman problem is a special version of multiple travelling salesman problem (mTSP) which the number of salesmen (m) is equal to one. Heuristics can be utilized for solving travelling salesman problem [1] . To solve multiple travelling salesman problem (mTSP) some heuristic approaches are provided by researches such as ant colony optimisation algorithm [5] , particle swarm optimization [12] and genetic algorithm [8] . Fuzzy C-Means (FCM) algorithm first proposed by [6] . The FCM method is a fuzzy version of the k-means algorithm and the aim is to minimize the objective function [10] . After this study, researches provided different hybrid algorithms to improve performance of the FCM such as, Fuzzy C-Means and Centre of Gravity (FCM-COG) [9] , Fuzzy C-Mean and Nelder-Mead (FCM-NM) [11] . In mTSP, there are researches that combine clustering algorithms and Genetic Algorithm in various studies. Xu et al. [13] introduce the two-phase heuristic algorithm for mTSP, in the first phase cities are grouped using K-means algorithm and in the second phase, route planning is provided to find minimum total travelled distance by genetic algorithm. Kumar et al. [2] provides a hybrid algorithm that combines a Fuzzy C-Means and Genetic Algorithm (FCM-GA) to solve travelling salesman problem (TSP) which number of travelling salesman is equal to 1. In conclusion, this algorithm gives effective solution to the TSP. In this study, two phase Fuzzy C-Means and Genetic Algorithm is proposed as alternative way of food distribution to lockdown areas during Covid-19. Proposed algorithm provides a solution to Multiple Travelling Salesman Problem (mTSP). Multiple travelling salesman problem (mTSP) aims to find minimum total travelled distances or minimum total time by using m travelling salesmen. In this particular problem, each city needs to be visited once by one travelling salesman. With the proposed algorithm we strongly believe that there will be no long queues to collect necessary items since trucks will visit all streets one by one. The reason why, this way rate of the virus can be reduced. Proposed algorithm first using Fuzzy C-Means Algorithm, assign streets to trucks with a minimum total distance. In the second phase, problem is solved as a travelling salesman problem for each truck individually. In this case study, since, the capacity of each truck is bigger than total demand, multiple travelling salesman problem (mTSP) is considered instead of vehicle routing problem (VRP). According to best of our knowledge, no research has been done with Fuzzy C-Means and Genetic Algorithm regarding with food distribution during Covid-19. The motivation study is the opinion that the vehicles are parked in square of areas during the food distribution, there are long queues in front of the vehicles and this can be effective in spreading the virus. The rest of paper is organized as follows, in the second section problem definition is discussed and general formulation of multiple travelling salesman problem (mTSP) is given. In the third section, proposed algorithm is discussed. In the fourth section, result of proposed algorithm and comparison of algorithms are provided. In the last section of the paper contains discussion about conclusion and suggestions for the future researches. Multiple travelling salesman problem (mTSP) aims to find minimum total travelled distances or minimum total time by using n travelling salesmen. In this particular problem, each city needs to be visited once by one travelling salesman. The mathematical model proposed by [3] is given below in Eq. (1)-(4): Subject to: where, i: cities should be visited by salesmen (i = i,….,n) t: salesman (t = 1,…,m) d ij : distance between city i to city j X ijt : if the salesman visited city j right after city i X ijt = 1, otherwise X ijt = 0 y ti : if the salesman t visited city I y ti = 1, otherwise y ti = 0 In here, Eq. 1 refers to objective function which calculates minimum total travelled distances by all travelling salesmen. Equation 2 ensures each city will be visited one time by one travelling salesman. Equation 3 and 4 provides that all salesmen's starting and end will be in from the same city. In this part, Fuzz C-Means (FCM) and two-phase Fuzzy C-Means and Genetic Algorithm (FCM-GA) methods will be explained in detail. 1) Fuzzy C-Means Algorithm: Fuzzy C-Means algorithm first discussed by [6] . Fuzzy C-Means algorithm is fuzzied version of K-Means algorithm and aims to reach minimum objective function value [10] . Steps of Fuzzy C-Means algorithm is given in Eq. (5)-(7) [3] : Step 1: Initially, U (0) = [u ij ] membership matrix is assigned randomly. Step 2: Cluster centers are calculated by Eq. (2): Step 3: Membership values are updated by Eq. (3): Step 4: Algorithm stops if the differences between total costs (J p ) that are calculated by consecutive membership matrixes U k , U k+1 less than stopping criteria. c: number of clusters n: number of customers p: coefficient of membership c j : coordinates of cluster centre j [u ij ]: membership matrix ai: coordinates of customer i J p (U,c): total cost function a i À c j : Euclidean distance between customer i and cluster j 2) Two Phase Fuzzy C-Means and Genetic Algorithm: Two phase FCM-GA steps are as follows: Phase 1: In this phase, FCM is used to assign customers to clusters. Step 1: k number of customers is divided into (c j ) sub clusters. For this: Step 1.1: Using FCM, k number of cluster centres are determined. Step 1.2: Customers are assigned to closest cluster centre. Sub clusters are created by assigned customers. Step 2: Objective function is calculated with membership matrix. Step 3: Algorithm stops if the differences between total costs (J p ) that are calculated by consecutive membership matrixes U k , U k+1 less than stopping criteria. When the algorithm stops, final version of cluster centres is determined. So, n number of customers are assigned to k number of sub clusters with a minimum total cost. After clustering with FCM algorithm, multiple travelling salesman problem is divided into k number of individual travelling salesman problem. Phase 2: Genetic algorithm is employed to solve travelling salesman problem. Step 1: Clusters are calculated by FCM algorithm are considered as k number of travelling salesman problem. Step 2: Each travelling salesman problem is calculated by Genetic Algorithm and minimum total travelled distance are calculated. Step 3: If difference between consecutive total costs is less than stopping criteria, algorithms stops and minimum total travelled distance of travelling salesman problem is found. Step 4: When each minimum total travelled distance of n number of travelling salesman is found, algorithm sum the total travelled distances of each clusters. In this part of the paper, results obtained from two phase FCM-GA and GA are discussed and compared with each other. Data collected from one of the lockdown areas in Kuwait during Covid-19. In real case, 4 trucks are used to distribute food in this area. The reason why, 4 trucks will be used in both algorithms as a comparison. Each algorithm is run 1000 times and comparison is made by average total travelled distance. One of the results obtained from MATLAB using Genetic algorithm that has been used as multiple travelling salesman problem is given in Fig. 1 . Clustering result obtained by MATLAB using Fuzzy C-Means is given in Fig. 2 . After clusters are determined by Fuzzy C-Means algorithm, problem is held as four separate travelling salesman problem. Then, each total travelling distance are added to find total travelled distance of method. Example of individual travelling salesman problem solution after FCM algorithm using by MATLAB is given Fig. 3 . Algorithms are stopped after 1000 trials and averages of total travelled distances are calculated for both methods. Comparison of both methods is given in the Table 1 below. Area that has been used to compare algorithms has 100 streets and now four trucks are used to deliver food to people who live in this area. As a result of average total travelled distances, two phase FCM-GA performs better than GA after 1000 trials. In this study a two phase FCM-GA proposed and compared with GA using the real data case study for food distribution during Covid-19. As a result, proposed algorithm performs better than GA in terms of total travelled distances. In the future studies, Fuzzy C-Means and Nelder-Mead method can be used to determine clusters of food distribution points. This method can be compared with GA and two phase FCM-GA in terms of total travelling cost. In addition to this, proposed algorithms can be compared using most common data sets in multiple travelling salesman problem according to total travelled distances and CPU time. Optimization of multipletraveling salesmen problem by a novel representation based genetic algorithm Travelling salesman problem using genetic algorithm and fuzzy c-mean clustering algorithm Fuzzy Clustering and Data Analysis Toolbox for Use with Matlab Coronavirus Disease Implementation of travelling salesman problem using ant colony optimization Pattern Recognition with Fuzzy Objective Function Algorithms Computers and Intractability: A Guide to the Theory of NP-Completeness Solving TSP using genetic algorithms-case of Kosovo A fuzzy clustering-based hybrid method for a multi-facility location problem A MATLAB toolbox and its web based variant for fuzzy cluster analysis Hybrid revised weighted fuzzy c-means clustering with Nelder-Mead simplex algorithm for generalized multisource Weber problem Solve traveling salesman problem using particle swarm optimization algorithm Two phase heuristic algorithm for the multipletravelling salesman problem