Almost all quality improvement comes via simplification of design, manufacturing… layout, processes, and procedures. Tom Peters
Most facility layouts can be viewed at two levels:
Goal: Develop and evaluate alternative block layouts quantitatively.
Which comes first:
Assumptions:

The layout model is a 2D “packing” algorithm to determine the locations of rectangular objects with known shapes. Such a packing problem is also known as the “two-dimensional bin packing” problem.
| Symbol | Description |
|---|---|
| \(m\) | number of departments |
| \(f_{ij}\) | flow from dept. \(i\) to dept. \(j\) (n. of unit loads moved per unit time) |
| \(c_{ij}\) | cost of moving a unit load one distance unit from dept. \(i\) to dept. \(j\) |
| \(B_x\) | building length (measured along the x-coordinate) |
| \(B_y\) | building width (measured along the y-coordinate) |
| \(A_i\) | area of dept. \(i\) |
| \(L_i^{\mathrm{LB}}\) | lower limit on the length of dept. \(i\) |
| \(L_i^{\mathrm{UB}}\) | upper limit on the length of dept. \(i\) |
| \(W_i^l\) | lower limit on the width of dept. \(i\) |
| \(W_i^{\mathrm{UB}}\) | upper limit on the width of dept. \(i\) |
| \(M\) | large number (if needed) |
| Symbol | Description |
|---|---|
| \(\alpha_i\) | x-coordinate of the centroid of dept. \(i\) |
| \(\beta_i\) | y-coordinate of the centroid of dept. \(i\) |
| \(x_i^{\mathrm{left}}\) | x-coordinate of the left (or west) side of dept. \(i\) |
| \(x_i^{\mathrm{right}}\) | x-coordinate of the right (or east) side of dept. \(i\) |
| \(y_i^{\mathrm{bottom}}\) | y-coordinate of the bottom (or south side) of dept. \(i\) |
| \(y_i^{\mathrm{top}}\) | y-coordinate of the top (or north side) of dept. \(i\) |
| \(z^{\mathrm{x}}_{ij}\) | 1 if dept. \(i\) is strictly to the east of dept. \(j\); 0 otherwise |
| \(z^{\mathrm{y}}_{ij}\) | 1 if dept. \(i\) is strictly to the north of dept. \(j\); 0 otherwise |
Note that:
Minimize the cost per unit time for movement among the departments: the sum of rectilinear distances between departments \(d_{ij} = |\alpha_i - \alpha_j| + |\beta_i - \beta_j|\).
\[ \min \sum_{i}{\sum_{j}{f_{ij}c_{ij}(|\alpha_i - \alpha_j| + |\beta_i - \beta_j|)}} \]
Note that:
The length and width of each department are within the specified bounds:
\[ \begin{align} L_i^{\mathrm{LB}} \leq (x_i^{\mathrm{right}} - x_i^{\mathrm{left}}) \leq L_{i}^{\mathrm{UB}} & \quad \text{for all} \; i \\ W_i^l \leq (y_i^{\mathrm{top}} - y_i^{\mathrm{bottom}}) \leq W_{i}^{\mathrm{UB}} & \quad \text{for all} \; i \\ \end{align} \]
The area requirement of each department:
\[ \begin{align} (x_i^{\mathrm{right}} - x_i^{\mathrm{left}})(y_i^{\mathrm{top}} - y_i^{\mathrm{bottom}}) = A_i & \quad \text{for all} \; i \end{align} \]
Strictly, the area constraint is a nonlinear (bilinear) constraint. Solvers such as Gurobi can handle such constraints directly (as a MIQCP problem), but they may be difficult to solve. We will show later how to linearize this constraint.
Department sides are defined properly and located within the building in the x and y directions:
\[ \begin{align} 0 \leq x_i^{\mathrm{left}} \leq x_i^{\mathrm{right}} \leq B_x & \quad \text{for all} \; i \\ 0 \leq y_i^{\mathrm{bottom}} \leq y_i^{\mathrm{top}} \leq B_y & \quad \text{for all} \; i \\ \end{align} \]
Define the centroid of each department based on x and y coordinates.
\[ \begin{align} \alpha_i = 0.5x_i^{\mathrm{left}} + 0.5x_i^{\mathrm{right}} & \quad \text{for all} \; i \\ \beta_i = 0.5y_i^{\mathrm{bottom}} + 0.5y_i^{\mathrm{top}} & \quad \text{for all} \; i \\ \end{align} \]
The department \(i\) is strictly to the east of department \(j\) if \(z_{ij}^{\mathrm{x}}=1\):
\[ \begin{align} x_j^{\mathrm{right}} \leq x_i^{\mathrm{left}} + M(1- z_{ij}^{\mathrm{x}}) & \quad \text{for all} \; i \; \text{and} \; j,\; i \neq j \end{align} \]
The department \(i\) is strictly to the north of department \(j\) if \(z_{ij}^{\mathrm{y}}=1\):
\[ \begin{align} y_j^{\mathrm{top}} \leq y_i^{\mathrm{bottom}} + M(1- z_{ij}^{\mathrm{y}}) & \quad \text{for all} \; i \; \text{and} \; j,\; i \neq j \end{align} \]
Departments are separated at least in the east–west or north–south direction:
\[ \begin{align} z_{ij}^{\mathrm{x}} + z_{ji}^{\mathrm{x}} + z_{ij}^{\mathrm{y}} + z_{ji}^{\mathrm{y}} \geq 1 & \quad \text{for all} \; i \; \text{and} \; j,\; i \leq j \end{align} \]
Indicator Constraints
The non-overlapping constraints model conditional statements (i.e., “if-then” statements): if \(z_{ij}^{\mathrm{x}}=1\), then \(x_j^{\mathrm{right}} \leq x_i^{\mathrm{left}}\). Similarly, if \(z_{ij}^{\mathrm{y}}=1\), then \(y_j^{\mathrm{top}} \leq y_i^{\mathrm{bottom}}\). These constraints ensure that departments do not overlap by enforcing separation along either the x- or y-coordinates.
If supported by the solver, you can use indicator constraints to model the relationships more compactly instead of using the big-M method. For example, the east–west separation constraint can be written as:
\[ \begin{align} z_{ij}^{\mathrm{x}}=1 \implies x_j^{\mathrm{right}} \leq x_i^{\mathrm{left}} & \quad \text{for all} \; i \; \text{and} \; j,\; i \neq j \end{align} \]
And similarly for the north–south direction. Using indicator constraints avoids the need for a large \(M\) and can improve numerical stability.
\[ \begin{align} \alpha_i, \beta_i \geq 0 & \quad \text{for all} \; i \\ x_i^{\mathrm{left}}, x_i^{\mathrm{right}}, y_i^{\mathrm{bottom}}, y_i^{\mathrm{top}} \geq 0 & \quad \text{for all} \; i \\ z_{ij}^{\mathrm{x}}, z_{ij}^{\mathrm{y}} \in \{0,1\} & \quad \text{for all} \; i \; \text{and} \; j,\; i \neq j \end{align} \]
If \(f_{ij} \geq 0 \; \forall i,j\), the absolute value can be removed by introducing a positive part and negative part for each term:
\[ \alpha_i - \alpha_j = \alpha_{ij}^+ - \alpha_{ij}^- \quad \text{such that} \quad |\alpha_i - \alpha_j| = \alpha_{ij}^+ + \alpha_{ij}^- \\ \beta_i - \beta_j = \beta_{ij}^+ - \beta_{ij}^- \quad \text{such that} \quad |\beta_i - \beta_j| = \beta_{ij}^+ + \beta_{ij}^- \]
where \(\alpha_{ij}^+\), \(\alpha_{ij}^-\), \(\beta_{ij}^+\), and \(\beta_{ij}^-\) are all nonnegative variables.
Then, you can rewrite distances \(d_{ij}\) in the objective function:
\[ d_{ij} = (|\alpha_i - \alpha_j| + |\beta_i - \beta_j|) = (\alpha_{ij}^+ + \alpha_{ij}^- + \beta_{ij}^+ + \beta_{ij}^-) \]
Strictly, \(|x| \leq x^+ + x^-\), but high values of \(x^+\) and \(x^-\) will hurt the objective function (when minimizing and assuming \(f_{ij} \geq 0\)). Thus, the solver will force either value to zero.
The department area can be controlled through its perimeter (which is a linear function of the length and width of the department).
Consider:
\[ \begin{align} P_i ^{\mathrm{LB}} & = \quad \text{lower bound on perimeter of department} \, i\\ P_i ^{\mathrm{UB}} & = \quad \text{upper bound on perimeter of department} \, i\\ \end{align} \]
and add the constraint:
\[ \begin{align} P_i^{\mathrm{LB}} \leq 2(x_i^{\mathrm{right}} - x_i^{\mathrm{left}} + y_i^{\mathrm{top}} − y_i^{\mathrm{bottom}})≤ P_i^{\mathrm{UB}} & \quad \text{for all} \; i \end{align} \]
The area to perimeter conversion is an approximation; note that an area can result in different perimeters.
Retaining some flexibility in departmental area requirements reduces the likelihood of having no feasible solutions when obstacles and/or fixed departments are present.
Example
Consider a 10x10 building and four departments with the following area requirements: A1 = 18, A2 = 20, A3 = 27, and A4 = 33 (note that 18+20+27+33= 98). Without flexible areas, fixing A2 at the northeast corner leads to infeasibility.
To capture an “X” relationship between two departments \(i\) and \(j\), one can also insert a minimum required distance (clearance) between them.
If department \(i\) is strictly to the east of department \(j\), then \(i\) and \(j\) are separated by a minimum distance \(\Delta_{ij}^{\mathrm{x}}\) along their x-coordinates:
\[ \begin{align} x_j^{\mathrm{right}} + \Delta_{ij}^{\mathrm{x}} \leq x_i^{\mathrm{left}} + M(1- z_{ij}^{\mathrm{x}}) & \quad \text{for all} \; i \; \text{and} \; j,\; i \neq j \end{align} \]
If department \(i\) is strictly to the north of department \(j\), then \(i\) and \(j\) are separated by a minimum distance \(\Delta_{ij}^{\mathrm{y}}\) along their y-coordinates:
\[ \begin{align} y_j^{\mathrm{top}} + \Delta_{ij}^{\mathrm{y}} \leq y_i^{\mathrm{bottom}} + M(1- z_{ij}^{\mathrm{y}}) & \quad \text{for all} \; i \; \text{and} \; j,\; i \neq j \end{align} \]
Clearances should be used sparingly; they limit the number of feasible solutions.
Place an upper limit on the ratio (\(R_i \geq 1\)) of department \(i\)’s longer side to its shorter side:
\[ \begin{align} (x_i^{\mathrm{right}} - x_i^{\mathrm{left}}) \leq R_i(y_i^{\mathrm{top}} - y_i^{\mathrm{bottom}}) & \quad \text{for all} \; i \\ (y_i^{\mathrm{top}} - y_i^{\mathrm{bottom}}) \leq R_i(x_i^{\mathrm{right}} - x_i^{\mathrm{left}}) & \quad \text{for all} \; i \\ \end{align} \]
Depending on which side is the longer, at most one (i.e., could be none) of the above constraints will be “binding” (i.e., hold as an equality for non-square departments).
Warehousing - M-IEM - Breno A. Beirigo