A MATHEMATICAL OPTIMIZATION APPROACH BASED ON LINEARIZED MIP MODELS FOR SOLVING FACILITY LAYOUT PROBLEMS

. One of the strategies used to optimize production processes is to deﬁne the best layout. For this, the relative positioning of the various equipment, areas, or functional activities inside the company is studied. Proper arrangement of facilities will result in shorter process times and higher productivity. In general, the objective function of the facility layout problem (FLP) is to reduce the total material handling cost. Although over six decades have been passed since the ﬁrst work on FLP modeling was published, research on many aspects of this problem is still in an early stage and needs to be further explored, which motivated this study. In this paper, the unequal area of rectangular blocks with ﬁxed dimensions and input/output points are considered for FLPs. Four new mixed-integer programming (MIP) models based on previous research formulations are developed. Then, a mathematical optimization approach based on the linearization of the models is applied. An algorithm that solves the linearized MIP model by CPLEX setting a time limit for the solution obtained excellent results for different test problems when compared to those reported in the literature.


INTRODUCTION
In an increasingly competitive global market, guaranteeing the optimization of results inside a company is essential. Maximizing productivity is one of the main objectives of the industrial production sector. To reach this potential, the most adequate physical arrangement for each situation should be analyzed to speed up the production processes. In the industrial context, the execution of a product goes through several stages that can be characterized by facilities, such as 3 and a comparison with those found in the literature. Finally, Section 6 brings the conclusions and some directions for future research.

General Facility Layout Problem
When the flow of materials between installations is a parameter that does not change with time, the problem is known as a static facility layout problem and, in a simple form, can be formulated as a Quadratic Assignment Problem (QAP) (Emami & Nookabadi, 2013). The classical optimization model, introduced by Koopmans & Beckmann (1957), is defined as follows. The notation used in the formulation are shown in Table 1.
subject to In the QAP formulation for layouts, every facility has the same area, and the floor space is divided into N locations with the same size, where each installation is assigned to exactly one location and vice versa (Konak et al., 2006). The objective is to minimize the summation of Material Handling Costs (MHCs) between each pair of installations, the MHC being a product of the flow of materials between two facilities by the distance between them. The constraints ensure that each facility will occupy a single location (2) and that each location will be occupied by a single facility (3).
In this basic model, the distances are measured between the centroids of the blocks and can be Euclidean (diagonal) or rectilinear (sum of horizontal and vertical), according to Figure 1. The rectilinear distances are also called rectangular or Manhattan distances (Zheng, 2014). Although the diagonal represents the actual distance between the centroids, the rectilinear distance is more used because it better represents a real situation of displacement that would occur through the aisles between facilities.

Unequal Area Facility Layout Problem
In a real situation, it is unlikely that the several facilities of a company will have all the same area. One particularly interesting FLP, due to its direct application in real cases, is known as the Unequal Area Facility Layout Problem (UAFLP) (García-Hernández et al., 2019).
When departments have different areas, the problem can no longer be solved by assigning departments to n distinct centroids localizations and distances become variables. The additional complications of the requisites of unequal areas, with continuous department positions that can be anywhere in a rectangular area and varying areas (width and height), make the FLP extremely difficult to solve (Castillo & Westerlund, 2005).
The UAFLP is studied in many aspects. To begin with, the form of the facilities can be described as regular (e.g., rectangular blocks) or irregular (usually polygons). The dimensions of a facility can be represented by fixed measurements of height and width (rigid block) or by a fixed area (with an aspect ratio). According to Hosseini-Nasab et al. (2018) In the last decade, several authors have proposed resolution methods to address UAFLPs: Kulturel-Konak (2012) used linear programming and tabu search (TS) for the FBS situation providing significant reduction in MHC although the relaxed-FBS representation was more restrictive compared to the general representation used in many exact formulations; Chang & Ku (2013) represented a ST and developed a heuristic solution that found optimal or near-optimal solutions for most problems as long as they had fewer than 20 departments; Gonçalves & Resende (2015) solved the problem by using a biased random-key genetic algorithm (BRKGA) generating high-quality solutions in relatively small computing times with the unconstrained version of the approach, but not so good with the constrained one; Palomo-Romero et al. (2017)

Facility Layout Problem with Input/Output Points
The constraints considered for FLPs are of the most diverse, but among these, those that define input and output points of the blocks are of great importance. When it comes to facilities, the flow of materials, products, and/or people is expected to arrive by a certain location and leave by a certain location (which may or may not be the same location). In the traditional FLPs models, the input and output locations of the facilities are not considered, but are determined after the obtention of a block layout (Kim & Kim, 2000).
In literature, these facilities are called by different names such as input/output points (I/O); pickup/drop-off or delivery stations (P/D); and load/unload locations. In articles written in recent years, priority has been given to using the term I/O points, thus, they will be referred by this.
The I/O points can be fixed (predetermined) or variable with constraints, depending on the type of facility being addressed in the problem. When the facilities, for example, are machines or equipment that have defined input and output locations, i.e., that cannot be altered, it is interesting to consider fixed points. On the other hand, in a situation with departments, whose room doors could be positioned with more flexibility in the project, it is possible to consider variable points in the model (in this case, with the constraint of being located on the edges of the blocks).
O'brien & Abdel Barr (1980) were the first to consider I/O points in the input data required by their procedure. Since then, many authors have proposed method of resolution for the I/O points situation in the FLP: Das (1993) suggested a four-step heuristic that combines variable partitioning and integer programming methods for flexible manufacturing system ( (2019) suggested a two-phase constructive heuristic that produced good results within a much shorter time than previous research.

MATHEMATICAL MODELS
When some or all variables of an optimization problem belong to the set of integers, it is represented using an Integer Programming model. When all the variables are integers, the model is denominated Pure Integer Programming; otherwise, it is denominated Mixed-Integer Programming (Hillier & Lieberman, 2013). Though producing solutions for integer programs may seem easy, the solution is an NP-hard problem.
One of the first Mixed-Integer Programming formulations to solve problems of the continuous layout was introduced by Montreuil (1991). Afterward, several authors formulated Facility Layout Problems in continuous surfaces as Mixed-Integer Programming models.
For this work, four Mixed-Integer Programming models were formulated for the Unequal Area Facility Layout Problems with Input and Output locations with the following characteristics: • Rectilinear Distance Metric (as seen in Figure 1); • Regular facility shape (rectangular), with fixed dimensions of height and width and subject to an open-field system; and • Fixed and variable input and output locations.

7
The models proposed by Hu et al. (2007) and Leno et al. (2018) were used as a basis for the MIP models developed for this research.
Although the four models developed in this work are similar, each represents a particular situation. The difference between them is in the location of the input and output points, as explained below: 1   As the models have an identical objective function and several constraints, they were divided into two parts, one common and one unique and presented in five topics. The first topic provides exactly the objective function and the equations that repeat for all the models and can be considered the first part of any of the four models individually. The other subsequent topics provide the second part of each model separately because, at this point, the equations are different and characterize specific conditions of the location of the input and output stations. The notations, valid for all models, are shown in the Table 2.

Indices, input data and markers
subject to Second part of Model 1 (UAFLPfixed) The objective function of the models (expression 5) seeks to minimize the TMHC which is equal to the sum of the material flows by the distances between the output of one facility and the input of another. The constraints (6) and (7) define the configuration of the facilities. If u i = 0, then the facility continues in its original configuration; if u i = 1, then the block is rotated 90 • , so the real width (i.e., the width of the block in the layout defined by the model) becomes the original height and the real height becomes the original width. Figure 3 illustrates both situations. The equalities (8) and (9) delimit the blocks using the coordinates x i , y i of the lower left corner and xs i , ys i of the upper right corner. The inequalities (10), (11), and (12) guarantee that there will be no overlapping of parts because a block will always be, at least, or totally to the left, or totally to the right, or totally above, or totally below some other block. Furthermore, (11) and (12)  The measure adopted for the proposed models was the Rectilinear Distance Metric (RDM). Although, in the case of considering Euclidean distance, the constraint (13) could be exchanged by the following one: Another option would be to consider Perimeter Distance Metric (PDM), or Contour Distance (a concept very well presented by Leno et al. (2018) and reproduced in the sequence), which seeks to better represent a real situation in which it is not possible to transport materials through departments, but only through aisles or empty areas. To calculate this distance, a graph that represents the viable flow paths must be constructed. To do this, first, a grid is constructed in which the horizontal and vertical lines cross all the points of the corners as well as input and output points of the blocks. The intersection of each horizontal and vertical line defines the grid points. The points that appear inside the departments are removed from the original grid point set and the rest forms the V set of vertices or nodes for the graph. The grid lines that touched removed points are also extinguished; the others form the E set of edges for the graph (connecting all adjacent points). To each edge, a weight corresponding to the length of the edge in question (which is the actual distance) is assigned. Given that graph G = (V, E), the shortest distance d i j from the output station of the i facility to the input station of the j facility (and between all pairs of departments) is calculated using the Dijkstra algorithm created to solve shortest-paths problems. The algorithm developed by Dijkstra (1959) is widely known in the field of computer science and is well explained in Cormen et al. (2009), which served as the basis for the programming in this part of our work. Figure 4 provides the representation of a grid (graph generator) for a layout with three departments and shows the shortest path between two points.

PROPOSED APPROACH
In order to solve the Unequal Area Facility Layout Problem with Input/Output Points, we use a mathematical optimization approach based on the linearization of the models.
Linearization is a technique used to obtain a linear model, from the equivalent nonlinear model, to provide equal or approximate solutions to those of the original problem. There are programs specifically developed to solve linear (at most quadratic) problems using exact method algorithms such as simplex, interior-point barrier and branch-and-bound. As, depending on the case, they may stand out from programs for nonlinear problems, one of the intentions of linearization is precisely to adapt the modeling to the application of these solvers in the search for better and/or faster results. Considering this, the Mixed-Integer Programming models previously presented were linearized and thus transformed into Mixed-Integer Linear Optimization (MILO) models. For instance, consider the inequality (11) from the nonlinear model where xs i ≤ l i j x j +W (1 − l i j ) ∀i, j; i < j. In order to linearize the quadratic term preserving the rules of the original model, the inequality can be replaced by these constraints: Constraints (36), (37) and (38) ensure that when l i j = 0 or x j = 0, then lx i j = 0, and when l i j = 1 and x j > 0, then lx i j = x j . Therefore, lx i j in (35) is guaranteed to be equal the product l i j x j .
For the constraint (13), a common technique to linearize modules was used. Thus, the modules of the differences between x O i and x I j and between y O i and y I j were converted to equivalent constraints by creating the variables dx i j and dy i j , whose sum results in d i j .
The linearized models are presented next in four topics, in a format close to that adopted previously for the MIP models, with the difference that the second part of Models 2 and 4 was condensed as being very similar. The notations are the same as those in Table 2, along with the additional notations created in Table 3.
subject to Second part of Model 1 linearized (UAFLPfixed) Second part of Models 2 and 4 linearized (UAFLP1 and 3) Second part of Model 3 linearized (UAFLP2) After linearization, the mathematical models were transposed to a proper programming language and solved using specialized software. The entire phase of implementation and instance testing was performed in the mathematical programming language AMPL using a Notebook with an Intel Core i7 Processor, 8GB RAM and Windows 10 operating system. For resolution, two mathematical software were used: the Baron solver (version 19.7.13), specialized in solving nonlinear optimization problems and the CPLEX solver (version 12.10.0.0), high performance for linear programming, effective for the case of linearized models developed for this work.
The Baron solver was found to be insufficient to provide optimal solutions in a timely manner for the tested instances. Even for minor problems (of N = 6) and leaving the program running for some days, the solver failed to achieve a proven optimal result (in one case it achieved a result already known in the literature as optimal but could not prove that it was optimal and thus continued trying to improve the solution indefinitely). For major problems, the results proved to be bad even after the program ran for many hours.
Because of that, instance tests from the implementation of linearized models were prioritized, with the help of the CPLEX solver.

COMPUTATIONAL RESULTS AND DISCUSSIONS
Developing, or even improving, mathematical models that portray real-world problem situations as faithfully as possible is extremely important, but so is finding solutions for these models. In this work, as previously explained, a mathematical optimization approach was used to solve optimization problems. The results were obtained for several instances found in the literature. The instances were selected to cover both simpler problems and larger ones that are, consequently, more difficult to solve computationally. Table 4 shows the ten tested instances, with their respective referenced articles, the position of the I/O points according to the input data, number of facilities (directly related to the size of the problem), and the code used to refer to each instance in this paper. As shown in the table, some problems previously define the position of the I/O points in the blocks and others do not present this information. In the latter case, the I/O points can be considered variables, and their location is defined in the solution of the problem.
As previously mentioned, an algorithm was implemented to solve layout problems, which consists in solving the linearized MIP models by CPLEX solver with a time limit of two hours. A time limit was established for standardization purposes and this was defined after some performance tests. In the case of CPLEX, for the largest instance, the program had a memory overflow error when running for a long time, so t = 2h was set.
The analysis of the results was divided into two subsections, the first referring to the initial fixed I/O points situation contemplated by Model 1 and the second referring to the situation of variable I/O points treated in Models 2, 3, and 4. Although some of the results compared in this paper date from a long time, they are still the best found in the literature for each situation.

Fixed I/O points
From the ten instances presented in Table 4, notice that two do not have initial input and output coordinate data; therefore, in this subsection, the results for eight instances found by Das (1993), Dunker et al. (2003, Rajasekharan et al. (1998), andWelgama &Gibson (1993) were evaluated. The objective function values of the authors were compared with those found by the approach proposed in this work. For that, the distance metric adopted was the same: rectilinear distance.
The data compilation is shown in Table 5.
The results found with the linearization of the models and use of CPLEX were the best for almost all instances, the exception being the largest one with 62 facilities. For the minor instances (with N ≤ 8), our approach was able to return the optimal result of the problem before the time limit. Figure 5 presents representation of the optimal results achieved as well as the time spent solving the problems.

Variable I/O points
For the variable I/O points case, even instances initially proposed with fixed I/O points can be tested, because these coordinates can be disregarded in the problem input data.
The literature results of two articles referring to five instances were evaluated for comparison purposes, which vary as to the constraints applied to the implementation locations of the input and output points of the departments that define the UAFLP1, UAFLP2, and UAFLP3 models (as shown in 2).
The analysis of the results can be seen in the tables below. Table 6 refers to the values found by Deb & Bhattacharyya (2005), who used the GA-SA method of random search associated with a hybrid algorithm that integrates genetic algorithm and simulated annealing. Leno et al. (2018) developed the ESHGA method, a hybrid genetic algorithm based on an elitist strategy that uses simulated annealing as local search, and their results are in Table 7.  As can be seen in the tables, the results achieved with our approach were all better than those found in literature, highlighting their importance.
For the smaller instances (with N = 6), our approach was able to return the optimal result of the problem before the time limit. Figure 6 contains the representation of the optimal results achieved, as well as the time spent on solving the problems.
For visual comparison, in Figures 7 and 8, the final layouts generated by Leno et al. (2018) with the ESHGA method and by the methodology presented in this work are represented, for the instances Deb05N12 and Dun03N62, UAFLP2 Model.

CONCLUSIONS
The unequal area facility layout problem with input and output locations has already been solved in the literature with the use of the most varied methods. In most of the articles consulted during the literature review, the authors use heuristics and metaheuristics to solve the UAFLP problem with fixed or variable input and output locations. Heuristic methods are applied in optimization problems to find good results in a reasonable time, which cannot always be achieved by mathematical optimization approaches. However, with the advancement of solvers over time, the results became more competitive and, in the case of this work, were promising. Even so, for larger instances the challenge remains, as seen in the case of N = 62 which had a worse result with CPLEX compared to a metaheuristic developed much earlier by Dunker et al. (2003). Therefore, this paper has proved to be an excellent contribution to the subject of layouts, both in terms of modeling in non-linear and linear formats and using mathematical software to solve the problem. More specifically, the use of CPLEX applied to linear models showed remarkable results.
An interesting future line of work could be to analyze, using mathematical optimization techniques, other particular cases of the extensive field of layout optimization, as facilities in the form of rectangular blocks of fixed areas but variable dimensions respecting an aspect ratio. Furthermore, this research could be expanded taking into consideration the possibility of some additional remarks, e.g., the inclusion of pre-fixed facilities, that already start with the problem in places that cannot be modified during the generation of the solution. Future work could also focus on flexible bay structures or slicing tree representations. Finally, another possible research direction could be to treat the Dynamic Facility Layout Problem (DFLP) considering unequal areas and I/O points.