# Cost-Optimization Problem with a Soft Time Window Based on an Improved Fuzzy Genetic Algorithm for Fresh Food Distribution

Authors: Yong Ming Wang; Hong Li Yin
Journal: Mathematical Problems in Engineering
 (2018)

---

## Abstract

Given the increasing demand for fresh food quality, fresh food plants must manage not only product cost but more importantly the product quality. The transportation requirements for fresh food delivery have been continuously increasing. The purpose of this paper is to develop a method to ensure that fresh food can be delivered just in time and with minimum total cost while maintaining the quality of fresh food. Considering that fresh food plants need multiple trucks to deliver multiple products to numerous geographically dispersed customers, the delivery of fresh food is considered in two stages in our study. The first stage is cluster consumers; that is, we determine to which consumers each truck is responsible for delivery. The second stage, which is based on the consumer grouping results, develops a total cost model that includes the transportation, refrigerated, devalued, and penalty costs incurred during distribution. This model is used to determine the optimal route selection, the temperature control, and the average speed of each truck in distribution. This paper designs decision variables based on a customer’s seven requirement attributes; it also proposes a fuzzy clustering method for grouping customers and improves a fuzzy genetic algorithm that is used to solve the proposed total cost model. The application of the proposed method is demonstrated using an example. The experimental results show that the proposed method has better performance than that of a traditional genetic algorithm. This research work provides an optimal distribution total cost decision method for the logistics managers. This research also provides an effective means to ensure the safety of fresh food.


---

## Body

## 1. Introduction

Food quality is one of the crucial considerations in the fresh food supply chain. High-quality food not only has higher market value but also is very important to ensuring food safety. Researchers all over the world are highly concerned with food safety [1, 2]. Researchers believe that one of the most important factors in ensuring food safety is the transportation and distribution of food. Fresh food plants choose the best route for transportation and distribution; improving transportation conditions can reduce logistics costs and improve food safety. Therefore, efficient transportation and distribution management are increasingly more important to the fresh food supply chain. Fresh food will begin to deteriorate once it is produced. How to complete the distribution of fresh food in a timely fashion and at minimal cost is a key and challenging decision point while ensuring customer satisfaction. In this problem, the transportation and distribution of fresh food from plant to multiple geographically dispersed customers using an indefinite quantity of refrigerated trucks are considered. The decisions to be made include the following: (1) What is the best delivery path? (2) How does one control the refrigerated temperature to maximize fresh food quality? (3) How does one complete delivery at minimal cost?With market competition and consumer demand gradually increasing, research on fresh food, particularly chilled and frozen food transportation, has increased in recent years [3–7]. In the existing literature on distribution of fresh food, there are three key problems. First, these studies consider the distribution of a single product, for the fresh food supply chain, mixed loading and distribution are more practical and important; however, there is minimal research. Second, In contrast to other products’ supply chain management, the fresh food supply chain should not only consider the benefits but also focus more on the quality of the food [8–10]. Transport routes, transport speed, and storage temperatures are frequently considering three aspects during food distribution, and the existing research work mainly focused on a particular aspect; do not take all three into account. Third, the distribution area is divided into fixed small areas based on geographical location, a vehicle is responsible for food distribution in a small area. The division of small distribution areas should not only consider geographical location, but also be related to customers' demand for food, customers' demand for the time window of food distribution, the value of ordered foods by customers, and other factors. Given this focus, this study considers the change in food quality in the fresh food supply chain during the process of delivering multiple products.This study proposes a solution method for supporting a fresh food supply and making important decisions on the transportation and distribution of fresh food to customers from a plant. Consider a fresh food plant that delivers a variety of products to geographically dispersed customers with a fixed number of refrigerated trucks. The distribution of fresh food is considered in two stages. The first stage is cluster consumers, that is, determining to which consumers each truck is responsible for distributing. The second stage is based on the consumer grouping result and develops a total cost model that includes the transportation, refrigerated, devalued, and penalty costs incurred during distribution. The model is used to determine the optimal route selection, the temperature control, and the average speed of each truck during distribution.This paper is based on customer requirement attribute design decision variables; it then proposes a fuzzy clustering method for grouping customers. This process is to classify many consumers according to the demand, the geographical location, the time window, the food value, the storage temperature, the consumer's demand for food safety, and the consumers' desire. A heuristic algorithm is used to illustrate the proposed total cost model. This study is an excellent example of how to distribute multiple fresh foods from a small fresh food plant. This study better reflects the distribution process of a small fresh food plant. The research has practical applications to logistics. First, a fuzzy clustering algorithm is used to classify the actual situation of 24 consumers. Then, after the classification, the traditional genetic algorithm and the improved fuzzy genetic algorithm are applied to explain the proposed total cost function. The results show that a genetic algorithm is an effective method to solve the problem. In this study, a genetic algorithm based on fuzzy logic was used to improve the performance of the algorithm. The advantage of the improved genetic algorithm is analysed.This paper is organized as follows. The second section is a literature review of the optimization method of logistics distribution for a fresh food supply chain. The third section establishes the total cost model. The fuzzy clustering method based on customer requirements is provided in section four. The fifth section provides an improved fuzzy genetic algorithm for the total cost model. The sixth section shows the simulation results. The seventh section summarizes the research results and provides suggestions for future research.


## 2. Literature Review

Fresh food has a short shelf life and perishable characteristics. Fresh food has a high requirement for preservation and quality, which not only leads to the loss of fresh food but also leads to frequent food quality and safety accidents. As one of the important food categories in people's lives, fresh food has great influence on the food safety of consumers. In recent years, the research on the fresh food supply chain has garnered increasingly more scholars' focus. The quality of fresh food has been studied extensively through optimizing supply chain management. Rong et al. [4] considered the problem of quality loss in producing and distributing fresh food and provided a methodology for the control quality of fresh food. Rediers et al. [11] proposed a whole-chain approach to effective control fresh food safety and quality assurance and identified key points to improve the quality and safety of fresh food. Wang X et al. [12] adopted tracking and monitoring technologies, captured perishable food shelf life information, and presented a dynamic evaluation method of perishable food quality. The objective is to improve food quality and maximize retailer profit. Tsao [13] designed a fresh food supply network model to determine the optimal service plan and the best quality control of fresh food and to maximize the total cost of the supply chain. Yu et al. [14] developed a network-based food supply chain model for fresh food. The deterioration of food is indicated by introduced arc multipliers; the differentiation of food is based on the freshness and safety of fresh food. Bruzzone et al. [15] developed an analytical model to prevent or mitigate the contamination of fresh food. The model can reproduce the spread of contaminative fresh food along the supply chain and the dynamic evolution of contaminated food. The model can also assess the impact on supply chain utility. Zhang Y et al. [16] analysed the key factors affecting food safety and developed the structural interpretation model to find the relationship between the key factors. Suggestions and measures to control food safety were obtained.A key point to ensure the safety of fresh food is a fast and secure delivery process. In recent years, the logistics distribution of fresh food has garnered the focus of researchers. Most of the literature focuses on the distribution of one product to multiple consumers; there is less research on the distribution of multiple products at the same time. Sun M et al. [17] constructed a mixed-integer programming model for the distribution and logistics problem. This problem is solved by branch-and-bound (B&B) algorithms. Behzadi G et al. [18] developed a robust optimization model for cold chain food logistics with uncertainty and customer time-windows restrictions; the model’s objective is to maximize food safety and minimize transportation cost.In the study of fresh food distribution, more focus is on the choice of route. Osvald A et al. [19] developed an algorithm for the distribution of fresh vegetables. The algorithm considered the influence of the perishability of vegetables on the distribution value and used the tabu search algorithm to solve the problem. Zou Yet al. [20] established an optimal model of fresh food distribution routing with a time window based on the safety and reliability of food and used the MAX-MIN Ant System (MMAS) to solve this model. Govindan K et al. [21] proposed a multiobjective optimization model for a two-echelon location–routing problem with time-windows. The goal of this model was to determine the number and location of facilities and to optimize the quantity of products delivered to lower stages and routes at each level. Amorim P et al. [22] proposed a novel multiobjective model, and the purpose of the model was the minimization of the distribution cost and the maximization of the freshness state of the perishable food. The relationship between freshness and distribution scenarios of perishable food was also analysed. Belo-Filho M A F et al. [23] targeted a joint decisions problem in the scheduling of production and truck routing and proposed an adaptive large neighbourhood search (ALNS) framework; this framework was based on mixed-integer linear programming. This metaheuristic is more effective than the traditional approach for truck routing problems. Musavi M M et al. [24] presented a novel sustainable hub location-truck scheduling model; the model considered the perishability of food, transportation cost, and carbon emission; this problem was modelled using a multiobjective mixed-integer linear programming and adopted nondominated sorting genetic algorithm-II (NSGA-II) to solve this problem. Vehicle routing problem has many uncertainties and fuzziness. Fuzzy decision is a good way to deal with this kind of problems. Zhang J Y et al. [25] used fuzzy numbers to handle uncertain travelling time of the VRP, based on the effective combination of the genetic algorithm and fuzzy logistic, and developed a hybrid genetic algorithm with fuzzy travelling time. Zhang Q et al. [26] proposed a fuzzy genetic algorithm to solve vehicle routing problem and used fuzzy logistic controller dynamic determined crossover probability and mutation probability. Björk K M et al. [27] thought of times and distances as fuzzy numbers and used mixed-integer linear programming and determined routing decisions, truck assignment, and the pickup order for a set of loads and available trucks. Ewbank H et al. [28] used a fuzzy clustering technique and analysed the fuzziness parameter of vehicle routing problem with homogeneous fleet. Fuzzy clustering results made the heuristic algorithm get better solution. Radojičić N et al. [29] proposed a fuzzy GRASP (Greedy Randomized Adaptive Search Procedure) hybridized with Path Relinking (PR) methodology for solving the RCTVRP. The proposed fuzzy GRASP with PR hybrid shows better computational performance compared to its nonfuzzy version.Researchers also focus on the study of temperature control in transportation. Montanari R [30] considered that temperature control was a critical issue in fresh food logistics; this objective could be achieved by technical and managerial solutions; this paper proposed a structured framework to minimize the logistics cost to guarantee food quality. Kuo J C et al. [31] proposed a logistics service model based on the advancement of the Multitemperature Joint Distribution System; this logistics service model is the innovation of the perishable food logistics mode. Aung M M et al. [32] believe that effective temperature controlling in perishable food distribution is the key to ensuring food safety; the optimal temperature control method for multicommodity refrigerated storage was proposed in this paper. Reis J G M D et al. [33] analysed the advantages of a quality management system in a food supply chain; the actual case analysis result showed that the quality management system is an effective method to solve the problem of temperature changes. Xue M et al. [34] presented an optimal temperature control model based on Pontryagin's maximum principle for the quality of perishable food. The objective function of this optimization problem includes reducing food quality damage and temperature control cost.The selection of truck speed during transportation is also key to guaranteeing the freshness of food. Zhang T et al. [35] considered transport speed and corruption rates, developed a mixed-integer nonlinear programming model, and analysed the influence of transport speed, corruption rates, and deteriorating rate for the whole supply chain.Comprehensive studies that consider transportation route, temperature control, and truck speed are not very common. Nakandala D et al. [36] developed a method for finding optimal transportation cost; this method considered the selection of the route, temperature control, and speed control during transportation. The researchers also used the three approaches of GA, FGA, and SA to demonstrate the transportation cost model.Our study will consider the route selection during fresh food distribution, the control of temperature, and the speed of transport trucks while minimizing the total cost and ensuring food safety.


## 3. Model Formulation

This model considers a plant product of multiple fresh foods. The plant rentsmtrucks to distribute fresh food to geographically dispersed customers, and every customer can order various fresh foods. This model reflects the scenario of distribution for a small fresh food plant. There are multiple customers that need to be serviced bym trucks; the distribution areas are divided intom small areas, and every truck is responsible for a small area. How to group the customers is one of the research questions. A truck can transport one or multiple types of fresh food; the truck load does not exceed the full load. Every truck starts from the plant; after delivering fresh food to one or multiple customers, the truck returns to the plant. If the planned period has not expired, the truck can do another distribution trip. However, the truck must follow the customers’ time window limit; otherwise, it will be punished. For a trip with multiple distribution points, route selection is a very important decision. Each truck starts from the plant. After delivering to customerk,there are multiple options for the next service customer: which customer is next? The next distribution point must be decided at every customer point, as shown in Figure 1.Figure 1
Route selection of a truck for delivering fresh food to multiple customers.The traditional route selection problem focuses on distance. However, for fresh food storage, temperature and average transportation speed are the first consideration, because the quality degradation of fresh food can result in greater loss and food safety problems. With the improvement of living standards, people's demand for food quality is increasing; customers restrict the distribution of fresh food to within a time window. Therefore, travel distance, storage temperature, and average speed are of equal importance in the fresh food transportation system. These three things must be considered in transportation.How to provide efficient distribution to ensure food safety while ensuring a fresh food plant obtains maximal profit is the question. We propose a mixed-integer formulation for this distribution scheduling problem; the model is based on certain key assumptions.Assumptions (i)
The lifetime of fresh food begins when it is loaded in a truck; a truck can distribute multiple fresh foods. (ii)
Fresh food is delivered to customers by truck; each customer’s demand can be satisfied with one truck. (iii)
The truck load does not exceed the full load; a truck is allowed to serve multiple customers. (iv)
A truck completes a full distribution during one trip. If the planned period has not expired, the truck can distribute the next trip; however, it must adhere to customer time window limits; otherwise it will be punished. (v)
The production capacity of a fresh food plant is fixed, but the total customer demand in a plan period can be met. (vi)
As soon as the fresh food is loaded on the truck, the refrigerated system must be opened. (vii)
The average speed of a truck and the storage temperature of fresh food are decided at every node; the average speed and the temperature remain constant during the truck’s movement from one node to the next node. (viii)
The initial quality of the fresh food is 10; the quality deterioration of the fresh food is related to store temperature and time. (ix)
A planning period is divided byh-1 discrete time points into equal intervals; that is, a plan period hash time units.Now we define the notations used in our model:Parameters I : Set of fresh foods L T i : Lifetime of fresh foodi N : Set of customers; N=0,1,2,3,⋯n, 0 denotes the plant. N′=N-0 C : The load of a full truck F : Fixed cost per truck in a plan period D k j : The distance between customerk and customerj, wherek= 0 denotes the distance between the plant and customerj V k j : Average truck speed from customerkto customerj, wherek = 0 denotes the average truck speed from the plant to customerj C ( V k j ) : Unit time travel cost at an average speed Vkj T k j : Storage temperature from customerkto customerj, wherek = 0 denotes the storage temperature from the plant to customerj T l : The lower limit of storage temperature T h : The upper limit of storage temperature C ( T k j ) : Unit time refrigerated cost when storage temperature is Tkj Y i k j : The transportation quantity of fresh foodifrom customerkto customerj q i j : The quality of fresh foodiwhen truck arrives at customerj k i ( T k j ) : Deterioration rate of fresh foodiwhen storage temperature is Tkj t n m d : Distribution start time of truckm for tripn t n m p : Production start time of vehiclem for tripn N k i : Fresh foodidemand of customerk r i : Fresh foodiproduction rate of plant t l k , t u k : Time window of customerk t k : Distribution time for customerk P ( t k ) : Unit time penalty cost if distribution time tk is not within the time windowDecision Variables (1) X k j m n = 1 i f   t r u c k   m   s e r v e s   c u s t o m e r   j after c u s t o m e r   k   i n   t r i p    n 0 o t h e r w i s e y m = 1 i f   t r u c k   m   i s   u s e d for d e livering  fresh  food 0 o t h e r w i s e Z i k j = 1 i f fresh  food i   i s   o n   t h e   t r u c k from c u s t o m e r   k   t o   c u s t o m e r   j 0 o t h e r w i s e W m n = 1 t r i p   n   o f   t r u c k   m   i s   a   p r i o r i t i z e d   s c h e m e 0 o t h e r w i s eThe total cost includes transportation, refrigerated, devalued [4, 37], and penalty costs [38]. Transportation cost includes the fixed cost of trucks in a plan period and the variable cost; the variable cost is associated with transportation distance and average speed. Refrigerated cost is the cost of using refrigerated equipment in the whole transportation process. Devalued cost is the loss cost of fresh food quality; it reflects the decrease in the food market value with storage time. Penalty cost is the punishment cost of distributing fresh food time for the customer outside the time window.The total cost function of distribution scheduling with a soft time window is as follows:The total cost = transportation cost + refrigerated cost + devalued cost + penalty cost


### 3.1. Transportation Cost

Transportation cost includes the fixed cost of trucks in a plan period and the variable cost; variable cost is associated with distance and average speed. Higher average speed,Vkj, means less transportation time; thus, transportation time savings can reduce cost not merely transportation cost but also refrigerated, devalued, and penalty costs. Dkj/Vkj is transportation time; C(Vkj) is unit time transportation cost at average speed Vkj, andF is fixed cost per truck in a plan period. Hence, transportation cost is the following formula:(2)∑k,j∈Nm,n∈N′CVkj×DkjVkj×Xkjmn+F×∑m∈N′ymHere, unit time transportation cost at an average speedVkj can be expressed by the following formula:(3)CVkj=αt×Vkjβt,αt>0,βt>0


### 3.2. Refrigerated Cost

Once the fresh food is loaded on a truck, the refrigerated system begins to work until the distribution of all fresh food is completed; the refrigerated system is set to meet the storage temperature. At each stage of transport, the storage temperature is adjusted for the type and quantity of fresh food. Here, a period of transport refers to transit from customerk to customerj. C(Tkj) is express unit time refrigerated cost, based on the research by Krugman [39]; the total refrigerated cost is the following formula:(4)∑k,j∈Nm,n∈N′CTkj×DkjVkj×XkjmnHere, unit time refrigerated cost when storage temperature isTkj can be expressed as the following formula:(5)CTkj=αc-βc×Tkjwhere αc represents the maximum unit time refrigerated value when the temperature is set to the minimum, and βc represents the rate of change in temperature.


### 3.3. Devalued Cost

For fresh food, the higher the quality, the higher the market value; that is, the lower the devalued cost. Therefore, the use of formula (6) as the expression of devalued cost per fresh food is appropriate.(6)αd×qβdwhereαd>0,βd<0Fresh food quality changes with transportation time and storage temperature; transportation time from customerk to customerj is Dkj/Vkj, and deterioration rate of fresh foodi is ki(Tkj) when storage temperature is Tkj. Therefore, when a truck arrives at customerj, the quality of fresh foodiis defined as (7)qij=qik-Zikj×DkjVkj×Xkjmn×kiTkjThe total devalued cost is expressed as (8)∑i∈Ik,j∈Nm,n∈N′α×qik-Zikj×DkjVkj×Xkjmn×kiTkjβ×Yikj


### 3.4. Penalty Cost

Due to traffic or truck conditions, the truck may not be on time. Therefore, distribution time for customerk may not lie within the time window; this will lead to punishment. Unit time penalty cost P(tk) is defined as (9)Ptk=atk<tlk0tlk≤tk≤tukbtk>tukThe total penalty cost is expressed as (10)∑k∈N′Ptk×max⁡tlk-tk,0+max⁡tk-tuk,0


### 3.5. Total Cost

Based on (2), (4), (8), and (10), the total cost function of distribution scheduling with a soft time window is the following formula:The total cost = transportation cost + refrigerated cost + devalued cost + penalty cost(11)min∑k,j∈Nm,n∈N′CVkj×DkjVkj×Xkjmn+F×∑m∈N′ym+∑k,j∈Nm,n∈N′CTkj×DkjVkj×Xkjmn+∑i∈Ik,j∈Nm,n∈N′α×qik-Zikj×DkjVkj×Xkjmn×kiTkjβ×Yikj+∑k∈N′Ptk×max⁡tlk-tk,0+max⁡tk-tuk,0subject to(12)∑k,j∈Ni∈IXkjmn×Nji≤C∀m,n∈N′,n0i=0Constraint (12) is a full load truck constraint.(13)∑j,m∈N′X0jmn=∑n∈N′Wmn∀m∈N′(14)∑j,m∈N′Xj0mn=∑n∈N′Wmn∀m∈N′Constraints (13) and (14) ensure every truck selects the optimal route.(15)∑k∈Nm,n∈N′Xkjmn=1∀j∈N′(16)∑j∈Nm,n∈N′Xkjmn=1∀i∈N′Constraints (15) and (16) ensure every customer is served and only once.(17)Xkjmn≤ym∀k,j∈N;m,n∈N′(18)Xkjmn≤Wmn∀k,j∈N;m.n,∈N′Constraints (17) and (18) ensure every customer is served by a special truck.(19)∑k∈Nj∈N′DkjVkj×Xkjmn≤LTi∀i∈IConstraint (19) ensures fresh food can be delivered before its lifetime expires.(20)tnmd+∑k∈Nj∈N′DkjVkj×Xkjmn≤h∀n,m∈N′Constraint (20) ensures fresh food can be delivered before the end of the plan period.(21)tnmd+∑k∈Nj∈N′DkjVkj×Xkjmn≤tn+1md∀n,m∈N′Constraint (21) ensures a truck must complete a trip and return to the plant; then it can start a new trip.(22)max⁡tnmp+∑k,j∈NXkjmn×nki×1ri≤tnmd∀n,m∈N′;∀i∈IConstraint (22) ensures production completion of fresh food before the distribution start time.(23)max⁡tnmp+∑k,j∈NXkjmn×nki×1ri≤tn+1mp∀n,m∈N′Constraint (23) ensures the plant must complete the production for tripk; then it can begin new production.(24)Tl≤Tkj≤Th∀k,j∈NConstraint (24) is the range of storage temperatures.(25)tlk≤tk≤tuk∀k∈NConstraint (25) ensures customerkneeds are serviced within the time window [tlk,tuk].


## 3.1. Transportation Cost

Transportation cost includes the fixed cost of trucks in a plan period and the variable cost; variable cost is associated with distance and average speed. Higher average speed,Vkj, means less transportation time; thus, transportation time savings can reduce cost not merely transportation cost but also refrigerated, devalued, and penalty costs. Dkj/Vkj is transportation time; C(Vkj) is unit time transportation cost at average speed Vkj, andF is fixed cost per truck in a plan period. Hence, transportation cost is the following formula:(2)∑k,j∈Nm,n∈N′CVkj×DkjVkj×Xkjmn+F×∑m∈N′ymHere, unit time transportation cost at an average speedVkj can be expressed by the following formula:(3)CVkj=αt×Vkjβt,αt>0,βt>0


## 3.2. Refrigerated Cost

Once the fresh food is loaded on a truck, the refrigerated system begins to work until the distribution of all fresh food is completed; the refrigerated system is set to meet the storage temperature. At each stage of transport, the storage temperature is adjusted for the type and quantity of fresh food. Here, a period of transport refers to transit from customerk to customerj. C(Tkj) is express unit time refrigerated cost, based on the research by Krugman [39]; the total refrigerated cost is the following formula:(4)∑k,j∈Nm,n∈N′CTkj×DkjVkj×XkjmnHere, unit time refrigerated cost when storage temperature isTkj can be expressed as the following formula:(5)CTkj=αc-βc×Tkjwhere αc represents the maximum unit time refrigerated value when the temperature is set to the minimum, and βc represents the rate of change in temperature.


## 3.3. Devalued Cost

For fresh food, the higher the quality, the higher the market value; that is, the lower the devalued cost. Therefore, the use of formula (6) as the expression of devalued cost per fresh food is appropriate.(6)αd×qβdwhereαd>0,βd<0Fresh food quality changes with transportation time and storage temperature; transportation time from customerk to customerj is Dkj/Vkj, and deterioration rate of fresh foodi is ki(Tkj) when storage temperature is Tkj. Therefore, when a truck arrives at customerj, the quality of fresh foodiis defined as (7)qij=qik-Zikj×DkjVkj×Xkjmn×kiTkjThe total devalued cost is expressed as (8)∑i∈Ik,j∈Nm,n∈N′α×qik-Zikj×DkjVkj×Xkjmn×kiTkjβ×Yikj


## 3.4. Penalty Cost

Due to traffic or truck conditions, the truck may not be on time. Therefore, distribution time for customerk may not lie within the time window; this will lead to punishment. Unit time penalty cost P(tk) is defined as (9)Ptk=atk<tlk0tlk≤tk≤tukbtk>tukThe total penalty cost is expressed as (10)∑k∈N′Ptk×max⁡tlk-tk,0+max⁡tk-tuk,0


## 3.5. Total Cost

Based on (2), (4), (8), and (10), the total cost function of distribution scheduling with a soft time window is the following formula:The total cost = transportation cost + refrigerated cost + devalued cost + penalty cost(11)min∑k,j∈Nm,n∈N′CVkj×DkjVkj×Xkjmn+F×∑m∈N′ym+∑k,j∈Nm,n∈N′CTkj×DkjVkj×Xkjmn+∑i∈Ik,j∈Nm,n∈N′α×qik-Zikj×DkjVkj×Xkjmn×kiTkjβ×Yikj+∑k∈N′Ptk×max⁡tlk-tk,0+max⁡tk-tuk,0subject to(12)∑k,j∈Ni∈IXkjmn×Nji≤C∀m,n∈N′,n0i=0Constraint (12) is a full load truck constraint.(13)∑j,m∈N′X0jmn=∑n∈N′Wmn∀m∈N′(14)∑j,m∈N′Xj0mn=∑n∈N′Wmn∀m∈N′Constraints (13) and (14) ensure every truck selects the optimal route.(15)∑k∈Nm,n∈N′Xkjmn=1∀j∈N′(16)∑j∈Nm,n∈N′Xkjmn=1∀i∈N′Constraints (15) and (16) ensure every customer is served and only once.(17)Xkjmn≤ym∀k,j∈N;m,n∈N′(18)Xkjmn≤Wmn∀k,j∈N;m.n,∈N′Constraints (17) and (18) ensure every customer is served by a special truck.(19)∑k∈Nj∈N′DkjVkj×Xkjmn≤LTi∀i∈IConstraint (19) ensures fresh food can be delivered before its lifetime expires.(20)tnmd+∑k∈Nj∈N′DkjVkj×Xkjmn≤h∀n,m∈N′Constraint (20) ensures fresh food can be delivered before the end of the plan period.(21)tnmd+∑k∈Nj∈N′DkjVkj×Xkjmn≤tn+1md∀n,m∈N′Constraint (21) ensures a truck must complete a trip and return to the plant; then it can start a new trip.(22)max⁡tnmp+∑k,j∈NXkjmn×nki×1ri≤tnmd∀n,m∈N′;∀i∈IConstraint (22) ensures production completion of fresh food before the distribution start time.(23)max⁡tnmp+∑k,j∈NXkjmn×nki×1ri≤tn+1mp∀n,m∈N′Constraint (23) ensures the plant must complete the production for tripk; then it can begin new production.(24)Tl≤Tkj≤Th∀k,j∈NConstraint (24) is the range of storage temperatures.(25)tlk≤tk≤tuk∀k∈NConstraint (25) ensures customerkneeds are serviced within the time window [tlk,tuk].


## 4. Fuzzy Clustering Method Based on Customer Requirements

A fresh food plant has certain customers; based on customer requirement attributes’ design decision variables, we then use the fuzzy clustering method for grouping customers. The clustering method can effectively solve the problem of the logistics distribution of one-to-many, ensure food safety and customer satisfaction at the same time as the integration of logistics resources, and reduce distribution cost. The fuzzy clustering method includes four steps:(1) the determination of decision variables; (2) the handling of the decision variables; (3) the calculation of fuzzy similarity and creation of the fuzzy similar matrix; and (4) customer clustering.


### 4.1. Decision Variables

In the distribution, the fresh food plant is mainly concerned with transport cost and customer satisfaction. Customers are concerned chiefly with the delivery punctuality, the safety of fresh food, and the service attitude. Based on these indicators, seven decision variables are designed:xj1,xj2,xj3,xj4,xj5,xj6, and xj7. xj1 is the fresh food demand of customer j in a plan period. xj2 is the geographic position of customer j. xj3 is the time window of customer j. xj4 is the value of fresh food that is delivered to customer j. xj5 is the storage temperature similarity of fresh food that is delivered to customer j. xj6 is the fresh food security requirement of customer j. xj6 is the desired service quality of customer j.xj1,xj2,xj3,xj4 are quantitative decision variables; xj5,xj6,xj7 are qualitative decision variables.


### 4.2. The Handling of the Decision Variables

x j 1 is the fresh food demand of customer j in a plan period. xj1 combined with a full load of truck C is one of the key conditions to determine whether customer clustering is ceased; no special handling is required.


#### 4.2.1. The Handling of Qualitative Decision Variables

The handling of qualitative decision variablesxj5,xj6,xj7 uses five language levels to evaluate customer needs. These five language levels are very high, high, middle, low, and very low; the corresponding triangular fuzzy number is shown in Table 1. Each qualitative decision variable of customer j can be represented by three values:(26)xjk=αj,1k,αj,2k,αj,3k,k=5,6,7Table 1
The triangular fuzzy number corresponding to the five levels.
The evaluating value α j , 1 k α j , 2 k α j , 3 k Very low 0 0 0.125 low 0 0.25 0.25 middle 0.25 0.5 0.5 high 0.5 0.75 0.75 Very high 0.75 1 1


#### 4.2.2. The Handling of Quantitative Decision Variables

Because the dimension ofxj2,xj3, and xj4 is different, to make the similarity of the quantitative decision variables lie within the limit in [0,1], the quantitative decision variables are normalized; as shown in formula (27), the normalized decision variables are treated as unique fuzzy numbers.(27)x~jk=xjk-min⁡xjkmax⁡xjk-min⁡xjk,k=2,3,4


### 4.3. The Calculation of Fuzzy Similarity and the Creation of a Fuzzy Similar Matrix

Supposexik and xjk, respectively, express the value of customeriand customerj for quantitative decision variablek; then, the similarity between them is defined as the following formula:(28)Sxik,xjk=1-xjk-min⁡xjkmax⁡xjk-min⁡xjkThe similarity between any two customer attributes can be calculated by the similarity between decision variables; the formulas are shown in(29)Sij=∑k=17φkSxik,xjk(30)∑k=17φk=1,φk≥0where φk is the weight of the decision variablek, and the fuzzy similarity symmetric matrix S=(Sij)n×n is constructed according to the similarity between customers.


### 4.4. Customers Clustering

According to the fuzzy similarity matrix, customers with higher similarity are divided into the same distribution group; the algorithm terminates when all customers are arranged. The algorithm steps are as follows.Step 1.
Take any upper cluster customer group; enter the fuzzy similarity matrixS, and initialize the customer cluster number t=1.Step 2.
Initialize the calculation cycle; make the initial cycle counth=1.Step 3.
Start the loop at random target customerj, and delete line sj′ that is related to target customerj in the fuzzy similarity matrix S.Step 4.
SetM to represent a set of customers that are assigned to the same group with customerj in the column sj, M=j.(1)
Find the largest elementsij in the column sj, and then follow these steps to obtain clustering.(2)
Ifsij≥λ and ∑s∈Sxs1≤C are satisfied at the same time, consumeri and consumerj are assigned to the same customer group, M=j,i; delete line si′.(3)
h=h+1. Return to Step 1 and continue to check for other elements until no element meets the above clustering conditions.(4)
Remove columnsj from matrix S.Step 5.
If all consumers are assigned, the clustering algorithm stops; otherwise,t=t+1, and returns to Step 2 beginning the next cycle.
Hereλ is the evaluation criteria of consumers similarity. To produce a reasonable clustering number of consumers, the λ value is generally greater than 0.5.


## 4.1. Decision Variables

In the distribution, the fresh food plant is mainly concerned with transport cost and customer satisfaction. Customers are concerned chiefly with the delivery punctuality, the safety of fresh food, and the service attitude. Based on these indicators, seven decision variables are designed:xj1,xj2,xj3,xj4,xj5,xj6, and xj7. xj1 is the fresh food demand of customer j in a plan period. xj2 is the geographic position of customer j. xj3 is the time window of customer j. xj4 is the value of fresh food that is delivered to customer j. xj5 is the storage temperature similarity of fresh food that is delivered to customer j. xj6 is the fresh food security requirement of customer j. xj6 is the desired service quality of customer j.xj1,xj2,xj3,xj4 are quantitative decision variables; xj5,xj6,xj7 are qualitative decision variables.


## 4.2. The Handling of the Decision Variables

x j 1 is the fresh food demand of customer j in a plan period. xj1 combined with a full load of truck C is one of the key conditions to determine whether customer clustering is ceased; no special handling is required.


### 4.2.1. The Handling of Qualitative Decision Variables

The handling of qualitative decision variablesxj5,xj6,xj7 uses five language levels to evaluate customer needs. These five language levels are very high, high, middle, low, and very low; the corresponding triangular fuzzy number is shown in Table 1. Each qualitative decision variable of customer j can be represented by three values:(26)xjk=αj,1k,αj,2k,αj,3k,k=5,6,7Table 1
The triangular fuzzy number corresponding to the five levels.
The evaluating value α j , 1 k α j , 2 k α j , 3 k Very low 0 0 0.125 low 0 0.25 0.25 middle 0.25 0.5 0.5 high 0.5 0.75 0.75 Very high 0.75 1 1


### 4.2.2. The Handling of Quantitative Decision Variables

Because the dimension ofxj2,xj3, and xj4 is different, to make the similarity of the quantitative decision variables lie within the limit in [0,1], the quantitative decision variables are normalized; as shown in formula (27), the normalized decision variables are treated as unique fuzzy numbers.(27)x~jk=xjk-min⁡xjkmax⁡xjk-min⁡xjk,k=2,3,4


## 4.2.1. The Handling of Qualitative Decision Variables

The handling of qualitative decision variablesxj5,xj6,xj7 uses five language levels to evaluate customer needs. These five language levels are very high, high, middle, low, and very low; the corresponding triangular fuzzy number is shown in Table 1. Each qualitative decision variable of customer j can be represented by three values:(26)xjk=αj,1k,αj,2k,αj,3k,k=5,6,7Table 1
The triangular fuzzy number corresponding to the five levels.
The evaluating value α j , 1 k α j , 2 k α j , 3 k Very low 0 0 0.125 low 0 0.25 0.25 middle 0.25 0.5 0.5 high 0.5 0.75 0.75 Very high 0.75 1 1


## 4.2.2. The Handling of Quantitative Decision Variables

Because the dimension ofxj2,xj3, and xj4 is different, to make the similarity of the quantitative decision variables lie within the limit in [0,1], the quantitative decision variables are normalized; as shown in formula (27), the normalized decision variables are treated as unique fuzzy numbers.(27)x~jk=xjk-min⁡xjkmax⁡xjk-min⁡xjk,k=2,3,4


## 4.3. The Calculation of Fuzzy Similarity and the Creation of a Fuzzy Similar Matrix

Supposexik and xjk, respectively, express the value of customeriand customerj for quantitative decision variablek; then, the similarity between them is defined as the following formula:(28)Sxik,xjk=1-xjk-min⁡xjkmax⁡xjk-min⁡xjkThe similarity between any two customer attributes can be calculated by the similarity between decision variables; the formulas are shown in(29)Sij=∑k=17φkSxik,xjk(30)∑k=17φk=1,φk≥0where φk is the weight of the decision variablek, and the fuzzy similarity symmetric matrix S=(Sij)n×n is constructed according to the similarity between customers.


## 4.4. Customers Clustering

According to the fuzzy similarity matrix, customers with higher similarity are divided into the same distribution group; the algorithm terminates when all customers are arranged. The algorithm steps are as follows.Step 1.
Take any upper cluster customer group; enter the fuzzy similarity matrixS, and initialize the customer cluster number t=1.Step 2.
Initialize the calculation cycle; make the initial cycle counth=1.Step 3.
Start the loop at random target customerj, and delete line sj′ that is related to target customerj in the fuzzy similarity matrix S.Step 4.
SetM to represent a set of customers that are assigned to the same group with customerj in the column sj, M=j.(1)
Find the largest elementsij in the column sj, and then follow these steps to obtain clustering.(2)
Ifsij≥λ and ∑s∈Sxs1≤C are satisfied at the same time, consumeri and consumerj are assigned to the same customer group, M=j,i; delete line si′.(3)
h=h+1. Return to Step 1 and continue to check for other elements until no element meets the above clustering conditions.(4)
Remove columnsj from matrix S.Step 5.
If all consumers are assigned, the clustering algorithm stops; otherwise,t=t+1, and returns to Step 2 beginning the next cycle.
Hereλ is the evaluation criteria of consumers similarity. To produce a reasonable clustering number of consumers, the λ value is generally greater than 0.5.


## 5. Improved Fuzzy Genetic Algorithm

This section illuminates how to solve the total cost model. This problem is an NPC problem; the computational time increases exponentially with the number of the customers. The methods of solving this kind of problem mainly include a precise algorithm and an approximate algorithm. A genetic algorithm is an approximate algorithm; it is an optimization method of parallel computing. In our model, the goal is to minimize total cost, route selection, and average speed, and storage temperature needs to be determined. Undoubtedly, GA is a suitable method for this problem; it can obtain an approximate solution for this complex problem. However, GA has shortcomings such as precocious convergence. To overcome the precocious convergence of a genetic algorithm, an improved fuzzy genetic algorithm is proposed. The cross rate and mutation rate of the genetic algorithm are controlled by fuzzy logic. A detailed description is shown in the ensuing sections.


### 5.1. The Improved Genetic Algorithm

There areLtrucks in a fresh food plant. Each truckldelivers fresh food to cl customers; that is, each truck in charge of an area determines each truck route. When the truck arrives at customeri, a portion of the fresh foods is unloaded for customeri. The quantity and kinds of fresh foods have changed; therefore, we determine the average speed and storage temperature of the truck from customerito the next customerj. We use a chromosome to represent the three decisions of a truck; each chromosome includes three parts:(31)gl=gl,0,gl,1,gl,2,⋯,gl,cl,gl,cl+1,gl,cl+2,⋯,gl,2cl,gl,2cl+1,gl,2cl+2,⋯,gl,3cl+1g l , 0 , g l , 1 , g l , 2 , ⋯ , g l , c l is the first part, which represents the route selection of truckl. A truck sets out from the plant and returns to the plant after delivering all the fresh food. To ensure that every customer is served only once, (32)gl,i≠gl,ji=0,1,⋯,cl;j=0,1,⋯,cl,i≠jg l , c l + 1 , g l , c l + 2 , ⋯ , g l , 2 c l , g l , 2 c l + 1 is the second part, which represents the average speed of trucklin each transport phase. gl,2cl+2,⋯,gl,3cl+1 is the third part, which represents the storage temperature of trucklin each transport phase; it does not include the return phase.Based on the above, we defined a gene matrix of the population as follows:(33)g1,0,g1,1,g1,2,⋯,g1,cl,g1,cl+1,g1,cl+2,⋯,g1,2cl,g1,2cl+1,g1,2cl+2,⋯,g1,3cl+1g2,0,g2,1,g2,2,⋯,g2,cl,g2,cl+1,g2,cl+2,⋯,g2,2cl,g2,2cl+1,g2,2cl+2,⋯,g2,3cl+1⋯gm,0,gm,1,gm,2,⋯,gm,cl,gm,cl+1,gm,cl+2,⋯,gm,2cl,gm,2cl+1,gm,2cl+2,⋯,gm,3cl+1


#### 5.1.1. Coding Rule

The multivalue decision can be handled well using real-coded GA [40], and real-coded GA is more intuitive and easy to implement; therefore, real-coded GA is used.


#### 5.1.2. Fitness Function

Because fresh food quality changes with time, if the distribution arrives in the time window range, the fresh food is accepted; otherwise, it is rejected. The sooner the fresh food is delivered, the better the quality is, and the higher the market value is. Therefore, a feasible solution is that distribution in the time window range is fulfilled. A good chromosome must be a feasible solution. Good chromosomes should be more easily picked because bad chromosomes could yet produce good offspring. Therefore, each chromosome may cross and mutate as a parent; however, the rate of being picked is different. Therefore, set the weight of picking the good chromosome at 1; the dad chromosome is 0.01. The fitness function of a chromosome (solution)l is(34)fgl=max⁡totalcost-total  costl×0.01×hl+1-hlwhere hl=1 when chromosome (solution) gl is a bad chromosome; else hl=0.


#### 5.1.3. Selection Operator

The selection operation provides the driving force for genetic evolution. The roulette strategy [41] is a widely used method; however, it easily generates a local optimum. Therefore, the selection operator is improved. We arrange from large to small according to the fitness value for all individuals in the population. The first one of five individuals create two duplicates; the middle three of five individuals remain, and the last one of five individuals is eliminated directly. The population quantity has not changed. The individual that has a low fitness value will be eliminated directly, which increases the number of individuals with a better fitness value.


#### 5.1.4. Crossover Operator

The crossover operator has a direct influence on the convergence speed of the genetic algorithm. Traditional genetic algorithms do not consider the similarities between the two crossover individuals; to perform the crossover operation of individuals, nothing is considered except according to the fixed rate. Thus, the result is the good pattern of parents that does not pass on to their offspring. The convergence speed of the algorithm will decrease. We adopt the improved crossover operator; depending on the degree of similarity between individuals, we decide whether there is crossover. The degree of similarity between individuals is defined as follows:(35)sgl1,gl2=n3cl+21≤l1,l2≤m,l1≠l2where n is the common substring length of gl1and gl2, 3cl+2 is the length of a chromosome, and m is the population size.When the similarity between individuals is less than the given threshold valuep, according to the crossover rate pc, we perform the crossover operation. Because a chromosome consists of three parts, we use the hybrid crossover operator. (36)gl1=gl1,0,gl1,1,gl1,2,⋯,gl1,cl,gl1,cl+1,gl1,cl+2,⋯,gl1,2cl,gl1,2cl+1,gl1,2cl+2,⋯,gl1,3cl+1(37)gl2=gl2,0,gl2,1,gl2,2,⋯,gl2,cl,gl2,cl+1,gl2,cl+2,⋯,gl2,2cl,gl2,2cl+1,gl2,2cl+2,⋯,gl2,3cl+1g l 1 and gl2are two chromosomes selected for crossover; for the first part, a single point crossover is selected. Due to the improper selection of a crossover point, it is possible to produce the same offspring as the parents; such a crossover operation is invalid. We determine the effective set of crossover points and ensure the crossover operation produces offspring that differs from the parents. The effective crossover points’ set of gl1 is Nl′-Nls, where Nl′ is the set of customers who are served by thel-th truck:(38)Nls=c∣gl1,c=gl2,c,c=1,⋯,clThe crossover operation is performed as follows:(39)gl1,cp′=gl2,cp,gl2,cp′=gl1,cpcp∈Nl′-Nlswhere crossover point cp is generated randomly within the effective region of the crossover point.Regarding the second and third sections, the uniform crossover is selected. The crossover operation is performed as follows:(40)glk,cl+1:3cl+1′=αgl1,cl+1:3cl+1+1-αgl2,cl+1:3cl+1k=i,jwhere α is a random weight of the parent, and it follows a uniform distribution (0,1).Thus, by (39) and (40), after crossover operation gl1 and gl2 generated a pair of offspring:(41)gl1′=gl1,0:cl′,gl1,cl+1:3cl+1′(42)gl2′=gl2,0:cl′,gl2,cl+1:3cl+1′


#### 5.1.5. Mutation Operator

The mutation operation is an auxiliary method for generating new individuals; it determines the local search capability of the genetic algorithm and increases the diversity of the population. The mutation of the chromosome gene in the population is conducted according to the mutation ratepm. Based on the coding method, exchange mutation is adopted. The fitness of the mutation chromosome is compared with the parents. If it is better, accept the fitness; otherwise, stop and once again perform the mutation until it produces a better chromosome.


#### 5.1.6. Adjust Unfeasible Solution

Performing the crossover operation or mutation operation may produce an unfeasible solution; therefore, it needs to be properly adjusted. A chromosome consists of three parts. The second and third parts’ crossover operation is a linear operation; the mutation operation is an exchanged mutation. The offspring continue to satisfy the constraints on speed and temperature. The first part needs to satisfy constraints (15) and (16); that is, each customer is served only once. However, the offspring may violate those constraints; therefore, an adjustment mechanism is used. In the crossover operation procedure, there is a phenomenon that a customer is not visited, but another customer is visited twice. The adjusting mechanism is that the value the same as crossover point is replaced with the value that is not presented. For example, as shown in Figure 2, to make it easy to illustrate, let us say that ten customers need service by truckl. The effective crossover points set of gli is 1,2,4,6,8,9. Now select 2 as the crossover point; exchange 2 and 6, and then 2 does not appear. However, 6 appears twice in gli; therefore, the original 6 is replaced with 2. Furthermore, 6 does not appear as well, and 2 appears twice in glj; therefore, the original 2 is replaced with 6.Figure 2
Adjust mechanism after crossover.A gene mutation will also cause a customer to not be visited, yet another customer is visited twice. The adjusting mechanism uses the original value of the mutation point to replace the value that is the same as the mutation value. For example, the mutation point is 9; 9 is mutated to 1, and then use 9 to replace the original 1. This example is illustrated in Figure3.Figure 3
Adjust mechanism after mutation.


### 5.2. Fuzzy Logic Controller

The crossover and mutation operators provide immense help in ensuring the global optimal, avoiding the local solution, and accelerating the convergence speed, which is an important measure for maintaining the diversity of the population [42, 43]. Crossover and mutation rates have enormous influence on the performance of GA. Crossover and mutation rates are determined to be constant in the traditional genetic algorithm; in the ideal case, crossover and mutation rates should be adjusted adaptively during the runtime of the algorithm. Many factors that affect crossover and mutation rates are dynamic and fuzzy in the population evolution. Therefore, the dynamic crossover and mutation rates should be fuzzy; fuzzy logic is a powerful tool to address this problem. Consider the influence of genetic generations and chromosome fitness value on crossover and mutation rates. A new fuzzy logic controller is proposed that considers the effects of genetic evolution generations, the diversity of generation, the average fitness on crossover operation, and the mutation operation. The basic principles are as follows.


#### 5.2.1. The Effect of Degree of Evolution on Crossover Rate

In the early stage of the evolution, to promote convergence of the population, a larger crossover rate is used. In the middle stage of evolution, to adequately promote local search of the population, the crossover rate is stable. In the later stage of evolution, to protect the optimal solution, the crossover rate should be decreased.


#### 5.2.2. The Effect of the Diversity of Generation on Crossover Rate

Lower diversity can result in the population converging to the local optimal; therefore, to overcome this problem, the crossover rate should be increased. High diversity can result in the population diverging; therefore, the crossover rate should be decreased.


#### 5.2.3. The Effect of Variation of the Average Fitness on Mutation Rate

If the variation of average fitness is minimal, this could easily lead to premature convergence; therefore, the mutation rate should be increased. If the variation of average fitness is large, the mutation rate should be decreased.


#### 5.2.4. The Effect of the Difference between the Maximum Fitness and Fitness on Mutation Rate

If the difference between the maximum fitness and fitness is large, the mutation rate should be increased. Otherwise, the mutation rate should be decreased.LetP=gl1,gl2,⋯,glm be the current population; the population size is m. gt is genetic evolution generations; gt=0,1,2,⋯,gT.  F- is the average fitness of current chromosome. Fmax is the maximal fitness of a current population; Fmin is the minimum fitness of a current population, and F(gli) is the fitness of a chromosome gli,i=1,⋯,m. The input variables of the fuzzy logic controller are shown in Table 2.Table 2
The input variables of the fuzzy logic controller.
Input variables Variable explaination γ the degree of evolution,γ=gt/gT,gt=0,1,2,⋯,gT,γ∈[0,1] δ the diversity of generation, δ G m =  1 m × ( m - 1 ) / 2 ∑ i = 1 m ∑ j = i + 1 m ∑ k = 0 3 c l + 1 D ( g i k , g j k ) 3 c l + 1 ,  δ ∈ [ 0,1 ] Δ F - ( g t ) the variation of the average fitness, Δ F - g t = F - g t - F - g t - 1 F - g t - 1 ,  Δ F - g t ∈  [ 0,1 ] ρ the difference between the maximum fitness and the fitness of a chromosomegli ρ = F m a x - F ( g l i ) F m a x - F m i n ,  ρ ∈  [ 0,1 ]The mutation operation is an auxiliary evolutionary method; the mutation rate is generally less than 0.1. Let10×pm be the output variable of the mutation rate. The output variables of the fuzzy logic controller are pc and 10×pm. The value range of any input variable or output variable is [0,1]; therefore, each variable can be described by a membership function. There are 9 linguistic terms, as shown in Table 3. As a matter of experience, we select the triangle membership function, which is the membership function shown in Figure 4. Based on basic principles and the membership function, we can determine the fuzzy rules. The fuzzy rules are provided in Tables 4 and 5.Table 3
Linguistic terms.
Linguistic terms Meaning ES Extra small VS Very small S Small RS Rather small M Middle RL Rather large L Large VL Very large EL Extra largeTable 4
Fuzzy rules of crossover rate.
γ δ ES VS S RS M RL L VL EL ES EL EL VL VL L L RL RL M VS EL VL VL L L RL RL M RS S VL VL L L RL RL M RS RS RS VL L L RL RL M RS RS S M L L RL RL M RS RS S S RL L RL RL M RS RS S S VS L RL RL M RS RS S S VS VS VL RL M RS RS S S VS VS ES EL M RS RS S S VS VS ES ESTable 5
Fuzzy rules of mutation rate.
Δ F - g t Ρ ES VS S RS M RL L VL EL ES M RL RL L L VL VL EL EL VS RS M RL RL L L VL VL EL S RS RS M RL RL L L VL VL RS S RS RS M RL RL L L VL M S S RS RS M RL RL L L RL VS S S RS RS M RL RL L L VS VS S S RS RS M RL RL VL ES VS VS S S RS RS M RL EL ES ES VS VS S S RS RS MFigure 4
The triangle membership function.


### 5.3. Flowchart of the Improved Fuzzy Genetic Algorithm

The flowchart of the improved fuzzy genetic algorithm is shown in Figure5.Figure 5
Flowchart of the improved fuzzy genetic algorithm.


## 5.1. The Improved Genetic Algorithm

There areLtrucks in a fresh food plant. Each truckldelivers fresh food to cl customers; that is, each truck in charge of an area determines each truck route. When the truck arrives at customeri, a portion of the fresh foods is unloaded for customeri. The quantity and kinds of fresh foods have changed; therefore, we determine the average speed and storage temperature of the truck from customerito the next customerj. We use a chromosome to represent the three decisions of a truck; each chromosome includes three parts:(31)gl=gl,0,gl,1,gl,2,⋯,gl,cl,gl,cl+1,gl,cl+2,⋯,gl,2cl,gl,2cl+1,gl,2cl+2,⋯,gl,3cl+1g l , 0 , g l , 1 , g l , 2 , ⋯ , g l , c l is the first part, which represents the route selection of truckl. A truck sets out from the plant and returns to the plant after delivering all the fresh food. To ensure that every customer is served only once, (32)gl,i≠gl,ji=0,1,⋯,cl;j=0,1,⋯,cl,i≠jg l , c l + 1 , g l , c l + 2 , ⋯ , g l , 2 c l , g l , 2 c l + 1 is the second part, which represents the average speed of trucklin each transport phase. gl,2cl+2,⋯,gl,3cl+1 is the third part, which represents the storage temperature of trucklin each transport phase; it does not include the return phase.Based on the above, we defined a gene matrix of the population as follows:(33)g1,0,g1,1,g1,2,⋯,g1,cl,g1,cl+1,g1,cl+2,⋯,g1,2cl,g1,2cl+1,g1,2cl+2,⋯,g1,3cl+1g2,0,g2,1,g2,2,⋯,g2,cl,g2,cl+1,g2,cl+2,⋯,g2,2cl,g2,2cl+1,g2,2cl+2,⋯,g2,3cl+1⋯gm,0,gm,1,gm,2,⋯,gm,cl,gm,cl+1,gm,cl+2,⋯,gm,2cl,gm,2cl+1,gm,2cl+2,⋯,gm,3cl+1


### 5.1.1. Coding Rule

The multivalue decision can be handled well using real-coded GA [40], and real-coded GA is more intuitive and easy to implement; therefore, real-coded GA is used.


### 5.1.2. Fitness Function

Because fresh food quality changes with time, if the distribution arrives in the time window range, the fresh food is accepted; otherwise, it is rejected. The sooner the fresh food is delivered, the better the quality is, and the higher the market value is. Therefore, a feasible solution is that distribution in the time window range is fulfilled. A good chromosome must be a feasible solution. Good chromosomes should be more easily picked because bad chromosomes could yet produce good offspring. Therefore, each chromosome may cross and mutate as a parent; however, the rate of being picked is different. Therefore, set the weight of picking the good chromosome at 1; the dad chromosome is 0.01. The fitness function of a chromosome (solution)l is(34)fgl=max⁡totalcost-total  costl×0.01×hl+1-hlwhere hl=1 when chromosome (solution) gl is a bad chromosome; else hl=0.


### 5.1.3. Selection Operator

The selection operation provides the driving force for genetic evolution. The roulette strategy [41] is a widely used method; however, it easily generates a local optimum. Therefore, the selection operator is improved. We arrange from large to small according to the fitness value for all individuals in the population. The first one of five individuals create two duplicates; the middle three of five individuals remain, and the last one of five individuals is eliminated directly. The population quantity has not changed. The individual that has a low fitness value will be eliminated directly, which increases the number of individuals with a better fitness value.


### 5.1.4. Crossover Operator

The crossover operator has a direct influence on the convergence speed of the genetic algorithm. Traditional genetic algorithms do not consider the similarities between the two crossover individuals; to perform the crossover operation of individuals, nothing is considered except according to the fixed rate. Thus, the result is the good pattern of parents that does not pass on to their offspring. The convergence speed of the algorithm will decrease. We adopt the improved crossover operator; depending on the degree of similarity between individuals, we decide whether there is crossover. The degree of similarity between individuals is defined as follows:(35)sgl1,gl2=n3cl+21≤l1,l2≤m,l1≠l2where n is the common substring length of gl1and gl2, 3cl+2 is the length of a chromosome, and m is the population size.When the similarity between individuals is less than the given threshold valuep, according to the crossover rate pc, we perform the crossover operation. Because a chromosome consists of three parts, we use the hybrid crossover operator. (36)gl1=gl1,0,gl1,1,gl1,2,⋯,gl1,cl,gl1,cl+1,gl1,cl+2,⋯,gl1,2cl,gl1,2cl+1,gl1,2cl+2,⋯,gl1,3cl+1(37)gl2=gl2,0,gl2,1,gl2,2,⋯,gl2,cl,gl2,cl+1,gl2,cl+2,⋯,gl2,2cl,gl2,2cl+1,gl2,2cl+2,⋯,gl2,3cl+1g l 1 and gl2are two chromosomes selected for crossover; for the first part, a single point crossover is selected. Due to the improper selection of a crossover point, it is possible to produce the same offspring as the parents; such a crossover operation is invalid. We determine the effective set of crossover points and ensure the crossover operation produces offspring that differs from the parents. The effective crossover points’ set of gl1 is Nl′-Nls, where Nl′ is the set of customers who are served by thel-th truck:(38)Nls=c∣gl1,c=gl2,c,c=1,⋯,clThe crossover operation is performed as follows:(39)gl1,cp′=gl2,cp,gl2,cp′=gl1,cpcp∈Nl′-Nlswhere crossover point cp is generated randomly within the effective region of the crossover point.Regarding the second and third sections, the uniform crossover is selected. The crossover operation is performed as follows:(40)glk,cl+1:3cl+1′=αgl1,cl+1:3cl+1+1-αgl2,cl+1:3cl+1k=i,jwhere α is a random weight of the parent, and it follows a uniform distribution (0,1).Thus, by (39) and (40), after crossover operation gl1 and gl2 generated a pair of offspring:(41)gl1′=gl1,0:cl′,gl1,cl+1:3cl+1′(42)gl2′=gl2,0:cl′,gl2,cl+1:3cl+1′


### 5.1.5. Mutation Operator

The mutation operation is an auxiliary method for generating new individuals; it determines the local search capability of the genetic algorithm and increases the diversity of the population. The mutation of the chromosome gene in the population is conducted according to the mutation ratepm. Based on the coding method, exchange mutation is adopted. The fitness of the mutation chromosome is compared with the parents. If it is better, accept the fitness; otherwise, stop and once again perform the mutation until it produces a better chromosome.


### 5.1.6. Adjust Unfeasible Solution

Performing the crossover operation or mutation operation may produce an unfeasible solution; therefore, it needs to be properly adjusted. A chromosome consists of three parts. The second and third parts’ crossover operation is a linear operation; the mutation operation is an exchanged mutation. The offspring continue to satisfy the constraints on speed and temperature. The first part needs to satisfy constraints (15) and (16); that is, each customer is served only once. However, the offspring may violate those constraints; therefore, an adjustment mechanism is used. In the crossover operation procedure, there is a phenomenon that a customer is not visited, but another customer is visited twice. The adjusting mechanism is that the value the same as crossover point is replaced with the value that is not presented. For example, as shown in Figure 2, to make it easy to illustrate, let us say that ten customers need service by truckl. The effective crossover points set of gli is 1,2,4,6,8,9. Now select 2 as the crossover point; exchange 2 and 6, and then 2 does not appear. However, 6 appears twice in gli; therefore, the original 6 is replaced with 2. Furthermore, 6 does not appear as well, and 2 appears twice in glj; therefore, the original 2 is replaced with 6.Figure 2
Adjust mechanism after crossover.A gene mutation will also cause a customer to not be visited, yet another customer is visited twice. The adjusting mechanism uses the original value of the mutation point to replace the value that is the same as the mutation value. For example, the mutation point is 9; 9 is mutated to 1, and then use 9 to replace the original 1. This example is illustrated in Figure3.Figure 3
Adjust mechanism after mutation.


## 5.1.1. Coding Rule

The multivalue decision can be handled well using real-coded GA [40], and real-coded GA is more intuitive and easy to implement; therefore, real-coded GA is used.


## 5.1.2. Fitness Function

Because fresh food quality changes with time, if the distribution arrives in the time window range, the fresh food is accepted; otherwise, it is rejected. The sooner the fresh food is delivered, the better the quality is, and the higher the market value is. Therefore, a feasible solution is that distribution in the time window range is fulfilled. A good chromosome must be a feasible solution. Good chromosomes should be more easily picked because bad chromosomes could yet produce good offspring. Therefore, each chromosome may cross and mutate as a parent; however, the rate of being picked is different. Therefore, set the weight of picking the good chromosome at 1; the dad chromosome is 0.01. The fitness function of a chromosome (solution)l is(34)fgl=max⁡totalcost-total  costl×0.01×hl+1-hlwhere hl=1 when chromosome (solution) gl is a bad chromosome; else hl=0.


## 5.1.3. Selection Operator

The selection operation provides the driving force for genetic evolution. The roulette strategy [41] is a widely used method; however, it easily generates a local optimum. Therefore, the selection operator is improved. We arrange from large to small according to the fitness value for all individuals in the population. The first one of five individuals create two duplicates; the middle three of five individuals remain, and the last one of five individuals is eliminated directly. The population quantity has not changed. The individual that has a low fitness value will be eliminated directly, which increases the number of individuals with a better fitness value.


## 5.1.4. Crossover Operator

The crossover operator has a direct influence on the convergence speed of the genetic algorithm. Traditional genetic algorithms do not consider the similarities between the two crossover individuals; to perform the crossover operation of individuals, nothing is considered except according to the fixed rate. Thus, the result is the good pattern of parents that does not pass on to their offspring. The convergence speed of the algorithm will decrease. We adopt the improved crossover operator; depending on the degree of similarity between individuals, we decide whether there is crossover. The degree of similarity between individuals is defined as follows:(35)sgl1,gl2=n3cl+21≤l1,l2≤m,l1≠l2where n is the common substring length of gl1and gl2, 3cl+2 is the length of a chromosome, and m is the population size.When the similarity between individuals is less than the given threshold valuep, according to the crossover rate pc, we perform the crossover operation. Because a chromosome consists of three parts, we use the hybrid crossover operator. (36)gl1=gl1,0,gl1,1,gl1,2,⋯,gl1,cl,gl1,cl+1,gl1,cl+2,⋯,gl1,2cl,gl1,2cl+1,gl1,2cl+2,⋯,gl1,3cl+1(37)gl2=gl2,0,gl2,1,gl2,2,⋯,gl2,cl,gl2,cl+1,gl2,cl+2,⋯,gl2,2cl,gl2,2cl+1,gl2,2cl+2,⋯,gl2,3cl+1g l 1 and gl2are two chromosomes selected for crossover; for the first part, a single point crossover is selected. Due to the improper selection of a crossover point, it is possible to produce the same offspring as the parents; such a crossover operation is invalid. We determine the effective set of crossover points and ensure the crossover operation produces offspring that differs from the parents. The effective crossover points’ set of gl1 is Nl′-Nls, where Nl′ is the set of customers who are served by thel-th truck:(38)Nls=c∣gl1,c=gl2,c,c=1,⋯,clThe crossover operation is performed as follows:(39)gl1,cp′=gl2,cp,gl2,cp′=gl1,cpcp∈Nl′-Nlswhere crossover point cp is generated randomly within the effective region of the crossover point.Regarding the second and third sections, the uniform crossover is selected. The crossover operation is performed as follows:(40)glk,cl+1:3cl+1′=αgl1,cl+1:3cl+1+1-αgl2,cl+1:3cl+1k=i,jwhere α is a random weight of the parent, and it follows a uniform distribution (0,1).Thus, by (39) and (40), after crossover operation gl1 and gl2 generated a pair of offspring:(41)gl1′=gl1,0:cl′,gl1,cl+1:3cl+1′(42)gl2′=gl2,0:cl′,gl2,cl+1:3cl+1′


## 5.1.5. Mutation Operator

The mutation operation is an auxiliary method for generating new individuals; it determines the local search capability of the genetic algorithm and increases the diversity of the population. The mutation of the chromosome gene in the population is conducted according to the mutation ratepm. Based on the coding method, exchange mutation is adopted. The fitness of the mutation chromosome is compared with the parents. If it is better, accept the fitness; otherwise, stop and once again perform the mutation until it produces a better chromosome.


## 5.1.6. Adjust Unfeasible Solution

Performing the crossover operation or mutation operation may produce an unfeasible solution; therefore, it needs to be properly adjusted. A chromosome consists of three parts. The second and third parts’ crossover operation is a linear operation; the mutation operation is an exchanged mutation. The offspring continue to satisfy the constraints on speed and temperature. The first part needs to satisfy constraints (15) and (16); that is, each customer is served only once. However, the offspring may violate those constraints; therefore, an adjustment mechanism is used. In the crossover operation procedure, there is a phenomenon that a customer is not visited, but another customer is visited twice. The adjusting mechanism is that the value the same as crossover point is replaced with the value that is not presented. For example, as shown in Figure 2, to make it easy to illustrate, let us say that ten customers need service by truckl. The effective crossover points set of gli is 1,2,4,6,8,9. Now select 2 as the crossover point; exchange 2 and 6, and then 2 does not appear. However, 6 appears twice in gli; therefore, the original 6 is replaced with 2. Furthermore, 6 does not appear as well, and 2 appears twice in glj; therefore, the original 2 is replaced with 6.Figure 2
Adjust mechanism after crossover.A gene mutation will also cause a customer to not be visited, yet another customer is visited twice. The adjusting mechanism uses the original value of the mutation point to replace the value that is the same as the mutation value. For example, the mutation point is 9; 9 is mutated to 1, and then use 9 to replace the original 1. This example is illustrated in Figure3.Figure 3
Adjust mechanism after mutation.


## 5.2. Fuzzy Logic Controller

The crossover and mutation operators provide immense help in ensuring the global optimal, avoiding the local solution, and accelerating the convergence speed, which is an important measure for maintaining the diversity of the population [42, 43]. Crossover and mutation rates have enormous influence on the performance of GA. Crossover and mutation rates are determined to be constant in the traditional genetic algorithm; in the ideal case, crossover and mutation rates should be adjusted adaptively during the runtime of the algorithm. Many factors that affect crossover and mutation rates are dynamic and fuzzy in the population evolution. Therefore, the dynamic crossover and mutation rates should be fuzzy; fuzzy logic is a powerful tool to address this problem. Consider the influence of genetic generations and chromosome fitness value on crossover and mutation rates. A new fuzzy logic controller is proposed that considers the effects of genetic evolution generations, the diversity of generation, the average fitness on crossover operation, and the mutation operation. The basic principles are as follows.


### 5.2.1. The Effect of Degree of Evolution on Crossover Rate

In the early stage of the evolution, to promote convergence of the population, a larger crossover rate is used. In the middle stage of evolution, to adequately promote local search of the population, the crossover rate is stable. In the later stage of evolution, to protect the optimal solution, the crossover rate should be decreased.


### 5.2.2. The Effect of the Diversity of Generation on Crossover Rate

Lower diversity can result in the population converging to the local optimal; therefore, to overcome this problem, the crossover rate should be increased. High diversity can result in the population diverging; therefore, the crossover rate should be decreased.


### 5.2.3. The Effect of Variation of the Average Fitness on Mutation Rate

If the variation of average fitness is minimal, this could easily lead to premature convergence; therefore, the mutation rate should be increased. If the variation of average fitness is large, the mutation rate should be decreased.


### 5.2.4. The Effect of the Difference between the Maximum Fitness and Fitness on Mutation Rate

If the difference between the maximum fitness and fitness is large, the mutation rate should be increased. Otherwise, the mutation rate should be decreased.LetP=gl1,gl2,⋯,glm be the current population; the population size is m. gt is genetic evolution generations; gt=0,1,2,⋯,gT.  F- is the average fitness of current chromosome. Fmax is the maximal fitness of a current population; Fmin is the minimum fitness of a current population, and F(gli) is the fitness of a chromosome gli,i=1,⋯,m. The input variables of the fuzzy logic controller are shown in Table 2.Table 2
The input variables of the fuzzy logic controller.
Input variables Variable explaination γ the degree of evolution,γ=gt/gT,gt=0,1,2,⋯,gT,γ∈[0,1] δ the diversity of generation, δ G m =  1 m × ( m - 1 ) / 2 ∑ i = 1 m ∑ j = i + 1 m ∑ k = 0 3 c l + 1 D ( g i k , g j k ) 3 c l + 1 ,  δ ∈ [ 0,1 ] Δ F - ( g t ) the variation of the average fitness, Δ F - g t = F - g t - F - g t - 1 F - g t - 1 ,  Δ F - g t ∈  [ 0,1 ] ρ the difference between the maximum fitness and the fitness of a chromosomegli ρ = F m a x - F ( g l i ) F m a x - F m i n ,  ρ ∈  [ 0,1 ]The mutation operation is an auxiliary evolutionary method; the mutation rate is generally less than 0.1. Let10×pm be the output variable of the mutation rate. The output variables of the fuzzy logic controller are pc and 10×pm. The value range of any input variable or output variable is [0,1]; therefore, each variable can be described by a membership function. There are 9 linguistic terms, as shown in Table 3. As a matter of experience, we select the triangle membership function, which is the membership function shown in Figure 4. Based on basic principles and the membership function, we can determine the fuzzy rules. The fuzzy rules are provided in Tables 4 and 5.Table 3
Linguistic terms.
Linguistic terms Meaning ES Extra small VS Very small S Small RS Rather small M Middle RL Rather large L Large VL Very large EL Extra largeTable 4
Fuzzy rules of crossover rate.
γ δ ES VS S RS M RL L VL EL ES EL EL VL VL L L RL RL M VS EL VL VL L L RL RL M RS S VL VL L L RL RL M RS RS RS VL L L RL RL M RS RS S M L L RL RL M RS RS S S RL L RL RL M RS RS S S VS L RL RL M RS RS S S VS VS VL RL M RS RS S S VS VS ES EL M RS RS S S VS VS ES ESTable 5
Fuzzy rules of mutation rate.
Δ F - g t Ρ ES VS S RS M RL L VL EL ES M RL RL L L VL VL EL EL VS RS M RL RL L L VL VL EL S RS RS M RL RL L L VL VL RS S RS RS M RL RL L L VL M S S RS RS M RL RL L L RL VS S S RS RS M RL RL L L VS VS S S RS RS M RL RL VL ES VS VS S S RS RS M RL EL ES ES VS VS S S RS RS MFigure 4
The triangle membership function.


## 5.2.1. The Effect of Degree of Evolution on Crossover Rate

In the early stage of the evolution, to promote convergence of the population, a larger crossover rate is used. In the middle stage of evolution, to adequately promote local search of the population, the crossover rate is stable. In the later stage of evolution, to protect the optimal solution, the crossover rate should be decreased.


## 5.2.2. The Effect of the Diversity of Generation on Crossover Rate

Lower diversity can result in the population converging to the local optimal; therefore, to overcome this problem, the crossover rate should be increased. High diversity can result in the population diverging; therefore, the crossover rate should be decreased.


## 5.2.3. The Effect of Variation of the Average Fitness on Mutation Rate

If the variation of average fitness is minimal, this could easily lead to premature convergence; therefore, the mutation rate should be increased. If the variation of average fitness is large, the mutation rate should be decreased.


## 5.2.4. The Effect of the Difference between the Maximum Fitness and Fitness on Mutation Rate

If the difference between the maximum fitness and fitness is large, the mutation rate should be increased. Otherwise, the mutation rate should be decreased.LetP=gl1,gl2,⋯,glm be the current population; the population size is m. gt is genetic evolution generations; gt=0,1,2,⋯,gT.  F- is the average fitness of current chromosome. Fmax is the maximal fitness of a current population; Fmin is the minimum fitness of a current population, and F(gli) is the fitness of a chromosome gli,i=1,⋯,m. The input variables of the fuzzy logic controller are shown in Table 2.Table 2
The input variables of the fuzzy logic controller.
Input variables Variable explaination γ the degree of evolution,γ=gt/gT,gt=0,1,2,⋯,gT,γ∈[0,1] δ the diversity of generation, δ G m =  1 m × ( m - 1 ) / 2 ∑ i = 1 m ∑ j = i + 1 m ∑ k = 0 3 c l + 1 D ( g i k , g j k ) 3 c l + 1 ,  δ ∈ [ 0,1 ] Δ F - ( g t ) the variation of the average fitness, Δ F - g t = F - g t - F - g t - 1 F - g t - 1 ,  Δ F - g t ∈  [ 0,1 ] ρ the difference between the maximum fitness and the fitness of a chromosomegli ρ = F m a x - F ( g l i ) F m a x - F m i n ,  ρ ∈  [ 0,1 ]The mutation operation is an auxiliary evolutionary method; the mutation rate is generally less than 0.1. Let10×pm be the output variable of the mutation rate. The output variables of the fuzzy logic controller are pc and 10×pm. The value range of any input variable or output variable is [0,1]; therefore, each variable can be described by a membership function. There are 9 linguistic terms, as shown in Table 3. As a matter of experience, we select the triangle membership function, which is the membership function shown in Figure 4. Based on basic principles and the membership function, we can determine the fuzzy rules. The fuzzy rules are provided in Tables 4 and 5.Table 3
Linguistic terms.
Linguistic terms Meaning ES Extra small VS Very small S Small RS Rather small M Middle RL Rather large L Large VL Very large EL Extra largeTable 4
Fuzzy rules of crossover rate.
γ δ ES VS S RS M RL L VL EL ES EL EL VL VL L L RL RL M VS EL VL VL L L RL RL M RS S VL VL L L RL RL M RS RS RS VL L L RL RL M RS RS S M L L RL RL M RS RS S S RL L RL RL M RS RS S S VS L RL RL M RS RS S S VS VS VL RL M RS RS S S VS VS ES EL M RS RS S S VS VS ES ESTable 5
Fuzzy rules of mutation rate.
Δ F - g t Ρ ES VS S RS M RL L VL EL ES M RL RL L L VL VL EL EL VS RS M RL RL L L VL VL EL S RS RS M RL RL L L VL VL RS S RS RS M RL RL L L VL M S S RS RS M RL RL L L RL VS S S RS RS M RL RL L L VS VS S S RS RS M RL RL VL ES VS VS S S RS RS M RL EL ES ES VS VS S S RS RS MFigure 4
The triangle membership function.


## 5.3. Flowchart of the Improved Fuzzy Genetic Algorithm

The flowchart of the improved fuzzy genetic algorithm is shown in Figure5.Figure 5
Flowchart of the improved fuzzy genetic algorithm.


## 6. Simulation Results

To verify and explain the method we proposed, a scenario of one fresh food plant and twenty-four consumers is considered. First, consumers are classified using the fuzzy clustering method. Then, according to the consumers grouping result, the improved fuzzy genetic algorithm is used to optimize the truck path, storage temperature, and average truck speed. Therefore, the experiment was conducted in two parts. The first part of the experiment is the consumers clustering results; the second part is the verification of the improved fuzzy genetic algorithm.


### 6.1. Consumers Fuzzy Clustering Result

Using MATLAB 9.1 programming to realize the simulation, the running environment is Intel CPU 3.8 GHz, Memory 1024 MB. The programme randomly generated 24 consumer points on the 100∗100 Cartesian plane. The coordinate of the fresh food plant is (60,55). The programme randomly generated 24 consumer order information requirements; thus, we obtain information, so get 7 requirement properties. xj1 is the fresh food demand of customerj in a plan period; xj2 is the geographic position of customerj. xj3 is the time window of customerj; the time window requests of 24 consumers in the experiment are shown in Tables 6 and 7. xj4 is the value of fresh food that is delivered to customerj; xj5 is the storage temperature similarity of fresh food that is delivered to customerj. xj6 is the fresh food security requirement of customerj; xj7 is the desired service quality of customerj. Additionally, we use the triangular fuzzy number to evaluate xj3,xj5,xj6, and xj7. The consumer order requirement properties information is shown in Table 8.Table 6
Time window request (a).
customers 1 2 3 4 5 6 7 8 9 10 11 12 t l k 3 4 3.5 3 5 3.5 2.5 3 2.5 5 5 1 t u k 3.5 4.5 4 4 5.5 4 3 4 3 5.5 5.5 1.5Table 7
Time window request (b).
customers 13 14 15 16 17 18 19 20 21 22 23 24 t l k 4.5 4 3.5 3 4.5 3 3 2 4 3 2 4 t u k 5 5 4 4 5 4 4 2.5 5 4 3 5Table 8
Consumer order requirement properties information.
No x j 1 x j 2 x j 3 x j 4 x j 5 x j 6 x j 7 1 38 30,50 middle 4300 middle middle middle 2 42 32,56 low 3680 middle low low 3 25 53,49 middle 2760 low middle middle 4 30 56,79 middle 4200 middle middle middle 5 48 78,45 very low 4980- middle very high very high 6 27 68,52 middle 2560 middle middle middle 7 78 79,65 high 5600 high very high very high 8 56 18,20 middle 4670 middle middle middle 9 46 13,33 high 4520 middle middle middle 10 18 86,74 very low 1800 very high very high very high 11 27 86,79 very low 2890 high very high very high 12 38 8,7 very high 3540 middle middle middle 13 43 96,34 low 4130 very high very high very high 14 17 74,48 low 1680 middle middle middle 15 12 45,90 middle 1370 middle middle middle 16 83 65,29 middle 6530 middle middle middle 17 42 48,78 low 3200 low low low 18 80 78,34 middle 7800 middle middle middle 19 32 56,77 middle 3100 middle middle middle 20 25 3,16 high 2680 middle middle middle 21 56 76,42 low 4260 high high high 22 43 58,32 middle 3780 middle middle middle 23 37 21,70 high 3520 middle middle middle 24 34 63,54 low 3200 middle middle middleIn the calculation of fuzzy similarity, there are four decision variables: the time window, the value of fresh food, the storage temperature, and the fresh food security requirement given three groups of weights(0.6,0.2,0.1,0.1),(0.15,0.7,0.125,0.125), and (0.25,0.25,0.25,0.25). The consumer clustering algorithm is used to classify consumers; let the evaluation criteria of similarity be λ=0.75. The consumer grouping result is as shown in Table 9.Table 9
Consumer grouping results under various weights.
weight value consumer grouping results ( 0.6,0.2,0.1,0.1 ), 1, 3, 4, 6, 8, 9, 12, 13 2, 5, 7, 14, 15, 19, 20 10, 11, 16, 17, 18, 21, 22, 23, 24 ( 0.15,0.7,0.125,0.125 ) 12, 20, 8, 9, 1, 2, 22,16 3, 23, 15, 17, 4, 19, 7, 10 24, 6, 14,5, 21, 18, 13, 11 ( 0.25,0.25,0.25,0.25 ) 22, 24, 6, 14, 5, 21, 18, 13, 11 10, 7, 19, 4, 17, 15, 23 3, 2, 1, 9, 8, 20, 12, 16It can be observed from Table9 that, by changing the weight of the four requirement attributes, different consumer grouping results can be generated. When the time window weight is larger, distribution is delivered by time. When the weight of fresh food value is larger, distribution is delivered by value. Different distribution schemes can be obtained by changing the weight of decision-makers. Therefore, the consumer clustering method proposed by us is both effective and practical; it is a common consumer classification method.


### 6.2. The Improved Fuzzy Genetic Algorithm Experiment Results and Discussion

This test is a test for the consumer grouping result (10, 11, 16, 17, 18, 21, 22, 23, and 24). We suppose that the fresh food plant delivers two similar storage temperature foods to consumers. Additionally, we suppose the temperature adjusted unit of the truck is0.1°C. The quality of the food ranges from 0 to 10. The minimum quality of food accepted by consumers is set to 8; the change in food quality is inversely proportional to the storage time. We also suppose the initial crossover rate is 0.6, and the initial mutation rate is 0.05. The maximum generation is 200, and we set αt=3; βt=1; αc=250; βc=10; αd=500; βd=-1. The time window request of consumers in the experiment is shown in Tables 6 and 7.First, a comparison between the total cost from the improved fuzzy genetic algorithm and the total cost from the traditional genetic algorithm was performed; the result is shown in Figure6. From Figure 6, we can observe the improved fuzzy genetic algorithm achieves convergence within 30 generations; however, the traditional genetic algorithm with 200 generations did not achieve convergence. At the same time, it can be observed that the improved fuzzy genetic algorithm does not change much with increasing generations; however, the traditional genetic algorithm is relatively unstable. In addition, the proposed improved fuzzy genetic algorithm converges in less time. Therefore, the improved fuzzy genetic algorithm obtains the optimal solution with higher efficiency. The performance of the improved fuzzy genetic algorithm is superior to the traditional genetic algorithm.Figure 6
Convergence comparison between improved fuzzy genetic algorithm and traditional genetic algorithm.Second, we conduct a robust test for the proposed improved fuzzy genetic algorithm. Because the intelligent optimization algorithm has randomness, we experiment 20 times with the same parameter. We then use the mean and the minimum total cost from the improved fuzzy genetic algorithm and the mean and the minimum total cost from the traditional genetic algorithm. Subsequently, the performance of the two methods is compared. Considering the complexity of the problem, each generation contains 200 chromosomes. To better illustrate robustness, we set different parameters for crossover probability and mutation probability and repeat the experiment 20 times for each set of parameters. Figures7 and 8 show the crossover rate and the mutation rate in evolution. Figures 9 and 10 show the average total cost and the minimal total cost results from the traditional genetic algorithm. Figures 11 and 12 show the average total cost and the minimal total cost results from the improved fuzzy genetic algorithm. It can be observed that both the average total cost and the minimal total cost from the traditional genetic algorithm are unstable. However, both the average total cost and the minimal total cost from the improved fuzzy genetic algorithm decrease faster in the early stages of evolution; they then tend to stabilize. The lowest total cost is at the 148th generation for the improved fuzzy genetic algorithm, while it is at the 193rd generation for the traditional genetic algorithm.Figure 7
Crossover rate in evolution.Figure 8
Mutation rate in evolution.Figure 9
Average total cost of GA.Figure 10
Minimal total cost of GA.Figure 11
Average total cost of IFGA.Figure 12
Minimal total cost of IFGA.Third, we provide the best solution of the transportation route, storage temperature, and average speed for the consumer grouping result, which is (10, 11, 16, 17, 18, 21, 22, 23, and 24). Table10 shows the results. The results indicate that the improved fuzzy genetic algorithm has better performance than the traditional genetic algorithm.Table 10
Best solutions of IFGA and GA.
Stage IFGA GA Transport order Storage temperature Average speed Transport order Storage temperature Average speed 1 23 8.8 65 22 8.8 67 2 22 8.7 67 16 8.9 68 3 16 8.7 63 18 9.0 70 4 18 8.9 70 21 8.8 68 5 21 8.8 68 24 8.9 72 6 24 8.5 66 10 8.4 68 7 17 8.4 72 11 8.3 67 8 10 8.6 78 17 8.3 68 9 11 8.6 80 23 8.5 73 10 Fresh foodplant Shut downrefrigeration equipment 65 Fresh foodplant Shut downrefrigeration equipment 65 Total cost 2246.80   2867.30


## 6.1. Consumers Fuzzy Clustering Result

Using MATLAB 9.1 programming to realize the simulation, the running environment is Intel CPU 3.8 GHz, Memory 1024 MB. The programme randomly generated 24 consumer points on the 100∗100 Cartesian plane. The coordinate of the fresh food plant is (60,55). The programme randomly generated 24 consumer order information requirements; thus, we obtain information, so get 7 requirement properties. xj1 is the fresh food demand of customerj in a plan period; xj2 is the geographic position of customerj. xj3 is the time window of customerj; the time window requests of 24 consumers in the experiment are shown in Tables 6 and 7. xj4 is the value of fresh food that is delivered to customerj; xj5 is the storage temperature similarity of fresh food that is delivered to customerj. xj6 is the fresh food security requirement of customerj; xj7 is the desired service quality of customerj. Additionally, we use the triangular fuzzy number to evaluate xj3,xj5,xj6, and xj7. The consumer order requirement properties information is shown in Table 8.Table 6
Time window request (a).
customers 1 2 3 4 5 6 7 8 9 10 11 12 t l k 3 4 3.5 3 5 3.5 2.5 3 2.5 5 5 1 t u k 3.5 4.5 4 4 5.5 4 3 4 3 5.5 5.5 1.5Table 7
Time window request (b).
customers 13 14 15 16 17 18 19 20 21 22 23 24 t l k 4.5 4 3.5 3 4.5 3 3 2 4 3 2 4 t u k 5 5 4 4 5 4 4 2.5 5 4 3 5Table 8
Consumer order requirement properties information.
No x j 1 x j 2 x j 3 x j 4 x j 5 x j 6 x j 7 1 38 30,50 middle 4300 middle middle middle 2 42 32,56 low 3680 middle low low 3 25 53,49 middle 2760 low middle middle 4 30 56,79 middle 4200 middle middle middle 5 48 78,45 very low 4980- middle very high very high 6 27 68,52 middle 2560 middle middle middle 7 78 79,65 high 5600 high very high very high 8 56 18,20 middle 4670 middle middle middle 9 46 13,33 high 4520 middle middle middle 10 18 86,74 very low 1800 very high very high very high 11 27 86,79 very low 2890 high very high very high 12 38 8,7 very high 3540 middle middle middle 13 43 96,34 low 4130 very high very high very high 14 17 74,48 low 1680 middle middle middle 15 12 45,90 middle 1370 middle middle middle 16 83 65,29 middle 6530 middle middle middle 17 42 48,78 low 3200 low low low 18 80 78,34 middle 7800 middle middle middle 19 32 56,77 middle 3100 middle middle middle 20 25 3,16 high 2680 middle middle middle 21 56 76,42 low 4260 high high high 22 43 58,32 middle 3780 middle middle middle 23 37 21,70 high 3520 middle middle middle 24 34 63,54 low 3200 middle middle middleIn the calculation of fuzzy similarity, there are four decision variables: the time window, the value of fresh food, the storage temperature, and the fresh food security requirement given three groups of weights(0.6,0.2,0.1,0.1),(0.15,0.7,0.125,0.125), and (0.25,0.25,0.25,0.25). The consumer clustering algorithm is used to classify consumers; let the evaluation criteria of similarity be λ=0.75. The consumer grouping result is as shown in Table 9.Table 9
Consumer grouping results under various weights.
weight value consumer grouping results ( 0.6,0.2,0.1,0.1 ), 1, 3, 4, 6, 8, 9, 12, 13 2, 5, 7, 14, 15, 19, 20 10, 11, 16, 17, 18, 21, 22, 23, 24 ( 0.15,0.7,0.125,0.125 ) 12, 20, 8, 9, 1, 2, 22,16 3, 23, 15, 17, 4, 19, 7, 10 24, 6, 14,5, 21, 18, 13, 11 ( 0.25,0.25,0.25,0.25 ) 22, 24, 6, 14, 5, 21, 18, 13, 11 10, 7, 19, 4, 17, 15, 23 3, 2, 1, 9, 8, 20, 12, 16It can be observed from Table9 that, by changing the weight of the four requirement attributes, different consumer grouping results can be generated. When the time window weight is larger, distribution is delivered by time. When the weight of fresh food value is larger, distribution is delivered by value. Different distribution schemes can be obtained by changing the weight of decision-makers. Therefore, the consumer clustering method proposed by us is both effective and practical; it is a common consumer classification method.


## 6.2. The Improved Fuzzy Genetic Algorithm Experiment Results and Discussion

This test is a test for the consumer grouping result (10, 11, 16, 17, 18, 21, 22, 23, and 24). We suppose that the fresh food plant delivers two similar storage temperature foods to consumers. Additionally, we suppose the temperature adjusted unit of the truck is0.1°C. The quality of the food ranges from 0 to 10. The minimum quality of food accepted by consumers is set to 8; the change in food quality is inversely proportional to the storage time. We also suppose the initial crossover rate is 0.6, and the initial mutation rate is 0.05. The maximum generation is 200, and we set αt=3; βt=1; αc=250; βc=10; αd=500; βd=-1. The time window request of consumers in the experiment is shown in Tables 6 and 7.First, a comparison between the total cost from the improved fuzzy genetic algorithm and the total cost from the traditional genetic algorithm was performed; the result is shown in Figure6. From Figure 6, we can observe the improved fuzzy genetic algorithm achieves convergence within 30 generations; however, the traditional genetic algorithm with 200 generations did not achieve convergence. At the same time, it can be observed that the improved fuzzy genetic algorithm does not change much with increasing generations; however, the traditional genetic algorithm is relatively unstable. In addition, the proposed improved fuzzy genetic algorithm converges in less time. Therefore, the improved fuzzy genetic algorithm obtains the optimal solution with higher efficiency. The performance of the improved fuzzy genetic algorithm is superior to the traditional genetic algorithm.Figure 6
Convergence comparison between improved fuzzy genetic algorithm and traditional genetic algorithm.Second, we conduct a robust test for the proposed improved fuzzy genetic algorithm. Because the intelligent optimization algorithm has randomness, we experiment 20 times with the same parameter. We then use the mean and the minimum total cost from the improved fuzzy genetic algorithm and the mean and the minimum total cost from the traditional genetic algorithm. Subsequently, the performance of the two methods is compared. Considering the complexity of the problem, each generation contains 200 chromosomes. To better illustrate robustness, we set different parameters for crossover probability and mutation probability and repeat the experiment 20 times for each set of parameters. Figures7 and 8 show the crossover rate and the mutation rate in evolution. Figures 9 and 10 show the average total cost and the minimal total cost results from the traditional genetic algorithm. Figures 11 and 12 show the average total cost and the minimal total cost results from the improved fuzzy genetic algorithm. It can be observed that both the average total cost and the minimal total cost from the traditional genetic algorithm are unstable. However, both the average total cost and the minimal total cost from the improved fuzzy genetic algorithm decrease faster in the early stages of evolution; they then tend to stabilize. The lowest total cost is at the 148th generation for the improved fuzzy genetic algorithm, while it is at the 193rd generation for the traditional genetic algorithm.Figure 7
Crossover rate in evolution.Figure 8
Mutation rate in evolution.Figure 9
Average total cost of GA.Figure 10
Minimal total cost of GA.Figure 11
Average total cost of IFGA.Figure 12
Minimal total cost of IFGA.Third, we provide the best solution of the transportation route, storage temperature, and average speed for the consumer grouping result, which is (10, 11, 16, 17, 18, 21, 22, 23, and 24). Table10 shows the results. The results indicate that the improved fuzzy genetic algorithm has better performance than the traditional genetic algorithm.Table 10
Best solutions of IFGA and GA.
Stage IFGA GA Transport order Storage temperature Average speed Transport order Storage temperature Average speed 1 23 8.8 65 22 8.8 67 2 22 8.7 67 16 8.9 68 3 16 8.7 63 18 9.0 70 4 18 8.9 70 21 8.8 68 5 21 8.8 68 24 8.9 72 6 24 8.5 66 10 8.4 68 7 17 8.4 72 11 8.3 67 8 10 8.6 78 17 8.3 68 9 11 8.6 80 23 8.5 73 10 Fresh foodplant Shut downrefrigeration equipment 65 Fresh foodplant Shut downrefrigeration equipment 65 Total cost 2246.80   2867.30


## 7. Conclusions

The government and researchers are widely concerned with fresh food safety because it is related to people's healthy diet and life safety. One of the most important considerations to ensure the safety of fresh food is timely and effective distribution. To have better market competitiveness, one of the important factors is quality and freshness of food; a fresh food supply chain should not only consider the freshness of food during distribution but also minimize the cost of distribution. With the objective of maintaining the quality of fresh food and minimizing the total distribution cost, this study develops a method to provide an optimal decision for the logistics manager of the fresh food supply chain.This study considers the case that a fresh food plant distributes fresh food to multiple consumers who are geographically positioned differently; the fresh food is varied and is delivered with the same group of trucks. The distribution of fresh food is considered in two stages. The first stage is cluster consumers; that is, we determine which consumers each truck is responsible for distributing. Based on customer requirement attributes’ design decision variables, we then use a proposed fuzzy clustering method for grouping customers. The clustering method can effectively solve the problem of the logistics distribution of one-to-many. The second stage is based on the consumers grouping results; we develop a total cost model that includes the transportation, refrigerated, devalued, and penalty cost incurred during distribution. The model is used to determine the optimal route selection, temperature control, and average speed of each truck in distribution. An improved fuzzy genetic algorithm is proposed to solve this problem.The application of the proposed fuzzy clustering method was illustrated using an example. The application of the total cost model was illustrated using the two methods of GA and IFGA. From these three aspects, we demonstrated that the improved fuzzy genetic algorithm has better performance than the traditional genetic algorithm. That is, the convergence speed, the robustness, and the optimal solution all have obvious superiority.The proposed model and method in the research mainly focus on the fresh food supply chain through land transportation. The quality of some fresh food will change after it is put into the cooler containers; therefore, the research targets fresh food that can be transported in cooler containers. The proposed method provides the optimal decision strategy for food safety and the total cost in this fresh food supply chain.The research is more focused on the transportation management of a cold chain system. A manufacturer distributes a variety of products to consumers in different geographic locations using the same group of trucks. Our model and method consider the main aspects of a mix-load fresh food supply. Further research will consider some of the uncertain transportation conditions during transport and the dynamically changing price of fresh food to make dynamic transportation decisions under the premise of ensuring food safety such that it can express market behaviour better.



---

*Source: 5743287-2018-08-23.xml*