Applications of two new algorithms of cuckoo optimization (CO) and forest optimization (FO) for solving single row facility layout problem (SRFLP)

Nowadays, due to the inherent complexity of the real optimization problems, it is a challenging issue to develop a solution algorithm to these problems. Single row facility layout problem (SRFLP) is an NP-hard problem of arranging a number of rectangular facilities with varying lengths on one side of a straight line with the aim of minimizing the weighted sum of the distances between all the facility pairs. In this work, the two new algorithms cuckoo optimization (CO) and forest optimization (FO) are applied and compared to solve SRFLP for the first time. The operators of these two algorithms are adapted according to the characteristics of SRFLP, and the results obtained are compared for two groups of benchmark instances of the literature. These groups consist of instances with the number of facilities less and more than 30. The results obtained from the two groups of instances show that the proposed cuckoo optimization algorithm (COA) has a better performance than the proposed forest optimization algorithm (FOA) in both aspects of finding the best solution and the computational time.


Introduction
In a facility layout problem (FLP), we wish to arrange a number of facilities in a given space to satisfy an objective function.Single row facility layout problem (SRFLP) is a specific case of FLP, which is the arrangement of n facilities on a line so as to minimize the transportation costs among facilities.SRFLP has attracted significant attention in the recent years [1].Generally, SRFLP can be described as follows.Assume that there are n rectangular facilities.They should be arranged on one side of a straight line in a given direction.The parameters involved in the problem are the length l i (i=1, 2, …, n) of each facility i and ann × n matrix C = [c ij ], where c ij is usually the flow between the facilities i and j (i, j=1, 2, …, n with i<j).This matrix is a symmetric matrix.The distance between each pair of facilities is calculated as the distance between their centers.The objective of the problem is to arrange the facilities to minimize the weighted sum of the distances between all the facility pairs.Denoted byΠ n , the set of all permutations π of N= {1, 2 … n}, SRFLP can be formulated as follows [2]: where, d ij π is the distance between the facilities i and j with respect to the permutationπ.In This model, all the permutations of N are searched to find a permutation with a minimum objective function value.One should note that due to the symmetrical property of the cost matrix C, there is no difference between c ij andc ji .
In 1974, Garey et al. showed that the minimum linear arrangement problem that is a special case of SRFLP is NP-hard, so by implication SRFLP is NP-hard too [3].In this paper, with regard to this model, two algorithms are proposed to solve SRFLP, and they are compared with each other.
In the literature, because of the theoretical attractiveness and numerous practical situations of SRFLP, many papers have been presented in this area.SRFLP has numerous practical applications in the real world.For example, arrangement of rooms in hospitals, departments in office buildings or supermarkets [4], arrangement of machines in flexible manufacturing systems [5], design of warehouse layouts, and assignment of files to disk cylinders in computers storage [6] are some of these applications mentioned in the literature.
In addition to these applications, there are some practical applications of a special case of SRFLP, in which the facilities have unit lengths.These applications include the design of error correcting codes [7], wire length minimization in VSLI design, graph drawing, and reordering of large sparse matrices [8,9].Regarding the numerous applications of SRFLP, several methods have been proposed in the literature to solve it.These methods can be categorized into exact, heuristic, and meta-heuristic algorithms.Exact methods have been applied to solve small instances of SRFLP to optimality, and their relaxations have been used to obtain good bounds for larger SRFLP instances.The first exact method used to solve SRFLP was a branch and bound algorithm presented by Simmons in 1969 [4].After that, different exact methods have been reported in the literature including combinatorial branch and bound, mathematical programming [10,4], dynamic programming [6], branch and cut [5,6,11], cutting planes approach [11,12], and semi-definite programming [7,13,14].
Since in this paper we study two meta-heuristic algorithms to solve SRFLP, we tend to review the heuristic and meta-heuristic algorithms suggested in the literature for SRFLP.For more information on the exact methods that have been presented in the literature to solve SRFLP, the researchers are referred to review the paper presented by Kothari and Ghosh [1].Since the exact algorithms for SRFLP are computationally expensive, they have been applied to relatively small instances, with up to 42 facilities.The heuristic and meta-heuristic algorithms are faster than the exact methods but they do not guarantee an optimal solution [1].In the recent years, different meta-heuristic algorithms have been applied to solve various engineering problems because of their complexity.For example, references [15][16][17][18][19][20][21][22][23][24][25] present different meta-heuristic algorithms for different engineering problems.In the literature, the heuristic and meta-heuristic algorithms used to solve SRFLP are divided into 2 groups of construction and improvement methods.Construction methods construct the sequence of facilities until a complete permutation is obtained.Neghabat in 1974 presented a constructive algorithm to obtain a complete solution by adding one machine at a time to the end of the current solution [26].A heuristic method based on the eigenvectors of a transformed flow matrix was introduced by Drezner in 1987 [27].A linear mixed-integer formulation of the SRFLP and a penalty technique to solve it was presented by Heragu and Kusiak in 1991 [28].Kumar et al. in 1995and Djellab and Gourgand in 2001 introduced a constructive greedy heuristic method to solve SRFLP [29,30].Also some heuristic procedures, used to extract a feasible solution to SRFLP from an optimal solution to the semidefinite programming (SDP) relaxation, were presented by Anjos et [7,11,13,31].The improvement methods start with one or more permutations of facilities as the initial solutions, and improve them until the stopping criteria is reached or the solution cannot be improved.The seven meta-heuristic algorithms tabu search (TS), genetic algorithm (GA), particle swarm optimization (PSO), simulated annealing (SA), ant colony optimization (ACO), scatter search (SS), and imperialist competitive algorithm (ICA) have been reported in the literature to solve SRFLP.Also some hybrid algorithms based on SA, GA, ACO, PSO, etc. have been studied in different papers to solve SRFLP.[42,43].Also there are some hybrid algorithms to solve SRFLP such as a hybrid algorithm based on SA and GA by Braglia in 1996 and a hybrid algorithm based on ACO and PSO by Teo and Ponnambalam in 2008 [44,45].
Cuckoo optimization algorithm (COA) is a new meta-heuristic algorithm introduced by Rajabioun in 2011 [46].COA has proven its excellent capabilities such as faster convergence and better global minimum achievement rather than other meta-heuristic algorithms [47].COA is applied to solve different non-linear problems, and has shown good capability in diverse optimization tasks.This algorithm has been tested so far on different types of practical instances in some scopes such as teleportation systems, machine error compensation, noise canceller design, chemical machine process, and machine process [48][49][50][51][52][53][54][55].This algorithm has been much better than the rest of the meta-heuristic algorithms, and has shown its efficiency [47].This subject can be a motivation to apply COA in other scopes of optimization such as SRFLP.Forest optimization algorithm (FOA) is a new evolutionary algorithm, which is inspired by few trees in the forest.This algorithm was introduced by Ghaemi and Feizi-Derakhshani in 2014 [56].Since FOA is a newly introduced algorithm, there is no paper in the literature using it, and the present paper can be a start to apply FOA to solve different optimization problems.Also FOA can solve continuous problems, and this paper presents a forest-based algorithm that solves discrete SRFLP with changing FOA operators regarding the characteristics of SRFLP.As only seven meta-heuristic algorithms have been reported in the literature to solve SRFLP, this paper introduces the two new COA and FOA to solve SRFLP for the first time.The performances of these two algorithms are also compared to each other using the SRFLP instances of the literature with different sizes.Our paper is organized as follows.In section 2, the proposed COA to solve SRFLP is presented.Section 3 describes the proposed FOA for solving this problem.In section 4, computational results of the two proposed algorithms are compared, and it is followed by the conclusions in section 5.

Proposed cuckoo optimization-based algorithm
As stated earlier, Cuckoo optimization algorithm (COA) is an evolutionary algorithm inspired by the life of a bird named Cuckoo.This algorithm is based on the specific egg-laying and breeding of cuckoos.COA starts with an initial population of cuckoos that have some eggs to lay in some host birds' nest.Those eggs that are more similar to the host birds' eggs survive and can grow to become a mature cuckoo.Other eggs are detected by the host birds and are expelled out.In such cases, cuckoos migrate to places more suitable for generation survival and egg-laying.The number of grown eggs shows the nest suitability of the area.The goal of a cuckoo optimization problem is to find a situation in which a maximum number of eggs are saved.The environmental features and migration of groups of cuckoos hopefully lead them to converge and find the best environment for breeding and reproduction.This best environment is global or the best solution to the problem.In this process, after chicks become mature, they make some groups.Each group has its own typical habitat.The habitat with the best situation is the destination of the cuckoos of other groups.After moving, each group resides in the area near the current location.Regarding the number of each cuckoo eggs and the distance of cuckoo to the best residence, some egg laying radii are assigned to it.After that, cuckoos start to lay eggs in some random nests inside this radius.This process continues until the best position is obtained.In the best position, most of the cuckoo habitats are gathered around the same global solution [46]. Figure 1 shows a COA flowchart.COA was introduced basically to solve continuous optimization problems.Until now, this algorithm has been modified to solve discrete optimization problems, and has had impressive results.In the next sections, the stages of the proposed COA to solve SRFLP are described.The implementation of COA in SRFLP is as follows.

Generating initial cuckoo habitat
As the goal of an optimization problem is to find an optimal solution in terms of the variables, a representation pattern that is usually a vector of the decision variables should be defined.For example, in genetic algorithm (GA), this vector is defined as chromosome and in particle swarm optimization (PSO), this array is named particle position.In COA, it is called habitat.In an N var dimensional optimization problem, a habitat is an array of 1 × N var representing the current living position of cuckoos.This array is defined as follows: Like the other meta-heuristic algorithms, the profit of a habitat is obtained by evaluation of the profit function f p at a habitat, as follows: As it can be seen, COA is an algorithm that maximizes the benefit function.To use COA for solving the minimization problems, it is sufficient to multiply a negative mark in a cost function as follows: To start COA, a matrix of sizeN pop × N var should be created, and for each habitat of initial population, some randomly-produced eggs are supposed to be assigned.The number of eggs that each cuckoo lays is between 5 and 20.These values are the upper and lower limits for egglaying at different iterations.Another habit of real cuckoos is that they lay eggs within a maximum distance from their habitat.This maximum range is called the egg laying radius (ELR).In an optimization problem with an upper limit of var hi and a lower limit of var low for the variables, for each cuckoo, an ELR, which is proportional to the total number of eggs, number of current cuckoo's eggs, and also variable limits of var hi and var low is determined.The ELR is defined as follows: where, α is an integer, supposed to handle the maximum value for ELR.To solve SRFLP with n facilities using COA, according to the problem definition, a habitat is represented as an n dimensional vector of integer numbers between 1 and n that shows a permutation allocating rectangular facilities to a straight line.For example, figure 2 shows a habitat of COA in SRFLP with 10 facilities.Using (1) as the cost function that should be minimized for COA, the profit of each habitat can be calculated using (4).To generate the initial population, two procedures are used in this paper.
The first one is based on theorem 1 in the paper presented by Samarghandi and Eshghi [40].In this procedure, it is assumed that in the cost function coefficients, c ij = c.Now, if we sort facilities in a non-descending order such that the shortest facility is denoted by 1 and the longest one by n, then figure 3 shows the optimum solution when n is an odd number, and figure 4 shows the optimum solution when n is an even number.With this procedure and another procedure that randomly generate the permutation allocating the rectangular facilities to a straight line, the initial population is created.After producing the initial population, the process of laying eggs will be started.

Cuckoos' style for egg laying
In this stage, each cuckoo starts laying eggs randomly in some other host birds' nests within her ELR.A clear view of this concept is shown in figure 5.After all cuckoos' eggs are laid in the host birds' nests, some of them that are less similar to the host birds' own eggs are detected by the host birds and thrown out of the nest.Thus after the laying process, p% of the eggs with less profit values will be destroyed.P is usually 10 in this step.The rest of the eggs grow in the host nests and are fed by the host birds.The important point about the cuckoo chicks is that only one egg per nest is allowed to grow because when a cuckoo egg hatches and the chick comes out, she throws out the host bird eggs, and if the host bird chicks are hatched sooner, the cuckoo chicks eat the most food that the host birds bring (because of their3 times bigger bodies, they push other chicks and eat more), and after some days, the host bird chicks starve to death and just the cuckoo chicks survive.
For implementation of this step of COA in SRFLP, in the proposed algorithm, because of the definition of habitat and structure of the problem, there is no ELR, and some changes in the structure of habitats are used for the laying eggs operator.For this aim, the swap operator is used.The steps of the proposed swap operator are as follow: 1-Consider a mature cuckoo habitat for laying eggs.2-To lay eggs, exchange the position of two facilities of a habitat and make an egg.Using this operator, the eggs are laid and the algorithm continues to the next section.

Immigration of cuckoos
After growing young cuckoos, they live in their own area and society for some time.At the time of spawning, migration to new and better habitats, where there is more chance for eggs to survive and more food available for young cuckoos, starts.After forming cuckoo groups in different areas (the search space of the problem), the society with the best profit is selected as the target point of a group for other cuckoos to migrate.When mature cuckoos live all over the environment, it is tough to recognize which cuckoo belongs to which group.To solve this problem, the grouping of cuckoos is done by the K-means clustering method (a k value between3 and 5 seems to be sufficient).After formation of groups, the average profit value is calculated to achieve the relative optimality of that group habitat.After that, the group with the highest amount of profit is selected as the target group, toward which other groups will migrate.During movement toward the target point, the cuckoos do not fly all the way to the destination habitat.They only fly a part of the way and also have deviation.This movement is shown in figure 6.As it is clear in this figure, each cuckoo flies only λ% of the total direction toward the destination habitat, and also has a deviation of φ radians.The two parameters λ and φ help cuckoos to search the environment more.λ is a random number between 0 and 1, and φ is a number between -π /6 and π /6.When all cuckoos migrate to the target habitat, and also the new habitats are specified, some eggs are given to the mature cuckoos.After that, considering the number of eggs for each cuckoo, an ELR is specified for it, and a new egg-laying process restarts.To simulate this operator of COA for SRFLP, considering the characteristics of SRFLP, the steps proposed for the immigration operator are applied in the following procedure.At first, the target habitat toward which the other cuckoos should migrate is considered (a habitat with the highest profit).Then a group of facilities in the target habitat is selected.Figure 7 shows an example of a target habitat with 10 facilities and selected group of facilities of the habitat.An array of a migrant cuckoo who wants to immigrate toward the target habitat is considered (Figure 8).The selected group of facilities that is in target habitat is copied exactly to the array of new position of the migrant cuckoo.For the other facilities in the new position of the migrant cuckoo that are not in the selected group, from the first cell of the migrant cuckoo habitat array, each facility that is not in the facilities of the selected group is placed in the cells of the array of the new position of the migrant cuckoos sequentially.Figure 9 shows the array of the new position of the migrant cuckoo.Figure7.Target habitat and selected group of facilities.

Eliminating cuckoos in worst habitats
Since there is always equilibrium in the birds' population in nature (because of food limitation, being killed by predators, and inability to find proper nest for eggs), a numberN max is determined as the maximum number of cuckoos that can live in the environment.In this step, only those N max number of cuckoos that have better profit values survive, and the others demise.After some iteration, the algorithm moves to one best habitat with the characteristic of maximum similarity of eggs to the host birds and also with the maximum food resources.This habitat has the best profit value, and is the best solution to the problem.In COA, convergence of 95% of cuckoos to the same habitat puts an end to the algorithm.The stopping condition for this algorithm, like other evolutionary algorithms, can be the number of iterations.In the proposed algorithm, the number of iterations is considered as the stopping condition.The pseudo-code of the proposed COA used to solve SRFLP is described in algorithm 1.
Output: An approximation of an optimal solution to the PCSP instance.
Initialize cuckoo habitats with N individuals using section 2.

3.
Proposed forest optimization-based algorithm Forest optimization algorithm (FOA) is a new evolutionary algorithm that is inspired by few trees in the forest which can survive for several decades, while other trees could live for a limited period.As mentioned earlier, this algorithm was introduced by Ghaemi and Feizi-Derakhshani in 2014 [56].FOA involves three main stages: local seeding of the trees, population limiting, and global seeding of the trees.Like other meta-heuristic algorithms, FOA starts with the initial population named trees.Each tree represents a solution of the optimization problem.A tree besides the cells of variables of the problem has a part that represents the age of the tree.At first, the age of a tree is set '0'.After initialization of the trees, the operator of local seeding will generate new young trees (or seeds in fact) from the trees with age 0 and add new trees to the forest.Then all trees, except the new generated ones, get old, and their age increases by '1'.The next step is the population limiting.At this step, there is a control on the population of trees in the forest, and some trees will be omitted from the forest.The omitted trees form the candidate population for the global seeding stage.In the third stage, which is the global seeding of the trees, a percentage of the candidate population is chosen to move far in the forest.The aim of global seeding is adding some new potential solutions to the forest in order to get rid of the local optimums.After that, the trees are ranked with regard to their fitness values.The tree with the best value of fitness function is chosen as the best tree, and its age is set '0' in order to avoid the aging of the best tree as the result of local seeding stage.In this way, it will be possible for the best tree to locally optimize its location by the local seeding operator.These 3 stages will be continued until the stopping conditions are met.Figure 10 shows the flowchart of the forest optimization algorithm.As mentioned earlier, since FOA is a new introduced algorithm, there is no paper in the literature that uses this algorithm, and this paper can be regarded as a start to apply FOA to solve different optimization problems.Also as FOA is introduced to solve continuous non-linear programming, this paper introduces a discrete version of FOA to solve SRFLP.In the next sections, using operators of FOA, a forest optimization-based algorithm is introduced to solve SRFLP.

Initialize trees
As mentioned earlier, in FOA, the potential solution to each problem is considered as a tree.A tree is usually a vector of variables, and the variables have lower and upper limits.In addition to the variables, each tree has a part related to the age of the tree.The age of a tree for each newly generated tree is set '0' as a result of local seeding or global seeding.After the local seeding stage, the age of the trees, except for the new generated ones in the local seeding stage, increases by '1'.This increase in age is used later as a controlling population in the limiting stage.Thus in FOA, a tree is represented as an array of 1 × (N var + 1), where N var is the diminution of the optimization problem, and one cell is considered as the age of a tree.Equation 6 represents a tree.
In the definition of a tree, the age of a tree has a maximum range that is a predefined parameter named lifetime.This parameter should be determined at the beginning of the algorithm.When the age of a tree reaches the lifetime parameter, that tree is omitted from the population of the trees, and is added to the candidate population.The big number of lifetime parameter increases the age of the trees in each iteration, and the forest will be full of the old trees that do not take part in the local seeding stage.Otherwise, a very small value for this parameter causes the trees to get old very soon, and they will be omitted at the beginning of the competition.Thus this parameter should provide a good chance for a local search.The best lifetime value was determined to be 6 in FOA.In SRFLP, a tree is represented as an n+1 dimensional vector, whose first n cells are integer numbers of 1 ton that represent a permutation, allocating rectangular facilities to a straight line, and the last cell is the age.Figure 11 shows a tree with 10 facilities.The fitness function for FOA is the same as that for COA, which is (1) and should be minimized.For generating the initial population, the same procedures used in COA are applied for FOA.All the initial trees in this step have the age '0'.With this population, the algorithm starts the next stage, which is the local seeding of the trees.

Local seeding of the trees
In the nature, during the seeding procedure of the trees, some seeds fall just near the trees, and after some time, they will grow.Now, the competition between the near-young trees starts, and those trees with better growing conditions such as enough sunlight and better location survive.The local seeding of the trees is simulated regarding this natural event.This operator is performed on the trees with the age '0', and adds some neighbors of each tree to the forest.The number of seeds that fall on the land near the trees and then turn into the trees as neighbors is considered as an FOA parameter named the local seeding changes or LSC.The value of this parameter used to solve different optimization problems depends on the dimension of the problem domain.In FOA, for problems with a dimension bigger than 5, 2/10 is recommended for LSC, and for dimensions less than 5, the LSC value will be 1.In local seeding operator, at first, a variable of a tree with the age '0' is selected.After that, a random number named r is generated in the range of(−∆x, ∆x).Then the value for the selected variable is added to r. ∆x is a small value, and it is smaller than the related variable's upper limit.Now, a new tree with age '0' is added to the forest.For simulating the local seeding operator to solve SRFLP, the swap operator is used to generate new trees.In this operator, for each tree with age '0', two facilities are selected randomly, and their locations are exchanged.With this operator and using the LSC parameter, many new trees are added to the forest.In the next stage of the algorithm, a limitation on the number of trees should be considered as the operator of population limiting.

Population limiting
To avoid infinite expansion of the forest, after generating numerous trees in the stage of local seeding of the trees, the number of trees should be limited.In FOA, the two parameters lifetime and area limit restrict the population of the trees.At first, the trees with an age more than the lifetime parameter are removed, and will form the candidate population.
The second limitation is the area limit, in which after ranking the trees according to the fitness value, if the number of trees exceeds the limitation of the forest, extra trees are omitted from the forest and added to the candidate population.The value for the area limit parameter is considered to be the same as the number of the initial trees.After population limiting, the global seeding stage is performed on some percentage of the candidate population (described in the next section).

Global seeding of trees
There are different kinds of trees, and numerous animals and birds feed on the seeds and fruits of these trees in the nature.Thus in spite of local seeding of the trees, seeds are distributed in the entire forest, and consequently, the habitat of the trees expands.Also different natural processes such as wind and water flow help distributing the seeds in the entire forest widely.Using these natural processes, the global seeding stage is defined to simulate the distribution of the seeds of the trees in the forest.The global seeding operator is performed on a determined percentage of the candidate population from the previous stage.This percentage is another parameter of the algorithm named transfer rate, and should be defined at the beginning of the algorithm.
The steps of global seeding of the trees are defined as follows.Regarding the transfer rate parameter, the trees from the candidate population are selected.Then some variables of each tree are selected randomly.After that, the value for each selected variable is changed with another randomly-generated value in the related variable range.As a result, a tree with age '0' is added to the forest.This operator performs a global search in the search space.During this stage, another parameter that is the number of variables, whose values will be changed, is defined as the global seeding changes or GSCs.
During the global seeding operator in the proposed algorithm to solve SRFLP, after determination of GSCs, the swap operator is carried out.The number of repetition of the swap operator is the number of GSCs.After producing new trees, these trees with age '0' are added to the forest.

Updating the best so far tree
In this stage, after sorting trees according to the value of their fitness function, the tree with the best fitness function value is selected as the best one.After that, the age of this tree turns to '0'.As mentioned earlier, in this way, it will be possible for the best tree to locally optimize its location by the local seeding operator.

Stop conditions
In FOA, the three stopping conditions predefined number of iterations, reaching the specified level of accuracy, and observance of no change in the fitness value of the best tree are defined.In the proposed forest optimization-based algorithm, the number of iterations is considered as the stopping condition.The pseudo-code of the proposed FOA to solve SRFLP is described in algorithm 2.

Comparison of cuckoo-and forestoptimization algorithms
Cuckoo optimization (CO) and forest optimization (FO) algorithms are coded in C#.The algorithms are run on an Intel (R) core(TM) i5-3210 CPU @2.05 Gigahertz and 4.00Gigabytes ram under the Windows 8.1 operating system.The performance of the two algorithms is evaluated on several benchmark instances.These instances are divided into two groups of instances with the number of facilities less than 30, and instances with the number of facilities more than 30.All the instances are available at http://www.gerad.ca/files/sites/Anjos/flplib.html.
For instances with the number of facilities less than 30, the maximum number of iterations is set150, and for the other group of instances, it is considered as 300.For each instance, each algorithm is run 20 times.In the following section, the computational experience of the two algorithms for the two groups of instances is reported.

Instances with number of facilities less than 30
Initially, the algorithms are tested on some instances with n ≤ 30 in the literature.The optimum solutions to this set of instances are known.Throughout the experiments, the following parameter values are used for FOA and COA, respectively.For COA, the initial population of cuckoos is set 30.The lower limit for egg-laying is considered 3, and the upper limit for egg-laying is set 5. In FOA, the number of initial trees is considered to be 30, GSC= 1+⌊ In the comparison of the two proposed algorithms, it is notable that the proposed COA has a better performance than FOA in both aspects of achieving the best solution and computational time.Table 2 shows the mean and standard deviation (SD) of objective function values of the instances.As mentioned earlier, each instance is run 20 times.Figure 12 depicts and compares the computational times of the two algorithms.
In figure 12, the horizontal axis shows the computational time, and the vertical axis depicts the problem number.

Instances with number of facilities more than 30
The same computational results for the second set of problems with the number of facilities more than 30 are shown in table 3.
According to this table, COA with the average gap of 0.0013 has a better performance than FOA with the average gap of 0.0017.Also the computational time of COA is less than FOA for all instances, and these results demonstrate a better performance of COA to solve SRFLP.Table 4 shows the mean and standard deviations of the objective function values of instances of set 2. As mentioned earlier, each instance is run 20 times.
Figure 13 shows and compares the difference between the computational times of the two algorithms.In figure 13, the horizontal axis shows the computational time, and the vertical axis depicts two algorithms.Output: An approximation of an optimal solution to the SRFLP instance.
Initialize forest with N individuals using section 2.1.The age of each tree is initially set zero.
For i=0 to maxiter for each trees with age 0 for j=0 to LSC Perform local seeding on selected trees using section 3.2.end end Increase the age of all trees by 1, except for the newly generated trees in this stage.Remove the trees with age bigger than lifetime parameter and add them to the candidate population.Sort trees according to their fitness value.Remove the extra trees that exceed the area limit parameter from the end of forest and add them to the candidate population.Choose transfer rate percent of the candidate population.For each selected tree Perform global seeding using section 3.4.Set the age 0 end end Return the best tree as the result.

Conclusion
This paper considers the single row facility layout problem (SRFLP).Some exact and heuristic methods have been developed in the recent years to solve this problem but, as this problem is NPhard, finding optimum solutions for the large instances of this problem is not possible within a reasonable time.Nowadays different metaheuristic algorithms are introduced in the literature to solve SRFLP but we still need to have a fast algorithm that can obtain a near-optimum solution for large instances of the problem.Cuckoo optimization (CO) and forest optimization (FO) algorithms are two meta-heuristic algorithms that have been introduced recently.
In the literature, these algorithms have not been applied to solve SRFLP yet.In this paper, the performance of COA and FOA to solve SRFLP is compared.As COA and FOA are defined to solve continuous optimization problems in the literature, to solve SRFLP that is a discrete problem, at first, a cuckoo-based algorithm and a forest-based algorithm are proposed.Then to test the performance of these two algorithms, two groups of instances with the number of facilities less and more than 30 are used.The computational results obtained for the two algorithms show that COA has a better performance than FOA in both aspects of achieving the best solution and computational time.

Figure 3 .
Figure 3. Optimal layout when n is odd.

Figure 4 .
Figure 4. Optimal layout when n is even.

Figure 5 .
Figure 5. Random egg-laying in ELR.Central red star is the initial habitat of cuckoo with 5 eggs; pink stars are eggs' new nests.

Figure 6 .
Figure 6.Immigration of a sample cuckoo toward a goal habitat.

Figure 11 .
Figure 11.A tree representation in SRFLP with 10 facilities and age of zero.
of facilities (n), flow matrix (F), facilities length matrix (L), number of initial trees (N), maximum number of iterations (maxiter), local seeding change (LSC), global seeding change(GSC), transfer rate, life time, area limit.

Figure 12 .
Figure 12.Comparison of computational times of two COand FO-based algorithms for instances with number of facilities less than 30.

Figure 13 .
Figure 13.Comparison of computational times of two COand FO-based algorithms for instances with number of facilities more than 30.
al. in 2005, Anjos et al. in 2008,Anjos and Yen in 2009, and Hungerlander and Rendle in 2011 Romero and Sanchez-Flores in 1990, Heragu and Alfa in 1992, and Gomes de Alvarenga et al. in 2000 applied SA to solve SRFLP [32,33,34].Solimanpur et al. in 2005 presented an ant colony algorithm to solve this problem [35].Different papers including Datta et al. in 2011 and Ficko et al. in 2004usedGA to solve SRFLP [36,37].Kumar et al. in 2008 and Kothari and Ghosh in 2014 presented a scatter search algorithm to solve SRFLP [38,39].Gomes de Alvarenga et al. in 2000 and Samarghandi and Eshghi in 2010 applied TS to solve SRFLP [34,40].In 2010, Samarghandi et al. presented PSO to solve this problem [41].Akbari and Maadi and Lian et al. in 20ll proposed an ICA to solve SRFLP

table 1 .
In this table, the first column shows the problem number.The number of facilities of instances is presented in the second column.The next column is the objective function value of optimum solution of instances from the literature.Columns 4, 5, and 6 are related to COA.Column 4 is the objective function value of the achieved COA solution.Column 5 shows the computational time of COA, and column 6 calculates the gap between objective function values of optimum solution and achieved COA solution of the instances.As it can be seen in table 1, the proposed COA is able to achieve the best solutions reported in the literature.The next three columns 7, 8, and 9 are the results of applying FOA.In column 7, the value of objective function of the achieved FOA solution is shown.Column 8 shows the computational time of FOA, and column 9 calculates the gap between objective function values of optimum solution and achieved FOA solution of the instances.This gap is calculated as follows: