Application of Layered Coding Genetic Algorithm in Optimization of Unequal Area Production Facilities Layout

Unequal area facilities layout problem (UA-FLP) is an inevitable problem in the process of new construction, reconstruction, and expansion of enterprises. The rationality of the facilities layout has a great influence on the operation performance of the production system. Finding the optimal solution of UA-FLP according to the requirement of production process is the main content of the plant design. The facilities were constrained by given areas and aspect ratio, respectively. By adopting the method of slicing tree, the layout space was divided into multiple regions for each facility. The genetic algorithm was developed by using layered coding to show the slicing process. Considering the production logistics cost as well as the adjacency relations between the facilities, the goal function was established and the optimal solution was obtained by running the proposed algorithm. Finally, the feasibility of the proposed approach was validated by a set of known problems. The comparison results show that it can provide decision support for rapid optimal layout of multifacilities.


Introduction
UA-FLP was proposed originally by Armour and Buffa in [1], and its objective is to determine the good locations for a given set of departments with different areas on some workshop floor to optimize the material handling cost and/ or other objectives. e facility can be small or big according to the level of the facility layout, but it should be a physical entity with some function. ere is about 20% to 50% of the processing cost used for material handling, and scientific and reasonable facilities layout can save at least 10% to 30% of the material handling fee [2,3].
Classic FLPs tend to study equal-area facilities arrangement; i.e., all facilities have the same area and shape. In this case, the facility centroid is fixed and the overall closeness or distance between facilities will not change when switching the location of any two facilities. But, the equalarea hypothesis is impractical, and the facility area is often unequal. So, the centroid of each facility depends on its area and shape and has no regular distribution as equal-area case.
Heuristic algorithm based on the discrete model is proposed in reference [4] to deal with the UA-FLP. is approach divided the district into some small squares with a fixed area, and each facility was allocated some numbers of squares most close to its area by use of heuristic algorithm. As shown in Figure 1, the grid size determines the precision of the facility representation; the smaller the grid size, the more precise the facility representation. e facility shape was also represented well by this approach. But, the time consumption is great to calculate the interference between facilities during the detailed layout process. Also, this approach is easy to produce facility layout with irregular shape. By far, the most commonly used UA-FLP model is mainly based on block diagram with unequal area as depicted in [5].
Deterministic algorithm has high requirement in memory and CPU time, so it is often used to solve small-scale UA-FLP and reference [21] proved its effectiveness. Heuristic algorithm and intelligent algorithms have faster calculation speed and are suitable for large-scale UA-FLP. Furthermore, genetic algorithm is most widely used, and different genetic algorithms were developed for various UA-FLPs.
A genetic algorithm hybridized with local search to obtain the Pareto solutions set was proposed in [22], and the author adapted a random weight to combine values of two objectives. For unequal area facility layout problems, a genetic algorithm based on slicing structure was developed in [23], and four objective functions such as material handling costs, aspect ratio, closeness, and distance requests were considered simultaneously by use of a Pareto-based evolutionary approach. In order to improve the performance of premature convergence, lack of diversity, and high computational cost, an island model genetic algorithm was proposed in [24]. e compared results showed the proposed approach has great improvement on the above aspects. In [25], a multiobjective interactive genetic algorithm was proposed by considering both quantitative aspects and subjective features, which allowed the interaction between the expert designer and the algorithm. A biased random-key genetic algorithm to determine the placement order and dimensions of each facility was proposed in [26], and the results showed its better performance for 19 of the 28 benchmark facility layout problems.
For large-scale UA-FLP problems, a genetic algorithm combined with a decomposition strategy was proposed in [27]. Compared with basic genetic algorithm, the experiments in the paper showed that the proposed approach had an average solution improvement of 6% or 7% for large-scale instances with 90 or 100 facilities.
is paper put forward a method of LCGA (layered coding genetic algorithm) for slicing-based plane splitting to lay out facilities. is approach can generate feasible solution rapidly with the help of the layered coding method. It can provide larger-scale UA-FLP solving a new thinking. e rest of this paper is organized as follows: Section 2 provides a description of the UA-FLP dealt with in this paper. e design process of the proposed layered coding genetic algorithm is presented in Section 3. Section 4 compares the proposed approach with some known UA-FLPs. e conclusions are presented in Section 5.

Location Relations of UA-FLP.
Assume that all facilities are rectangular blocks with a given area. Considering the building module, facilities need to satisfy a given aspect ratio constraint to avoid producing an approach with long narrow shape facilities layout. All facilities must be located in a given area and cannot overlap between them. Take a UA-FLP involving facilities i and j; for example, the relative position relations are as shown in Figure 2. Figure 3(a) shows the projection polygon of facility space. Figure 3(b) shows the projection polygon of facility and its necessary space, including transport corridor, operational space, and maintenance space for workers. To facilitate the facilities layout, Figure 3(c) considers the rectangular envelope of Figure 3(b) as the objects of UA-FLP. So, the necessary horizontal and vertical spacing between facilities shown in Figure 2 can be decomposed to the corresponding facility (as shown in Figure 4). By doing so, the amount of computation to solve UA-FLP can be decreased without losing the accuracy of result.

Computational Intelligence and Neuroscience
where n is the number of facilities, c ij is the per unit handling cost between facility i and facility j, f ij is the logistics quantity between facility i and facility j, and d ij is the distance between facility i and j.
where n is the number of facilities and b ij ∈ [0, 1] is the ratio of distance between facility i and facility j to the maximum distance between facilities in a given layout approach, and is used to represent their closeness factor between two facilities. r ij is the quantitative score of the nonlogistics relationship level determined by the SLP method (Table 1). is problem belongs to multiobjective optimization problem (MOOP) since there is more than one objective function to be optimized simultaneously. Optimal decisions need to be taken in the presence of tradeoffs between two or more conflicting objectives. Taking UA-FLP as example, material handling cost is minimized while closeness scores are maximized while locating facilities. For a nontrivial multiobjective optimization problem, no single solution exists that simultaneously optimizes each objective. ere exist a (possibly infinite) number of Pareto optimal    solutions; i.e., under these solutions, none of the objective functions can be improved in value without degrading some of the other objective values. All these Pareto optimal solutions are considered equally good if there is no additional subjective preference information.
ere are many kinds of forms of solutions for different goals, such as a representative set of Pareto optimal solutions and/or a single solution that satisfies the subjective preferences of decision maker. In this paper, we adopt the latter in order to obtain a well-determined layout approach.
Let M be the maximum of r ij and w 1 and w 2 be the weight coefficients of material handling cost and nonlogistics closeness, respectively. e above two goals can be synthesized into a minimizing objective function: where UR i (x), LL i (x), LL i (y), and UR i (y) denote the xcoordinate and y-coordinate of upper-right corner and lower-left corner of facility i, respectively. Formulas (4) and (5) ensure the aspect ratio of facility i in a given range α min α max , and formula (6) constrain the area of facility i equal to given value A i .
Manhattan distance is adapted to calculate the distance between facilities, namely: where x i and y i denote the x-coordinate and y-coordinate of the centroid. e exact coordinate position of facility i, LL i (x, y), UR i (x, y) , can be obtained by the following formula:

Basic Layout Principle for UA-FLP Using Slicing Tree.
In order to locate all facilities into a given area, the area should be divided into subareas with the same number of facilities. is paper adopted plane segmentation method to generate slicing tree in order to describe the relative position relationships of facilities during locating them. For a UA-FLP with n facilities, the slicing tree contains n leaf nodes and (n − 1) internal nodes. e information of the plane segmentation mode is contained in internal nodes, i.e., horizontal split (labeled H) or vertical split (labeled V). Taking a UA-FLP with 5 facilities as an example, a feasible plane segmentation approach is shown in Figure 5. e process of plane segmenting is the process of facilities layout. e change of coordinates for each partition after each plane segmenting is described as follows. e area has only two points: O(0, 0) and O ′ ( h i , v i ), when there is no facility located. e coordinate of upper-right corner is marked with the maximum limit value; i.e., x-coordinate is the sum of width of all facilities supposing they are side-byside arranged horizontally, and y-coordinate is the sum of length of all facilities supposing they are side-by-side arranged vertically. Taking the first partition as an example, the splitting process is as follows. Suppose AB is the first cutting line. e plane area is divided into two partitions. e upper part is for facilities 1 and 2, and the lower part is for facilities 3 to 5. After the first segmentation, the coordinates of point A and B are A(0, i�3, 4,5 Similarly, the other four divisions can be done. Finally, all facilities are located in different parts, and the precise coordinates of the facilities are as follows: facility 1{A, So, a feasible layout approach is provided. Based on this layout idea, this paper studies the hierarchical coding genetic algorithm in order to realize the layout scheme iterative optimization.

Genetic Algorithm Design.
For a UA-FLP with n facilities, there are n! possible combinations of their position and the number of combination will be larger if the shape or GA is a bionic algorithm for searching the optimal solution based on the principle of biological evolution. It simulates the natural process of gene recombination and evolution and compiles the parameters into binary-code or decimal-code (or other codes) genes. Several genes constitute a chromosome (individual), and many chromosomes carry out operations similar to natural selection, pairing crossover, and mutation. e final optimization result is obtained after repeated iterations (that is, generation inheritance).

Layered Coding Approach.
Coding is to map the phenotype data in solution space into genotype data in genetic structure. During iterations of GA, a coding string represents a solution and genetic operations are done by operating the bits of this string. So, the coding method also affects the genetic operators.
ere are mainly two coding methods: real number coding and binary coding. e former uses a real number as a gene, is easy to understand, and does not need decoding process, but it is also easy for premature convergence, thus falling into local optimum. e latter uses a binary string with specific length as a gene and has higher stability, larger population diversity, and better performance for global search. In this paper, we adopted the binary coding method. e number of bit is determined by the accuracy of the solution to be achieved.
For example, suppose an x-coordinate ranging in [0, 4] and the solution is exactly 4 decimal places behind the decimal point. e solution space is divided into (0-1) * (1e + 4) � 10,000 equal fractions. It takes 14 bits of binary to represent a solution; i.e., the coding of a solution is a 14 bit binary string since 2 13 < 10000 < 2 14 . e decoding process is as follows: Generally, for x ∈ [lower_bound, upper_bound], the value of x after decoding is e coded chromosome string should represent the following information simultaneously: facility sequence for layout, splitting point sequence, and splitting mode. e coding approach will be detailed below.
Facility sequence code is in the first layer. N facilities are coded by n different integers in the interval [1, n] by use of integer coding. e coding string can be any sequences of n integers in the interval [1, n] to allow different facility locating orders. Figure 6 shows a code string [1][2][3][4][5][6][7][8][9][10][11][12][13] of 13 facilities, f1, . . ., f 13 , with a random order of integers from 1 to 13, and the value of each bit of code string denotes the number of the facility it represents.
Splitting point code lies in the second layer. A feasible splitting point lies between every two bits of facility coding string. For every two adjacent bits of facilities coding string, there is a splitting point. For a n-bit facility coding string, there are n − 1 splitting points. We denote every splitting Computational Intelligence and Neuroscience position as an integer between 1 to n − 1. For the facility code string in Figure 6, its corresponding splitting position is shown in Figure 7. e facility set is divided into two different parts at the splitting point selected firstly. e remainder splitting points are contained in these two subsets of facilities. After each splitting operation, the number of subsets of facilities increases by 1. After n − 1 splitting, the facility set with n facilities will be divided into n single facilities locating in n different area blocks. For the code string of splitting point, we code them as a sequence from 1 to (n − 1) with random order corresponding to different plane segmentation approaches. e value of each bit of code string denotes the number of the splitting position in the facility code string. Taking the string shown in Figure 6 as an example, there are 12 positions that can be set as splitting points when carrying out plane segmentation. Suppose we produce a splitting point code string as [1][2][3][4][5][6][7][8][9][10][11][12], the splitting operation will begin with the 7 th splitting position, then 4 th , and finally, 6th. e splitting process is shown in Figure 8. e last layer of coding provides the information of splitting mode, horizontally or vertically. e splitting result of these two ways is different, and the facility layout is also different. We use 0 for horizontal and 1 for vertical. So, the splitting mode code is a binary string that has the same number of bits as the splitting point code. For the example as shown in Figure 8, assume a splitting mode code is [0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0]. Figure 9 shows a complete three-layer coding string or a chromosome of a feasible solution for a UA-FLP with 13 facilities. For the first step, the splitting mode is horizontal and the process of plane segmentation is similar to the description in Section 3.1.
So, for a UA-FLP with n facilities, the three-layer coding string can be expressed as shown in Figure 10.

Crossover Operation.
In genetic algorithms and evolutionary computation, crossover, also called recombination, is a genetic operator used to combine the genetic information of two parents to generate new offspring. It is one way to stochastically generate new solutions from an existing population. Newly generated solutions are typically mutated before being added to the population. e coding method determines the data structures to store genetic information and also affects the crossover operators.
Due to the aforementioned layered coding structure, genetic operation must be carried out by the segment to ensure the feasibility of the new code string. Taking the chromosome gene string in Figure 7 as an example, crossover points are selected in three layers, respectively. e two parent individuals swap the gene segments before and after the crossover points in three layers, respectively.
A crossover operation of layered coding string of 5 facilities is shown in Figure 11.
It can be found that some bit value of new code strings will lose or repeat in the first two layers after crossover operation. So, repair operation is necessary. Sort the missing value in ascending order and replace the repeated value of corresponding layer code strings. Taking the above offspring as example, the layer 1 code of offspring is

Mutation.
Mutation changes one or more gene values in a chromosome from its initial state in order to maintain genetic diversity from one generation of a population to the next. is can also prevent the population of chromosomes from becoming too similar to each other, thus slowing or even stopping evolution. For the layered code, we also adopted different mutation operators.
A mutation operator involves a probability P m that an arbitrary bit in a genetic sequence will mutate from its original state. A common method of implementing the mutation operator involves generating a standard uniformdistributed random number R for each bit in a sequence. e corresponding bit will be modified if R > P m . is single-point mutation is suitable for third-layer binary code of an individual.
For the first-and second-layer code, mutation operation is implemented by interchanging two genes of code string in order to ensure the feasibility of new individual after mutation. e gene bits to mutate are selected randomly and also use a standard uniform-distributed random number R to determine whether or not the selected bits will be swapped.

Processing for UA-FLP with Empty Space.
e method proposed herein split the area into subareas that are consistent with the number of facilities, each of which accommodates a facility. For a UA-FLP with empty space, we firstly need to turn it into a UA-FLP without empty space.
e detailed process is explained as follows. Suppose the ratio of the original region for all the facilities is r � W/H and the area of i-th facility is A i , we can arrange all the facilities in a new region, marked by the red border in Figure 12, with the area equal to the sum of all facilities since all necessary spaces for each facility has been included in its area as illustrated in Figure 3. e width W′ In general, solutions found in this way will be better than solutions found in other methods because the horizontal and vertical coordinates of each facility will be smaller.

Case Study
In order to validate the proposed approach, a set of problems described in the literature was used in this section. All the tested problems are shown in Table 2.
e algorithm is coded in Matlab 2015b. e computer's configuration running the algorithms was as follows: Intel Core i5-4460 (3.20 GHz), 8 GB RAM, and a Windows 10 operating system. e algorithm parameters settings for the tested problems are listed in Table 3, and the algorithm proposed in this paper is described in detail in Section 4.1. Step 1 Step 2 Step 3  Step 12

Parameters Setting and Pseudocode of Algorithm
(1) Coding Method. Integer coding was adopted in this case. e number n of facilities was assigned to n_f. e layout approach and the splitting point sequence were denoted by two interpermutations which took values from [1, n] and [1, n − 1], respectively. e splitting mode of each splitting operation was represented by a thirteen bits encoded string, and each bit can take value 0, splitting horizontally, or 1, splitting vertically.
(3) e Generation of Initial Population. According to the above approach, initial facility population, splitting position string, and splitting mode string can be generated by use of Algorithm 1.
Algorithm 2 carries out the establishment of fitness function and its value calculation. e crossover operation and the corresponding repair approach of facility level are presented in Algorithm 3.
As for the crossover and repair operation of the splitting point level, the method is similar to the above ideas; just replace the f_popu and n_f with so_popu and (n_f − 1). ere is no need for repair operation in the splitting mode level, and its crossover operation is the same as the facility level. e mutation operation of the facility level is shown in Algorithm 4. e mutation operation of the splitting point level or splitting mode level can be completed by replacing the f_popu and N_f of Algorithm 4 with so_popu and (n_f − 1) or sp_popu and (n_f − 1).

Computational Results and Analysis.
According to the above parameters setting, all the tested problems were solved by the proposed layout algorithm; the average optimal value of objective function of each tested problems was obtained as shown in Table 4 by running the proposed algorithm 30 times for each problems. e optimal layout approach of all tested cases obtained by the proposed approach is presented in Figures 13(a)-13(l).
From Table 4, we found that the proposed approach can search better solutions than did the methods from literature for 8 of 12 tested problems. As shown, the proposed approach has more improvement when the facility number becomes bigger; for example, the improvement present can be up to 4-7% when the facility number reaches 30 and 35.
Moreover, the average running time for finding the best solutions and the average total CPU running times have reduced drastically than did the approach of other literature. But, for the test case of P62 with no spare space for all the facilities, the proposed approach has a large gap from the optimal result of [35].

Conclusions and Prospects
Considering the constraints of area and aspect ratio of facilities, this paper proposed a slicing-tree-based binary plane segmentation method. e given area is divided into some blocks whose number equal to the number of facilities waiting for arrangement. e optimal solution was found by use of the layered coding genetic algorithm with the goal of maximizing the closeness relationship score and minimizing the material handling cost between facilities at the same time. e results of comparison of above 12 known problems between other literature methods and proposed approach show the effectiveness of the plane segmentation layout strategy and the reliability of layered coding genetic algorithm for solving the problems.
We draw the following conclusions based on the above study: (i) It is reasonable and effective to partition the facilities layout area by use of the binary plane segmentation method, which can arrange a reasonable block area for each facility. So, the feasibility of solution was guaranteed during the iterative process of genetic algorithm. (ii) By use of the layered coding genetic algorithm, the optimal splitting approach, i.e., optimal facility layout scheme, will be found during multiple iterative process. e result can provide decision support for actual production facility layout. (iii) e plane splitting process was expressed well by the layered coding approach. When the UA-FLP problem changed, i.e., the facility number, facility area, and also the aspect ratio, these changed values can be assigned in the form of parameters; as a result, the corresponding optimal layout approach can be output quickly. Also, the layout approaches of different parameters can be compared easily in order to find the key influence factors. Computational Intelligence and Neuroscience e optimal layout approach of UA-FLP can be obtained fast by use of the plane segmentation method and layered coding genetic algorithm; the corresponding objective function value and the minimal area needed for locating facilities can also be provided. For multiproduct facility layout problem, different layout approaches for different products can be output by running the proposed algorithm in terms of the different requirement of product for logistics cost and closeness relationship between facilities, i.e., realizing a dynamic optimization for multiproduct facility layout. e facility number has a significant impact on performance of proposed algorithm, and there is the Input: (x, y) ⟵ coordinate of facility centroid D ⟵ Matrix of logistics quantity between facilities; C ⟵ Matrix of unit logistics cost between facilities; r ⟵ Matrix of closeness score between facilities; r_max ⟵ maximum of closeness score between facilities; a1 ⟵ weight of logistics cost; a2 ⟵ weight of nonlogistics factors; Output: goal_v (value of fitness function) (1) for i ⟵ 1 to n_f (2) for j ⟵ 1 to n_f (3) d(i, j) � |x i − x j | + |y i − y j | (4) end for (5) end for (6) G1 ⟵ sum according to the row (sum according to the column(D. * flow_f. * flow_c)); (7) G2 ⟵ sum according to the row (sum according to the column(D./D_max. * relation_v)); (8) goal_v ⟵ a1 * G1 + a2 * (r_max-G2); (5) Genetic manipulation ALGORITHM 2: Calculating the value of fitness function.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.