1 Introduction

Optimal design of facility layouts is a classical problem in the operational research literature with applications in manufacturing and service systems. Facility layout planning (FLP) aims to determine the layout of facilities to optimize one or more operational objectives by minimizing cost objectives (e.g., travel time, material handling costs) and maximizing benefit objectives (e.g., area utilization, closeness rating, satisfaction of decision maker’s preferences) (Hosseini-Nasab et al., 2018; Pérez-Gosende et al., 2021). Its significance manifest through the impact on the efficiency of production systems and their productivity level. Facility layout plans determine the system’s ability to meet the production schedules at an affordable cost and poor plans create process bottlenecks, material flow congestion, underutilization. These plans also determine the degree of flexibility for replanning in the future. There are variations of the classical facility layout planning problem such as multi-objective FLPs (Saraswat et al., 2015), single-row FLPs(Keller & Buscher, 2015), reconfigurable FLPs (Maganha et al., 2019) and multiperiod FLPs (Turanoğlu & Akkaya, 2018). FLPs have been studied in various problem domains such as finding layout of temporary buildings on a construction site (Kumar & Cheng, 2015), designing hospitals (Hahn & Krarup, 2001), and developing microprocessor layouts (Funke, Hougardy, Schneider, 2016). FLP is known to be NP-hard and exact solutions are limited to small sized problems.

Continuous Facility Layout Problem (CFLP) is concerned with determining an efficient layout design for a set of facilities within a given area to minimize the total material handling costs. Considering facility shapes and dimension restrictions, layout design problems can be categorized into equal area and unequal area layout problems (Chae & Regan, 2016; Hosseini-Nasab et al., 2018). We consider the unequal area CFLPs with orthogonal linear flow of material between facilities. The distances are commonly based on the rectilinear distance (Benjaafar, Heragu, Irani, 2002) and less often based on Euclidean distance (Ripon et al., 2013). Accordingly, given the coordinates of the center of the facility as \({x}_{i}\) and \({y}_{i}\), then the orthogonal linear distance from a location (a, b) is calculated as \(d = \left| {x_{i} - a\left| { + } \right| y_{i} {-} b} \right|\).

An optimal layout is then defined as a non-overlap packing of rectangles with the minimal total material handling cost given \(p_{ij}\), unit distance handling cost between facilities \(i \) and \(j\). Let indices \(i\) and \(j\) to denote one of the N rectangular facilities. The parameters \(w_{i}\) and \(h_{i}\) denote the width and height of the facility \(i\). Let \(\left( {x_{i} , y_{i} } \right)\) denote the location of the center of facility \(i\) on the two-dimensional plane. The CFLP problem studied in this work is formulated as follows:

CFLP Model:

$$ \begin{aligned} & Min Z_{CFLP} = \mathop \sum \limits_{{{\text{(i,j)}} \in {\text{N: i < j}}}}^{{}} p_{ij } \left( {\left| {x_{i} - x_{j} } \right| + \left| {y_{i} - y_{j} } \right|} \right) \\ & {\text{s}}.{\text{t}}. \\ & \left| {x_{i} - x_{j} } \right| \ge \frac{1}{2}\left( {w_{i} + w_{j} } \right)\;{\text{or}} \\ & \left| {y_{i} - y_{j} } \right| \ge \frac{1}{2}\left( {h_{i} + h_{j} } \right) \forall i, j \in N\, \, \text{and} \, \,i < j \\ & {\text{x}}_{{\text{i}}} ,{\text{ y}}_{{\text{i}}} \ge \, 0,\;\forall i, j \\ \end{aligned} $$

In this study, we propose a novel heuristic method called Sequential Solution Method (SSM). We compared the proposed SSM with popular heuristic methods, i.e., Simulated Annealing (SA), Genetic Algorithms (GA) and our improved versions of simulated annealing (SA-CSR) and genetic algorithms (GA-CSR). Improved versions are based on approximating the facility coordinates to the coordinates of the center of smallest rectangle (CSR) that covers all facilities in the solution. In addition, we report on the comparison of SSM with four exact solution approaches, i.e., MIP1 (Papageorgiou & Rotstein, 1998), MIP2 (Ozyurt & Realff, 1999), MIP3 (Yang & Peters, 1998) and BB (Xie & Sahinidis, 2008) in the literature. Based on an experimental study, we report that SSM approach is promising in terms of solution times and quality.

SSM is based on the iterative decomposition idea where, instead of solving the original problem with many facilities (variables), we sequentially solve smaller subproblems generated via a Clustering Model (CM). SSM approach alternates between clustering of facilities using the CM and selecting the best layout for each cluster based on the objective function value. Accordingly, SSM is a recursive heuristic based on the exact solutions of reduced CFLPs. In SSM, the optimum layout solutions for the reduced CFLP are obtained using exact solution methods. Efficiency of the SSM is tested on the various test problems and results are compared with other heuristics and exact methods. In addition to its computational performance, the proposed approach, due to its decomposition-based solution strategy, allows for dynamically balancing the solution quality and time. Further, the clustering-based solution improvement gives the ability to prioritize the layout planning facility sets based on preferences of the decision maker.

The rest of the paper is organized as follows: In Sect. 2, we provide an overview of the relevant literature and recent studies on layout planning and CFLP formulation. Section 3 describes the CM and introduces the SSM as well as the CSR enhancements to the SA and GA. In Sect. 4, we present the results of a computational study comparing the proposed SSM with exact and heuristic methods using test instances with varying complexity. Section 5 concludes with a summary of findings and suggestions for future research. Results indicate that our novel clustering and sequential solution strategy is more successful in solving larger CFLP instances.

2 Literature

CFLP extends the well-known Quadratic Assignment Problem (QAP), as a facility allocation problem, determines minimum cost assignment of facilities to locations (Koopmans & Beckman, 1957). QAP assumes that all potential locations for each facility are known in advance and is based on the selection of one or more locations from potential locations in order to minimize a certain cost function (Chae & Regan, 2016, 2020). In contrast to QAP, there is no restriction for the choice of locations in the CFLP.

The unequal area CFLPs are NP-hard and global optimal solutions are difficult or impossible to compute in reasonable time. Both exact algorithms and heuristics have been developed to solve CFLP. Montreuil (1991) modeled facility location problem as a Mixed Integer Linear Programming (MIP) model. Binary (1–0) variables were employed to prevent overlapping of rectangular facilities. However, studies with MIP model indicate that it can find the optimal solution up to five facilities and Montreuil’s approach (1991) is only applicable for five facilities. Meller et al. (1998) proposed a linear approach to solve the CFLP and developed cutting methods to reduce the solution time. However, their approach could only solve the problem for up to seven facilities. Yang and Peters’ (1998) Mixed Integer Linear programming model made it possible to align long edge of each facility with the horizontal and vertical axes of the facility area. Ozyurt and Realff (1999) improved the model of Jeroslow (1989). In their study, absolute objective function value was expressed in a piecewise linear function and they formulated mixed-integer facility programming model excluding Big-M variables (Ozyurt & Realff, 1999). Sherali et al. (2003) significantly improved the solution time by developing symmetry reduction techniques and improving the branch and bound rules. Xie and Sahinidis (2008) proposed a branch-and-bound based algorithm to improve the pruning effectiveness.

Due to the complex nature of the layout problem, even the state-of-the-art exact algorithm is only able to solve instances with nearly ten facilities, while practical instances are often concerned with more facilities. Hence, most research in literature is based on heuristics to generate good solutions (Garc´ıa-Herna´ndez et al., 2015; Garcia-Hernandez et al., 2019; Kang & Chae, 2017; Kim & Chae, 2019; Palomo-Romero et al., 2017; Scalia et al., 2019; Tavakkoli-Moghaddam & Panahi, 2007; Ulutas & Kulturel, 2012). Given the high complexity of the CFLP, numerous metaheuristics have been proposed for layout design (Banerjee et al., 1992; Montreuil, Venkatadri, Ratliff, 1993; Chwif, Barretto, Moscato, 1998; Langevin, Montreuil, Riopel, 1994; Lacksonen, 1997; Kim & Kim, 2000; Montreuil et al., 2004a, 2004b; Hu et al., 2007; Ou-yang and Utamina, 2013; Keller and Bucher, 2015; Palubeckis, 2017). Various meta-heuristic are developed for these problems GA (Tate & Smith, 1995), SA (Tam, 1992), Tabu Search (Scholz, Petrick, Domschke, 2009), Particle Swarm Optimization (Kulturel & Konak, 2011) Ant Colony Optimization (Liu, 2019) and Harmony Search (Kang, Kim, Chae, 2018) /

In addition to the solution methodology for the standard CFLP, the extant literature also presents methods for its extensions. Some studies assumed that there may be uncertainty in the cost matrix and dynamic facility layout design models were developed (Balakrishnan & Cheng, 1998; Benjaafar, Heragu, Irani, 2002; Yang & Peters, 1998). Other variants and approaches in the literature include SA for dynamic layout problem (Baykasoglu & Gindy, 2001), simulation based non-sorting GA (Chen, 2019), a slicing tree based parallel tempering heuristic (Friedrich, Klausnitzer, Lasch 2018), a cuckoo search based algorithm for the closed loop layout design problem (Kang et al., 2018), hybrid ant colony optimization and simulated annealing (Ebrahimi et al., 2020). Several studies addressed the special instance of placing facilities on a linear path (Cravo & Amaral, 2019; Guan & Lin, 2016). A concurrent block layout, path design and aisle design (Klausnitzer & Lasch, 2019), packing algorithms for CFLPs (Crainic et al., 2008; Lodi et al., 2002a, 2002b).Some studies proposed optimizing over the software generated layouts (Abdollahi et al., 2019).

Others studies include layout problems with variations in the facility dimensions and number of objectives (Mendes & Themido, 2004; Hahn et al., 2010; Covas, et al., 2013; Opasanon & Lertsanti, 2013; M'Hallah & Bouziri, 2016; Pa Pagès Bernaus et al., 2019; Li et al., 2019; Amorim‐Lopes, 2020). Schneuwly and Widmer (2003) investigated the arrangement of the exhibition spaces in a fair. Braglia et al. (2005) discussed the layout problem in dynamic environments and proposed a measure of the layout robustness. De Giovanni et al. (2013), focused on the gate matrix layouts and optimization of electronic circuits.

3 Methodology

Solution times of CFLPs increase exponentially with the growing number of facilities. To address this complexity, we developed a clustering model (CM) that identifies sets of facilities based on an objective criterion. Given the clusters of facilities, respective layout optimization subproblems for each cluster (reduced CFLPs hereafter) can then be solved in a sequential manner (SSM). We note that this sequential approach is a heuristic method which can generate locally optimal solutions that are suboptimal for the original CFLP problem. In this section, we describe the CM and SSM methods as well as improved versions of SA and GA applied to CFLP, SA-CSR and GA-CSR, based on approximating the facility coordinates to the coordinates of the center of smallest rectangle (CSR).

3.1 Clustering model

CM generates reduced continuous facility layout subproblems with smaller number of facilities. Instead of solving the original problem with many variables, these reduced CFLPs are solved exactly by the subsequent SSM approach. It is known that exact algorithms can achieve the results quickly for problems with few facilities, e.g. up to 5 facilities. Thus, we limit the number of facilities in each cluster with a maximal threshold set size (\(K\)) in the CM. The choice of this threshold (K) as well as number of clusters (C) determines the performance of the overall approach. Note that, in the extreme case of \(K = N\) and \(C = 1\), the proposed approach is equivalent to the original CFLP where there is a single cluster containing all the facilities. As the cluster size decrease, e.g., tightening the \(K\) threshold, subsequent solution of reduced CFLPs becomes easier albeit at the expense of increased suboptimality risk. Hence there is a trade-off between the cluster size and optimality of the proposed approach. While the clustering approach reduces the computational complexity, it can result in myopic optimization of facility clusters during the subsequent SSM iterations. Hence, we also allow for commonality of facilities across multiple clusters.

In the CM model, the material handling costs and flow frequencies between facility i and j are employed to assign the most associated facilities to the same clusters. The clusters should include most associated facilities in terms of material handling costs to minimize CFLP in SSM, so the objective of CM model is maximization. In other words, we want to assign the most associated facilities (maximization) to the same clusters in CM and if the most associated facilities are in the same cluster the overall objective function of CFLP could be minimized in SSM. CM is employed only for finding most efficient clusters and SSM is for solving and minimizing the CFLP objective function value. The developed approach leverages the idea of divide-and-conquer where the set of facilities are partitioned into subsets based on their material flow associations (maximization) through CM. Accordingly, CM model maximizes the intra-cluster material flow and handling costs across all clusters in (1). Next, the SSM approach sequentially optimizes the layouts of facility clusters (minimization).The formulation of the clustering model is provided below.

Clustering Model (CM):

$$ Max Z_{CM} = \mathop \sum \limits_{c \in C}^{{}} \mathop \sum \limits_{{\begin{array}{*{20}c} {i,j \in N} \\ {{\text{i}} \ne {\text{j}}} \\ \end{array} }}^{{}} p_{ij} z_{ic} z_{jc} $$
(1)

s.t.

$$ \mathop \sum \limits_{{{\text{c}} \in {\text{C}}}}^{{}} z_{ic} = v\quad i \in N $$
(2)
$$ \mathop \sum \limits_{{{\text{i}} \in {\text{N}}}}^{{}} z_{ic} \ge 1\;\quad c \in C $$
(3)
$$ \mathop \sum \limits_{{{\text{i}} \in {\text{N}}}}^{{}} z_{ic} \le K\quad c = 1 \ldots C $$
(4)
$$ \forall z_{ic} \in 0 - 1 i \in N, c \in C $$
(5)

In CM, \(N\) denotes the set of facilities, where \(i,j \in N\) and \(c\) and \(C\) denotes the index and set of clusters, respective, i.e., \(c \in C\). Decisions are binary indicating the cluster assignment of facilities, i.e. \(z_{ic} = 1\) if facility i is assigned to cluster c, 0 otherwise. Constraint in (2) ensures that a facility is assigned to exactly \(v\) clusters where \(v\) is the inter-cluster mutuality parameter. Note that \(v = 1\) corresponds to the case where all clusters are mutually exclusive. For a non-trivial clustering solution, we have \(v < N\). The constraints in (3) and (4) ensure that the number facilities in each cluster are greater than 1 and smaller than K.

3.2 Sequential solution method (SSM)

Subsequent to CM, the SSM procedure, a recursive heuristic based on the exact solutions of reduced CFLPs is executed. SSM approach is an iterative procedure where we optimize the reduced CFLP for each cluster at a time while fixing the locations of all other facilities not a member of the cluster. Note that in solving the reduced CFLP of each cluster we consider the interaction between not only the facilities within the cluster but also with those external to the cluster. The salient aspect is that external facilities’ locations are kept fixed. In each iteration \(r\) of the SSM, given the clusters of facilities \(C\), we solve a reduced version of the CFLP model shown below. We denote the objective value of the reduced CFLP subproblem solved in iteration r for cluster c with \( Z_{CFLP}^{c,r}\). Given a set of clusters \(\left( C \right)\), the reduced CFLP model optimizing the layout of facilities in cluster \(c\) is identical to the original formulation with the exception of the last constraint which fixes the layout decisions of all the facilities other than those in the current cluster, i.e.,\( \forall i \in C\backslash c\).

Reduced CFLP Model \( \left( {C,c,r} \right)\): Cluster \(c\) at iteration \(r\) with set of clusters \(C\)

$$ Min Z_{CFLP}^{c,r} = \mathop \sum \limits_{{{\text{(i,j)}} \in {\text{C: i < j}}}}^{{}} p_{ij } \left( {\left| {x_{i} - x_{j} } \right| + \left| {y_{i} - y_{j} } \right|} \right) $$
(6)

s.t.

$$ \left| {x_{i} - x_{j} } \right| \ge \frac{1}{2}\left( {w_{i} + w_{j} } \right)\;\forall i, j \in N, \, \text{and}\, \,i < j\;{\text{or}} $$
(7)
$$ \left| {y_{i} - y_{j} } \right| \ge \frac{1}{2}\left( {h_{i} + h_{j} } \right) \forall i, j \in N, \text{and} \, \,i < j $$
(8)
$$ \left( {x_{i} ,y_{i} } \right) = \left( {x_{i} ,y_{i} } \right)_{{}}^{r} \forall i \in C\backslash c,\;{\text{x}}_{{\text{i}}} ,{\text{ y}}_{{\text{i}}} \ge \, 0,\;\forall i, j $$
(9)

We now present the SSM algorithm which is executed at least \(C + 1\) and at most \(R\) iterations, i.e., \(r = 1...R \) in Table 1. SSM is initialized with a clustering solution \(C^{*}\) (set of clusters) obtained by solving the CM model and then sequentially constructed optimal layouts of the clusters. This sequential optimization of the layout gradually appends the clusters to the incumbent set of clusters (\(C^{\prime}\)) which is initialized with the first cluster. Next, the SSM solves the reduced CFLPs using the reduced CFLP model with all \(c \in C^{*}\). SSM algorithm terminates if the iteration limit is reached, there is no change in the layout solution or the CPU time limit is reached. Upon termination, SSM algorithm outputs the layout solutions for all facilities and the total objective function across all clusters.

Table 1 SSM algorithm

3.3 Heuristics

We improved SA and GA algorithms by approximating the facility coordinates to the coordinates of the center of the smallest rectangle (CSR) that covers all facilities in the current solution. In the next two sections we present the standard SA and GA as well as their improved versions with pseudo codes.

3.3.1 Simulated annealing algorithms (SA, SA-CSR)

In our experimental study, we employ two different Simulated Annealing algorithms, e.g. the classical SA from the literature and an improved version as SA-CSR. Here we will explain the details and present pseudo codes of our improved version. Chwif et al. (1998), proposes a solution to the facility layout problem using simulated annealing, which includes two procedures working interchangeably. The first procedure makes a pairwise exchange between facilities and the second procedure makes random moves on the planar site at four main directions upwards, downwards, leftwards and rightwards or makes random changes of aspect ratios. We improved solution approach of the Chwif et al. (1998), and present our new approach in Table 2, referred to as Simulated Annealing based on the Center of Smallest Rectangle (SA-CSR). Here, \(x\) and \(y\) coordinates are generated such that they are within total of the width of facilities for x and height of facilities for y so that an initial solution could be efficiently generated. The main steps of the SA algorithm are described as follows: Step 1 initializes the parameters, i.e., facility number \(N\), initial temperature \(T_{int}\) final temperature \( T_{end}\), cooling rate \(CoR\), iteration number \(IN\), CPU running time \(T_{CPUTime}\) and maximum CPU running time \(T_{maxCPUTime}\). Step 2 checks the feasibility of a random initial solution; if the feasibility condition holds, we find center of facilities (\(x_{c} ,{ }y_{c}\)) in the random solution and move all facility coordinates q step to the center of facilities. The step size qi is defined as a percentage of the facility height plus facility width. Instead of percentage we can use a bigger step size etc. (hi + wi)/50 or (hi + wi)/10, that may decrease the iteration number but on the other hand it also may lead the infeasibility (e.g. overlapping of the facilities). Furthermore, if we use a smaller step size etc. (hi + wi)/1000, that may increase the iteration number and solution times. The search for the best value of the step size is a separate issue and can be investigated as a future extension of this paper. Step 3 re-checks the feasibility; and if the feasibility condition holds, we solve \(Z_{CFLP}\), otherwise we repeat Step 2. \(Z_{CFLP}\) objective function value and facility coordinates are assigned in Step 4 as \({\text{Z}}_{{{\text{best}}}} = {\text{ Z}}_{{{\text{CFLP}}}}\), \({\text{Z}}_{{{\text{Current}}}} = {\text{Z}}_{{{\text{CFLP}}}}\),\({ }\left( {{\text{x}}_{{\text{i}}} ,{\text{y}}_{{\text{i}}} } \right)^{{{\text{best}}}} = \left( {{\text{x}}_{{\text{i}}} ,{\text{y}}_{{\text{i}}} } \right)^{*}\),\( \left( {{\text{x}}_{{\text{i}}} ,{\text{y}}_{{\text{i}}} } \right)^{{{\text{current}}}} = \left( {{\text{x}}_{{\text{i}}} ,{\text{y}}_{{\text{i}}} } \right)^{*}\). Step 5 executes the main iterations SA. Method in Table 3 is used to create neighbors \(\left( {x_{i} ,y_{i} } \right)^{{{\text{neighbor}}}}\) and solved \(Z_{CFLP} { }\) for \(\left( {x_{i} ,y_{i} } \right)^{{{\text{neighbor}}}}\). Differences \(\left( {\nabla E} \right)\) between neighbor \({\text{Z}}_{{{\text{neighbor}}}} { }\) and current solution \({\text{Z}}_{{{\text{Current}}}} { }\) objective function values are calculated to compare both solutions. If \(\left( {\nabla {\text{E}}} \right) < 0\), neighbor solution is accepted as the current solution. If \(\left( {\nabla E} \right) \ge 0\), a random number \(\left( {RN} \right)\) is produced. If \(\left( {\nabla E} \right) \ge 0\) and \(RN < e^{{ - \frac{\nabla E}{T}}} \), neighbor solution \(\left( {x_{i} ,y_{i} } \right)^{{{\text{neighbor}}}}\) is accepted as the current solution \(\left( {x_{i} ,y_{i} } \right)^{current}\). Otherwise current solution is not changed. If current objective function \(Z_{{{\text{Current}}}}\) is better than local optimum objective function \(Z_{best}\), current solution is accepted as local optimum. Temperature (T) is decreased by multiplying Cooling Rate (\(CoR\)). If \(T =\) \(T_{end}\) or maximum CPU running time is reached, the algorithm terminates, and otherwise we repeat Step 5.

Table 2 SA-CSR pseudo codes
Table 3 SA-CSR neighborhood generation pseudo codes

SA-CSR improves the SA implementation in Chwif et al. (1998), by improving \(p\) step the initial solution, proposing a new neighboring strategy and improving the random moves on the planar site. Instead of random moves, it employs o step moves to the coordinates of the Center of the Smallest Rectangle (CSR) that covers all facilities layout in the current solution to create a neighbor solution. Neighbors are generated from solutions by approximating the facility coordinates o step to the coordinates of the center of the smallest rectangle that covers all facilities layout. Improved SA-CSR’s neighborhood generation pseudo code is presented in Table 3. Here, we take the central coordinate of factory layout as the mid-point of the layout (\(mid_{x} \), \(mid_{y}\)) as shown in Fig. 1 given the set of facilities.

Fig. 1
figure 1

Illustration of the central coordinate (mid-point) of factory layout given eight facilities

The steps of the neighborhood generation used in SA-CSR are provided in Table 3. In Step 1, we randomly generate coordinates of neighbor solution as \({\text{x}}_{{\text{i}}}\) and \({\text{ y}}_{{\text{i}}} { }\) within 0 and sum of wides \(\mathop \sum \nolimits_{{{\text{i}} = 1}}^{{\text{n}}} {\text{w}}_{{\text{i}}}\) and heights \(\mathop \sum \nolimits_{{{\text{i}} = 1}}^{{\text{n}}} {\text{h}}_{{\text{i}}}\) of all facilities (\({\text{i}} = 1{\text{ to N}}\)). Next in Step 2, we check feasibility and proceed to Step 3 where step size \({\text{o}}\) is calculated with respect to iteration number \({\text{IN}}\). Furthermore, we calculate the mid-point of the layout (\({\text{mid}}_{{\text{x}}} { }\), \({\text{mid}}_{{\text{y}}}\)) as shown in Fig. 1 given the set of facilities. Step 4 randomly establishes neighbor solutions’ coordinates and Step 5 checks for feasibility.

3.3.2 Genetic algorithms (GA, GA-CSR)

In our experimental study, we employ two different GA, e.g. the classical GA from the literature and an improved version as GA-CSR. Crossover operator in Mak et al. (1998), is based on randomly chosen cutting sections. We propose a new GA strategy in which we combine grids \(\left( {n {\text{x}} n} \right)\) layout in the study of Mak et al. (1998), with cross-over operator in the study of El Baz (2004). We combined and improved both Mak et al. (1998), and El Baz (2004) studies. All parents in population were improved by approximating the facility coordinates o step to the coordinates of Center of Smallest Rectangle (CSR) that covers all facilities in the current population. Here, we take the central coordinate of facility layout as the mid-point of the layout (\(mid_{x} \), \(mid_{y}\)) as shown in Fig. 1 given the set of facilities. We refer to this approach as Genetic Algorithm based on Center of Smallest Rectangle (GA-CSR) and present its pseudocode in Table 4. Natural selection is performed as explained in Lipowski and Lipowska’s (2012) study and probabilities of individuals are calculated accordingly. After generating the offspring, the population is updated by “One Point Crossover Operator individuals” as explained in Kellegöz et al. (2008), research. In conclusion, we present a new GA implementation approach by improving the initial solution and improving the random moves on the planar site.

Table 4 GA-CSR pseudo codes

The GA-CSR algorithm executes in five main steps. Step 1 initializes the algorithm parameters, i.e., facility number \(N\), population size \(PS\), mutation rate \(MR\), cross rate \(CrosR\), iteration number \(IN\), maximum iteration number \(I_{max}\), CPU running time \(T_{CPUTime}\) and maximum CPU running time \(T_{maxCPUTime}\). Random initial solutions (\(PS\)) are generated and checked for feasibility in Step 2. Provided feasible, center of facilities (\(x_{c} ,{ }y_{c}\)) coordinates are calculated and all facility coordinates in \(PS\) are moved \(q\) step towards the center of facilities. The step size qi is defined as a percentage of the facility height plus facility width. Instead of percentage we can use a bigger step size etc. (hi + wi)/50 or (hi + wi)/10, that may decrease the iteration number but on the other hand it also may lead the infeasibility (e.g. overlapping of the facilities). Furthermore if we use a smaller step size etc. (hi + wi)/1000, that may increase the iteration number and solution times. The search for the best value of the step size is a separate issue and can be investigated as a future extension of this paper. After checking for the feasibility of these moves, we solve \(Z_{CFLP}\) for all individuals in PS and set current solution and factory coordinates \(\left( {x_{i} ,y_{i} } \right)^{*}\) to following variables \({\text{Z}}_{{{\text{Current}},{\text{g}}}} = {\text{Z}}_{{{\text{CFLP}}}} { }\left( {{\text{x}}_{{\text{i}}} ,{\text{y}}_{{\text{i}}} } \right)^{{{\text{current}},{\text{g}}}} = \left( {{\text{x}}_{{\text{i}}} ,{\text{y}}_{{\text{i}}} } \right)^{*}\), otherwise we repeat Step 2. Minimum objective function value and facility coordinates in PS are assigned in Step 3 as \({\text{Z}}_{{{\text{dummy}}}} = {\text{minimum of Z}}_{{{\text{Current}},{\text{g}}}}\), \(\left( {{\text{x}}_{{\text{i}}} ,{\text{y}}_{{\text{i}}} } \right)^{{{\text{dummy}}}} = {\text{minimum of }}\left( {{\text{x}}_{{\text{i}}} ,{\text{y}}_{{\text{i}}} } \right)^{{{\text{current}},{\text{g}}}}\), \({\text{Z}}_{{{\text{best}}}}\) = \({\text{Z}}_{{{\text{dummy}}}}\), \(\left( {{\text{x}}_{{\text{i}}} ,{\text{y}}_{{\text{i}}} } \right)^{{{\text{best}}}} = \left( {{\text{x}}_{{\text{i}}} ,{\text{y}}_{{\text{i}}} } \right)^{{{\text{dummy}}}}\). Step 4 executes the main GA iterations. Parent with the best objective function value in the population is overwritten to a randomly selected parent (Natural Selection). Two parents are randomly selected, and then a random number \(Rand \left( {0, 1} \right)\) is produced in between 0–1. If \(Rand \left( {0, 1} \right)\) < Cross Rate (CrosR), two parents’ chromosomes are crossed (Crossing). A parent is randomly selected in \(PS\), and then a random number is produced \(Rand \left( {0, 1} \right)\). If \(Rand \left( {0, 1} \right)\) < \(MR\), parents’ chromosomes are mutated. Here, step size \(o\) is calculated with respect to iteration number \(IN\). Furthermore, we calculate the mid-point of the layout facilities (\(mid_{x}\), \(mid_{y}\)) in \(PS\) as shown in Fig. 1. Facility coordinates are approached on randomly selected direction (V/H) \(o\) step to the coordinates of the center of the smallest rectangle (\(mid_{x} \), \(mid_{y} \)) that covers all facilities layout. We again make a feasibility control of CFLP constraints. If the feasibility condition holds we replace current facility coordinates with approached coordinates \(\left( {x_{i} ,y_{i} } \right)^{{{\text{current}},{\text{g}}}} = \left( {x_{i} ,y_{i} } \right)^{*}\) otherwise we keep the current facility coordinates \(\left( {x_{i} ,y_{i} } \right)^{{{\text{current}},{\text{g}}}} = \left( {x_{i} ,y_{i} } \right)^{{{\text{current}}}}\). We solve \(Z_{CFLP}\) for all individuals in \(PS\). We assign minimum objective function value and coordinates in \(PS\) to following parameters \({\text{Z}}_{{{\text{dummy}}}} = {\text{minimum of Z}}_{{{\text{Current}},{\text{g}}}}\) \(\left( {{\text{x}}_{{\text{i}}} ,{\text{y}}_{{\text{i}}} } \right)^{{{\text{dummy}}}} = {\text{minimum of }}\left( {{\text{x}}_{{\text{i}}} ,{\text{y}}_{{\text{i}}} } \right)^{{{\text{current}},{\text{g}}}}\). If the best solution is smaller than dummy solution, we set dummy solution as the best solution. \(Z_{best}\) = \(Z_{{{\text{dummy}}}}\), \(\left( {x_{i} ,y_{i} } \right)^{best} = \left( {x_{i} ,y_{i} } \right)^{{{\text{dummy}}}}\). If \(IN\) = \(I_{max}\) or \(T_{CPUTime} = T_{maxCPUTime}\), iteration stop and repeat Step 4 otherwise.

We summarized the parameters and decision variables in Table 5 for all the models and algorithms.

Table 5 Parameters and decision variables

In order to avoid local optimums in heuristics following issues should be considered. First population-based algorithms find neighbor solution depending on the current solution. In SA differences \(\left( {\nabla E} \right)\) between neighbor \({\text{Z}}_{{{\text{neighbor}}}} { }\) and current solution \({\text{Z}}_{{{\text{Current}}}} { }\) objective function values are calculated to compare both solutions. If \(\left( {\nabla {\text{E}}} \right) < 0\), neighbor solution is accepted as the current solution. If \(\left( {\nabla E} \right) \ge 0\), a random number \(\left( {RN} \right)\) is produced. If \(\left( {\nabla E} \right) \ge 0\) and \(RN < e^{{ - \frac{\nabla E}{T}}} \), neighbor solution \(\left( {x_{i} ,y_{i} } \right)^{{{\text{neighbor}}}}\) is accepted as the current solution \(\left( {x_{i} ,y_{i} } \right)^{current}\). Thus SA algorithm cannot get stuck at local optimums. However, GA might get stuck at a local optimum and we can tune the GA parameters e.g. population size, crossing rate and mutation rate to address this problem. In this study, in order to guarantee fair comparisons of all algorithms (SSM, GA, SA), the parameters of SA and GA were determined such that algorithms would run at least SSM CPU time. In particular, for the SA algorithms, the “cooling rate”, “initial temperature” and final temperature” parameters were determined specific to each problem instance so that SA algorithm would run at least SSM CPU time. Similarly, the GA parameters (i.e., population size, crossing rate and mutation rate) were determined specific to each problem instance so that GA algorithm would run at least SSM CPU time. Finding the best values of these parameters to avoid local optimums is a separate issue and can be investigated as a future extension of this paper.

4 Results and discussion

The efficiency of algorithms is tested on test problems with varying sizes (e.g. PA1, OZ3, T5, T6, T7, T8, T9 and T10 and YA2) and compared in terms of solution times and objective function values. We used the same development and execution environment to code and run all the algorithms, Intel Core(TM) i5-3210 2.4 GHz CPU, 8 GB RAM. We used IBM ILOG CPLEX Optimization Studio to solve the CM problems and iterations of SSMs. Genetic and simulated-annealing based methods are programmed in Matlab. The facility sizes of these problem instances are given in Tables 6, 7 and 8, while the material handling cost matrices are presented in Tables 9, 10 and 11, respectively.

Table 6 Facility dimensions for PA1 problem
Table 7 Facility dimensions for OZ3 problem
Table 8 Facility dimensions for YA2 problem
Table 9 Material handling costs for PA1 problem
Table 10 Material handling costs for OZ3 problem
Table 11 Material handling costs for YA2 problem

Problem instances denoted T5, T6, T7, T8, T9 and T10 are instances generated from YA2 by taking the first m (5 to 10) facilities and the associated data from Table 8 and Table 11. For all problem instances, we varied the number of clusters \(\left| C \right| \in \left\{ {2,3,4} \right\}\) the maximum number of facilities \(3 \le K \le 8\), and the number of mutual facilities \(1 \le v \le 3\). Selected sets of clusters with the highest objective function values are presented in Table 12.

Table 12 Cluster sets identified through CM for each problem instance

Next, we solved the SSM for each clustering solution in Table 12. The SSM is a recursive heuristic based on the exact solutions of reduced CFLPs, thus R must be chosen at least as the number of clusters (C) for a feasible layout solution. On the other hand, SSM should be executed at least “C + 1” iterations to check whether this feasible solution is the best solution (if there is no change in the layout solution) or not. Maximum number of cluster for a problem set is C = 4 in Table 12, so R should be taken at least 5 which is C + 1 = 4 + 1. We set the maximum number of iterations at 10, i.e., R = 10, which is 2 multiplied by 5 as an upper bound to make sure that the SSM algorithm runs smoothly and sufficiently enough. Note that in solving the reduced CFLP of each cluster we consider the interaction between not only the facilities within the cluster but also with those external to the cluster. SSM algorithm terminates if the iteration limit R is reached or there is no change in the layout solution. Results and objective function values at SSM iterations are presented in Table 13. It is observed that at most in 5 steps, the SSM algorithm is terminated (see Table 13).

Table 13 SSM iteration objective function values (Z)

Order of the clusters in the initialization step of SSM was chosen according to the CM objective function value of clusters from highest to smallest. The clusters in Table 12 are ranked with respect to CM objective function values from highest to smallest. The cluster with the highest CM objective function value is the first cluster executed in SSM, because it includes the most associated facilities in terms of material handling costs and the rest of clusters are appended the SSM algorithm accordingly. This is because we assign the most associated facilities to the same clusters in CM (maximization) and if the most associated facilities are in the same cluster, they should be deployed first to minimize the overall objective function of CFLP by SSM. We illustrate the SSM iterations and solutions obtained for T91 and OZ31 in Figs. 2 and 3.

Fig. 2
figure 2

Sequential solution of T91 problem, variables added to problem in each iteration and objective function values (Z)

Fig. 3
figure 3

Sequential solution of OZ31 problem, variables added to problem in each iteration and objective function values (Z)

4.1 Comparison of SSM with exact solution methods (MIP 1, MIP 2, MIP 3, and BB)

The comparison of SSM results with the existing approaches MIP1 (Papageorgiou & Rotstein, 1998), MIP2 (Ozyurt & Realff, 1999), MIP3 (Yang & Peters, 1998) and BB (Xie & Sahinidis, 2008) are presented in Table 14. Reported solution times are the total time required for generating clusters using CM and solving sub-problem sets using SSM. In all experiments, the SSM method’s convergence is established if the number of iterations reaches the maximum number of iterations (R = 10), there is no change in the layout solution objective function value between consecutive steps or the CPU time limit (6000 s) is reached. The proposed approach performs better, in terms of both objective value and time, than MIP1, MIP2, and MIP3 in all problem instances but T5 and the difference is negligible given the problem complexity. In comparison, the BB method performs better compared to other methods from the existing literature but the proposed approach outperforms BB in medium and large problem instances. As expected for the solution of CFLP with many variables, SSM solution times are much better than all of the other methods (MIP1, MIP2, MIP3 and BB). In particular, for T10 and YA2 problems, while the proposed approach can find the optimal solution under three minutes, the BB method takes in excess of 100 min.

Table 14 Comparison of the results of SSM with MIP 1, MIP 2, MIP 3, and BB

4.2 Comparison of SSM with metaheuristic algorithms (SA, SA-CSR, GA, and GA-CSR)

Initial solutions are generated in a three-step iteration for metaheuristics. In Step 1, new facility coordinates (\(x_{new} ,{ }y_{new}\)) are generated such that they are within total of the width of facilities for x and height of facilities for y. We check the feasibility condition in Step 2, whether the boundaries of the new facility overlap with all the facility boundaries in the solution set. If the new facility does not overlap with the other facilities in the solution set, it was included to solution set otherwise we repeat step 1. In Step 3, If iteration number equal to number of facilities, iteration stops, otherwise we repeat Step 1. We compared the initial solution times with total solution times of metaheuristic. Considering simulated annealing, the initial solution time is minimum %3,5 (T6), maximum %11,3 (T10) and average %6,4 of SA total solution time. Considering genetic algorithms, the initial solution time is minimum % 7,7 (T10), maximum %17,9 (YA2) and average %13,5 of GA total solution time. If the number of facilities is high it might be more difficult to generate a feasible initial solution, however this is not the case for our problem sets.

The test problems were solved with the four heuristics SA, SA-CSR, GA, and GA-CSR and compared with the SSM results in Table 15. In order to guarantee fair comparisons of all algorithms, the parameters of SA and GA were determined such that algorithms would run at least SSM CPU time. In particular, for the SA algorithms, the “cooling rate”, “initial temperature” and final temperature” parameters were determined specific to each problem instance so that SA algorithm would run at least SSM CPU time. Similarly, the GA parameters (i.e., population size, crossing rate and mutation rate) were determined specific to each problem instance so that GA algorithm would run at least SSM CPU time.

Table 15 Comparison of the results of SSM with SA, SA-CSR, GA, and GA-CSR

Comparing the results of CSR based improvements; SA-CSR and GA-CSR perform better than SA and GA methods in terms of objective function values and solution times. However, SSM approach is the best among these five heuristics in terms of solution times and objective function values. The objective function values of SA and GA worsen as the number of facilities increase from 5 to 12 (e.g. T5, T6, T7, T8, T9, T10, PA1, OZ3 and YA2). Although CSR based enhancement improved the performance of SA and GA, SSM yields overall better results than any of the metaheuristic algorithms.

5 Conclusions

In this study, we proposed a sequential heuristic approach (SSM) for continuous facility layout design problems and compared its performance with exact methods as well as several metaheuristic approaches. The developed approach leverages the idea of divide-and-conquer where the set of facilities are partitioned into subsets based on their material flow associations through a clustering model. Next, the SSM approach sequentially optimizes the layouts of facility clusters (one cluster at a time) while fixing the locations of other facilities not a member of the cluster. The SSM approach trades off the optimality with the computational complexity through the clustering model parameters of number of clusters, maximum number of facilities in any cluster and commonality of facilities across clusters. The SSM approach converges to a solution whenever a threshold iteration limit is reached, or the layout solutions do not change. While not utilized in the experimental study, the method’s clustering step can be flexibly incorporated into the SSM’s iterations by allowing the procedure to update the cluster assignments between iterations. Further, the clustering step could be utilized to capture the decision maker’s stated or unstated preferences regarding facilities in terms of prioritization of relationships between facilities (i.e., those facilities with higher priority of relationship clustered together).

In comparison with the exact approaches, SSM method performed significantly better in terms computational time performance as well as similar or better objective performance. For the metaheuristics, we improved the application of standard SA and GA approaches by approximating the facility coordinates to the coordinates of the center of the smallest rectangle (CSR) that covers all facilities in the current solution. While this enhancement improved the performance of SA and GA, the SSM outperformed the standard and enhanced metaheuristics in both objective and computational time performances.

Given the promising performance of SSM, it can be effectively employed to solve real life facility layout problems in order to optimize layouts and decrease material handling costs. Future extensions of this approach can consider updating the clustering decisions during the sequential cluster layout optimizations. Given that SSM can converge to a local optimal solution, one strategy to employ in changing the clustering decisions could be to revise the cluster assignments once a local optimal solution is reached. This could potentially allow the SSM escape local optimality for large problem instances.