Keywords

1 Introduction

Designing architectural floor plans of an office building is a challenging endeavor involving a multitude of tasks. Among other things, one has to draft a building outline, decide on the number of floors, and place rooms, stairs and elevators. At every step of the process, the planner must meet some predefined or implicitly understood requirements. Therefore, floor planning is a cumbersome process of trial and error requiring a significant amount of human labour and time. It is thus of interest to support such manual processes with (semi-) automated approaches [17].

We consider a simpler problem. In our variant of the problem, the planner has already fixed the outline of each floor, and the position and width of the corridors. This is often the case due to fixed lot sizes as well as distance and construction rules. We further assume that the planner has a list of rooms and, for each room, a minimum size.

Allen and Fustfeld [2] highlighted the importance of the architectural layout for communication. Based on their observation, some works assume that the planner has exact information about which pairs of rooms should be placed next to each other [23]. We model proximity relations differently. In the spirit of Allen and Fustfeld, we aim to arrange rooms with respect to the organisational units that will use them later. Technically, the task is to map rooms to location within floors of the building such that the rooms that belong to the same unit or group are placed close together; see Fig. 1. We call this problem Floor Planning with Group Proximity and define it formally in Sect. 3.

Fig. 1.
figure 1

Given a set of rooms, each with its size and group, and a set of empty floor plans, the Floor Planning with Group Proximity problem asks for a placement of the rooms such that rooms belonging to the same group are close together.

Fig. 2.
figure 2

The Floor Assignment problem asks for a mapping of rooms to floors such that rooms of the same group appear, preferably, on only few and neighboring floors.

Most variants of floor planning (including ours) are variants of basic combinatorial packing problems such as Knapsack or Bin Packing; hence they are usually NP-hard. For this reason it is unlikely that efficient algorithms for floor planning exist. Still, algorithms that support architects in this phase of the planning process are needed since computers are usually faster than humans in solving NP-hard optimization problems to (near-) optimality.

We show that Floor Planning with Group Proximity can be formulated as an integer linear program (ILP). Commercial ILP solvers exist, but due to the complexity of our problem, only small to medium problem instances can be solved to (near-) optimality. For large problem instances, we propose to split the problem into two independent subproblems. First, we map the rooms to floor “bins” considering the proximity of rooms within their groups; see Fig. 2. For example, it is preferable to map all rooms of one group to the same floor. If this is not possible, they should be mapped to only few neighboring floors [2]. We call this problem Floor Assignment with Group Proximity. Second, we solve Floor Planning with Group Proximity for each floor separately.

Contribution. We introduce a new type of floor planning problem that occurs when planning office buildings. In our model, we assume that for each floor we are given its outline, the corridor, and the stairs. Our objective is to place the rooms into the empty floor plans such that rooms that belong to the same group are close together. For the precise problem definition, see Sect. 3.

We formulate our floor planning problem as an ILP; see Sect. 4. According to our computational experiments, it takes too long to find optimal solutions of this global formulation for large instances of the problem. Thus we split the global problem into two independent subproblems; floor assignment and (single) floor planning, which we then solve by separate ILPs (see Sect. 5). While optimal solutions for the subproblems do not necessarily lead to optimal solutions of the global problem, our computational experiments show that the loss in the global objective is acceptable and the runtime improvements are considerable. We also test a simple greedy heuristic for the floor assignment subproblem; see Sect. 8.

While the runtime of ILP solvers is difficult to predict, linear optimization is quite powerful and allows the user to add additional constraints (such as “these two groups must go to the basement”) easily. If a user is dissatisfied with a solution that is provably optimal, then it is not the algorithm to be blamed – but the model. In other words, the objective must be changed or further constraints must be added in order to exclude solutions with certain undesired features. Once the model has been settled, it is possible to drop the requirement of optimal solutions; quite often ILP solvers quickly find near-optimal or even optimal solutions, but then need very long to prove their optimality; see Table 5.

We think that our work has the potential to support architects in finding sustainable solutions both for themselves and the users of their designs.

2 Related Work

The literature on floor planning problems is quite diverse. On the one hand, a panoply of different algorithmic methods have been used to tackle such problems. They range from logic programming [16], constraint programming [7], quadratic programming [21], over using shape rules and grammars[10, 12, 28] or graph-theoretic tools [18, 22, 23] to evolutionary algorithms [12, 15] to name just a few. We refer the interested reader to the surveys by Del Río-Cidoncha et al. [8] and by Lobons and Donath [17]. On the other hand, nearly every paper considers a different problem definition. We can group these variants as being purely combinatorial (where only room sizes matter), more geometric (where the actual shapes and their aspect ratios matter), or purely topological (where only adjacencies matter). Our problem variant includes both geometric and, with the group proximity constraints, topological aspects.

A purely combinatorial version of floor planning is the well-known Bin Packing problem, where items of different sizes must be packed into bins, each of a fixed capacity, in a way that minimizes the number of bins used. Bergman et al. [5] consider a variant called Bin Packing with Minimum Color Fragmentation, where each item is associated with a color. Then the goal is to find a bin packing where items of a common color are placed in the fewest number of bins possible. This problem is closely related to Floor Assignment with Group Proximity though the quality of a solution is measured differently. If rooms are set to be rectangular and their sizes are prescribed (with aspect ratios of rooms either fixed or bounded), we are in the range of Rectangle Packing problems [6, 13].

Marson and Musse [18] showed how to generate floor plans for residential houses where just a few adjacencies are specified. They prescribed room sizes and used squarified treemaps to subdivide the fixed building outline. Knecht and König [15] used an evolutionary approach to generate subdivisions of a given rectangle into a given number of smaller rectangles (rooms). In a second step, they used a genetic algorithm to change the topology of the resulting subdivision and to obtain the desired adjacencies. More recently, Shi et al. [24] used a Monte-Carlo tree search to evaluate and select promising candidates among many floor plans that they build room by room. Due to their runtime, some of these approaches only work for small houses, but not for large office buildings.

If all allowed room adjacencies are already prescribed, the input of a floor planning problem takes the form of a (well-behaved) triangulated embedded planar graph. The corresponding floor plan is then called a rectangular dual [11]. Formally, a rectangular dual is a dissection of a rectangle into smaller rectangles such that the adjacency graph of the smaller rectangles is the given embedded graph. Upasani et al. [27] presented an iterative procedure that takes a rectangular dual and lower and upper bounds on the room dimensions (in x- and y-direction) as input. The algorithm then optimizes the layout by alternatingly computing network flows in the graphs that represent the horizontal and the vertical contacts between the rectangular rooms. Instead of expecting an adjacency matrix as input, Simon [26] generated floor plans with a genetic algorithm that minimizes traffic flow between rooms, e.g., class rooms in schools.

A problem related to floor planning is the facility layout problem where facilities have to be arranged efficiently within an organization. In contrast to floor planning, facility layout is less about subdividing a given building, but about the placement of the facilities and the resulting paths between them. The aim is to place facilities such that the paths allow for low material handling costs, short lead time, and high productivity. We refer interested readers to the surveys by Meller and Gau [20] and by Drira et al. [9]. Like for floor planning, there also exist multi-floor variants where departments have to be placed on floors and convenient positions for lifts have to be found; see a recent survey by Ahmadi et al. [1]. Interestingly, Meller and Bozer [19] also suggest a two-stage approach for the multi-floor facility layout problem.

Barth et al. [3] and Bekos et al. [4] considered a related problem that was motivated by drawing semantic word clouds. Given a set of rectangular shapes with fixed sizes and an adjacency graph defined on these shapes, place the shapes such that no two shapes overlap. Their objective was to realize the maximum number of desired adjacencies as side contacts of the rectangular shapes.

Fig. 3.
figure 3

Three orthogonal floor plans: (a) is valid; (b) is invalid since the corridor wall e does not overlap with the outer wall \(e'\) (when projected to the y-axis); and (c) is invalid since room a is not rectangular, room b shares not enough wall with the corridor for a door, room c has no window, and room d occupies two building corners.

3 Our Model and Problem Definitions

In this section, we describe a model for floor plans, allowed room placement, and group proximity that is tailored to our ILP approach. We then make the problem statements precise.

Floor Plans. A floor plan (of a single floor) describes a subdivision of the floor’s outline, a simple polygon, into smaller polygons by inner walls. Each of the smaller polygons represents a room, the corridor, stairs, etc. Here we consider only orthogonal floor plans, that is, each wall is drawn either horizontally or vertically. We require that the corridor runs parallel to the outline, that is, the polygon describing the corridor is combinatorially the same as the polygon describing the outline; see Fig. 3(a). In particular, to keep our model simple, each vertical or horizontal segment of the corridor must overlap vertically or horizontally, respectively, with its combinatorial counterpart of the outline; see Fig. 3(b) for a counterexample. For the following requirements, see Fig. 3(c). We insist that all rooms are rectangular and stretch from the corridor to the outline. To ensure that each room gets a door and a window, we require that the room has a certain minimum overlap with the corridor and with the outline. To keep the model simple a room may occupy at most one corner (but see Sect. 9).

Empty Floor Plans. Part of the input of the floor planning problem are empty floor plans. Geometrically, we require that an empty floor plan consists of the outline, the corridor, at least one room that represents stairs or elevators, and potentially other blocked areas. Stairs connect the individual floors of a building with each other. Blocked areas represent, for example, sanitary facilities, which are often located at the same place on each floor. The capacity of an empty floor plan is the size of the area not covered by the corridor and blocked rooms.

We model an empty floor plan as follows. We subdivide the unoccupied area between the outline and the corridor into rectangles of two types; see Fig. 5. Each pair that consists of a corner of the outline and the corresponding corner of the corridor spans a corner rectangle. The rectangles that form the remaining area are edge rectangles. For the sake of brevity, we call corner and edge rectangles simply corners and edges, respectively. For each corner v, its capacity \(\kappa _v\) is its area. Similarly, for each edge e, the capacity of e is denoted by \(\kappa _e\). The sum of these capacities is the capacity of the empty floor plan.

Room Placement. We now describe a set of rules that define how rooms can be placed into empty floor plans to obtain valid floor plans. Recall that each room comes with a (minimum) size. A room placement is a mapping of rooms into the unoccupied area, defined by the corners and edges, and their capacities. A valid room placement satisfies the following conditions.

  1. (P1)

    Each room is either mapped to an edge or to a pair consisting of a corner and an adjacent edge.

  2. (P2)

    For each corner v, at most one room may be mapped to v and this room must occupy v fully. Moreover, the size of the room must exceed the capacity of v. This excess must be enough for the room to admit a door and a window.

  3. (P3)

    For each edge e with adjacent corners v and \(v'\), the sizes of rooms mapped to e plus the total excess of the rooms mapped to (ev) and \((e,v')\) may not exceed the capacity of e.

Note that Item (P3) implies that a room may occupy at most one corner. Further restrictions on room placements are possible, for example, we could forbid rooms to be placed at an edge where its aspect ratio becomes undesirably large.

We want to point out that a room placement does not fix the positions of rooms along an edge, but only allocates the necessary space. Hence, the exact positions of such rooms need to be computed in a post-processing step. We return to this matter in Sect. 8.

Group Proximity. Given a room placement, we describe how to measure the proximity of the rooms within a group, for short, the group proximity. To this end, let V be the set of corners and E the set of edges. Let \(O = V \cup E\) be the set of objects (that is, vertices and edges). For two objects \(o, o' \in O\), let \({{\,\mathrm{\delta }\,}}_{o,o'}\) denote the distance of o and \(o'\). For example, \({{\,\mathrm{\delta }\,}}_{o,o'}\) could be the length of a path from o to \(o'\) along the corridor (possibly using stairs). In general, however, the planner can set the distances as they see fit provided that, for \(o = o'\), \({{\,\mathrm{\delta }\,}}_{o,o'} = 0\). For a group g, we then define the proximity of g as the sum of distances \({{\,\mathrm{\delta }\,}}_{o,o'}\) over all pairs \(o, o' \in O\), where both o and \(o'\) contain at least one room of g.

Problem Definitions. We now define our two problems. To this end, let G be the set of groups, and let S be the set of room sizes. For each \(g \in G\) and each \(s \in S\), let \(\rho _{g,s}\) denote the number of rooms of size s that belong to group g.

First, we define the problem Floor Planning with Group Proximity. Let V and E be the sets of corners and edges, respectively, that together with their distance matrix \({{\,\mathrm{\delta }\,}}\) and capacities \(\kappa \) describe the available empty floor plans. A feasible solution for the problem is a valid placement of all rooms into V and E with respect to \(\kappa \), as defined above. We say that a feasible solution is optimal if it minimizes the sum of proximities over all groups in G with respect to \({{\,\mathrm{\delta }\,}}\).

Next, we define the problem Floor Assignment with Group Proximity. Let F be the set of available floors. Each floor f in F has a capacity \(\kappa _f\), and for two floors \(f, f'\) in F, \({{\,\mathrm{\delta }\,}}_{f,f'}\) denotes their distance. For example, if all floors belong to a single building, the ith floor and jth floor could have distance \(|j - i |\). A feasible solution for the problem is an assignment of all rooms to the floors in F such that no floor \(f \in F\) is overfilled with respect to \(\kappa _f\). Given a feasible solution and a group \(g \in G\), let \(F_g \subseteq F\) be the set of floors that contain a room of group g. We say that a feasible solution is optimal if it minimizes \(\sum _{g \in G}\sum _{f,f' \in F_g} {{\,\mathrm{\delta }\,}}_{f,f'}\).

For ease of reading, we refer to these two problems from now on simply with Floor Planning and Floor Assignment.

4 An ILP for Floor Planning

Linear programming is a popular tool to solve combinatorial optimization problems. A linear program (LP) consists of (i) real-valued variables \(x_1, \dots , x_n\), (ii) a target function that is restricted to be linear in the variables (e.g., minimize \(c_1x_1 + \dots + c_nx_n\) for some constants \(c_1, \dots , c_n\)), and (iii) a set of linear constraints (\(a_{i,1}x_1 + \dots + a_{i,n}x_n \ge b_i\) for \(i = 1, \dots , m\),). Linear programs can be solved efficiently [14]. A (mixed-)integer linear program (ILP) is a generalization of a linear program where some variables can be restricted to integer values. In particular, binary “decision” (that is, 0–1) variables can be used. This makes it possible to encode NP-hard combinatorial optimization problems. Consequently, ILPs cannot be solved efficiently in general. In practice, however, small and medium-sized instances of such problems can often be solved relatively fast [25]. For example, we can solve the below ILP formulation for Floor Planning for a single floor with 40 rooms and three groups in under one second.

We now describe how to formulate Floor Planning as an ILP. The input of the ILP consists of the empty floor plans given by the sets V and E of corners and edges, respectively, their adjacency relations, their distances \(\delta \), and their capacities \(\kappa \). Let \(O = V \cup E\) be the set of objects, that is, the corners and edges. The ILP further gets the set G of groups, the set S of room sizes, and the room quantities \(\rho \) as input. Note that the ILP views all numbers in the input as constants. (Since the distances are part of the input, they hide the number of floors from the ILP. The distances are also not restrained to the actual geometry of the floor plans and can thus be set as desired by the planners.)

We need the following variables, all of which are binary except for the first one, which is an integer. To help intuition, we specify the intended meaning of the variables.

$$\begin{aligned} x_{g,s,e} \ge 0&\text { denotes the number of group-}g,\text { size-}s \text { rooms placed at edge }e. \\ y_{g,s,v,e} = 1&\Leftrightarrow \text {a group-}g,\text { size-}s\text { room occupies corner }v\text { and extends into edge }e. \\ z_{g,o} = 1&\Leftrightarrow \text {a room of group }g\text { is at object }o \text { (which is an edge or a vertex).} \\ u_{g,o,o'} = 1&\Leftrightarrow \text {rooms of group }g\text { are at objects }o\text { and }o'. \end{aligned}$$

If placing a room of size s into corner v along edge e would not allow this room to have a door or a window, we set \(y_{g,s,v,e} = 0\) for every group g. (This partially enforces room placement condition (P2).) Similarly, if placing a room of size s at edge e would make the room’s aspect ratio too extreme, we could set \(x_{g,s,e} = 0\) for every group g.

Recall that the problem asks to minimize the sum of distances between pairs \(o, o'\) of objects that contain rooms from the same group g. The triples \(g, o, o'\) that contribute to this sum are those with \(u_{g,o,o'} = 1\). Hence, the objective function of our ILP for Floor Planning (\(\text {FP}_{\text {ilp}}\)) is:

$$\begin{aligned} \text {minimize}&\!\! \sum \limits _{g \in G, o, o' \in O} \!\! u_{g,o,o'} \cdot {{\,\mathrm{\delta }\,}}_{o,o'}, \end{aligned}$$

which is subject to the following constraints. The first three constraints enforce the room placement conditions (P1) to (P3).

  • Place all rooms (P1):

    $$\begin{aligned} \sum \limits _{e \in E} x_{g,s,e} + \!\! \sum \limits _{\begin{array}{c} v \in V\\ e \text { adjacent to } v \end{array}}\!\!\!\! y_{g,s,v,e}&= \rho _{g,s}&\text {for } g \in G, s \in S \end{aligned}$$
  • Place at most one room in a corner v (P2):

    $$\begin{aligned} \sum \limits _{\begin{array}{c} g \in G, s \in S,\\ e \text { adjacent to } v \end{array}}\!\!\! y_{g,s,v,e}&\le 1&\text {for } v \in V \\ \end{aligned}$$
  • Do not overfill an edge e (P2)–(P3); that is, the sum of the sizes of all rooms fully placed at e and those extending into e from a corner must not exceed \(\kappa _e\):

    $$\begin{aligned} \sum \limits _{g \in G, s \in S}\!\! x_{g,s,e} \cdot s + \!\! \sum \limits _{\begin{array}{c} g \in G, s \in S,\\ v \text { adjacent to } e \end{array}}\!\!\!\! y_{g,s,v,e} \cdot (s - \kappa _v)&\le \kappa _e&\text {for } e \in E \end{aligned}$$

    Note that the room sizes in S are constants from the point of view of the ILP. We need the following constraints to set the binary variables of types u and z.

  • Force \(z_{g,e}\) to 1 if a room of group g is placed at edge e:

    $$\begin{aligned} \qquad \qquad \qquad \qquad \qquad \qquad \qquad x_{g,s,e}/\rho _{g,s} \le z_{g,e} \quad \text {for } e \in E, g \in G, s \in S \quad \end{aligned}$$
  • Force \(z_{g,v}\) to 1 if a room of group g is placed at corner v:

    $$\begin{aligned} \qquad \qquad \qquad y_{g,s,e,v} \le z_{g,v}&\qquad \text {for } v \in V, g \in G, s \in S,\ e \text { incident to } v \end{aligned}$$
  • Force \(u_{g,o,o'}\) to 1 if rooms of group g are placed at objects o and \(o'\):

    $$\begin{aligned} \qquad \qquad \qquad \qquad \qquad \qquad z_{g,o} + z_{g,o'} - 1 \le u_{g,o,o'} \ \ \text {for } o, o' \in O, g \in G\qquad \quad \end{aligned}$$

Note that we define only lower bounds for variables of types u and z here. However, setting, for example, \(u_{g,o,o'}\) to 1 without rooms of group g being placed at both objects o and \(o'\) would increase our objective function. Hence, the ILP solver sets \(u_{g,o,o'}\) to 0 in this case.

Dealing with Unsolvable Instances. Consider an instance of Floor Planning where the empty floor plans have a total capacity K and all rooms together require an area of A. If the rooms require more area than available (that is, \(A > K\)), then clearly, there is no solution. However, even if enough area is available (that is, \(A \le K\)) there may not necessarily exist a solution, because the rooms placed at the same edge e may not fill up e completely and hence available area remains unused. Moreover, there might not be enough large rooms too occupy all corners. In general, this is more likely to happen when there is not much spare area available. One way to deal with such unsolvable instances is to scale down room sizes, which effectively decreases A.

5 An ILP for Floor Assignment

Due to the complexity of the Floor Planning problem, our ILP formulation from the previous section can only be solved for instances of moderate size. We thus propose to split large instances into smaller ones. More precisely, we solve the respective Floor Assignment problem that splits a large multi-floor instance into individual floors. As a result, we get single-floor instances of Floor Planning that can usually be solved within a reasonable amount of time.

We now describe an ILP for the Floor Assignment problem. Recall that the problem asks us to assign every room to one of the floors such that the rooms of each group are assigned only to few floors that are close together. The input is given by the set F of floors, their distances \(\delta \), their capacities \(\kappa \), the set G of groups, the set S of room sizes, and the room quantities \(\rho \). Note that distances of floors set in \({{\,\mathrm{\delta }\,}}\) do not need to grow linearly. In particular, one may set distances to model that people take the stairs to go up one or two floors, but take the elevator for more floors.

We need the following variables all of which are binary except for the first one, which is an integer.

$$\begin{aligned} x_{g,s,f} \ge 0&\text { denotes the number of group-}g,\text { size-}s\text { rooms assigned to floor }f. \\ z_{g,f} = 1&\Leftrightarrow \text {a room of group }g\text { is assigned to floor }f. \\ u_{g,f,f'} = 1&\Leftrightarrow \text {rooms of group }g\text { are assigned to floors }f\text { and }f'. \end{aligned}$$

Then our ILP for floor assignment (\(\text {FA}_{\text {ilp}}\)) is as follows.

$$\begin{aligned} \text {Minimize}&\sum \limits _{g \in G, f, f' \in F}\!\! u_{g,f,f'} \cdot {{\,\mathrm{\delta }\,}}_{f,f'} \end{aligned}$$

subject to the following constraints.

  • Assign all rooms:

    $$\begin{aligned} \sum \limits _{f \in F} x_{g,s,f}&= \rho _{g,s}&\text {for } g \in G, s \in S \end{aligned}$$
  • Do not overfill any floor:

    $$\begin{aligned} \sum \limits _{g \in G, s \in S}\!\!\!\! x_{g,s,f}\cdot s&\le \kappa _{f}\qquad \text {for } f \in F \end{aligned}$$
  • Force \(z_{g,f}\) to 1 if a room of group g is assigned to floor f:

    $$\begin{aligned} x_{g,s,f}/\rho _{g,s}&\le z_{g,f}\qquad \text {for } f \in F, g \in G, s \in S \end{aligned}$$
  • Force \(u_{g,f,f'}\) to 1 if rooms of group g are assigned to floor f and \(f'\):

    $$\begin{aligned} z_{g,f} + z_{g,f'} - 1&\le u_{g,f,f'}\quad \text {for } f, f' \in F, g \in G \end{aligned}$$

6 A Heuristic for Floor Assignment

In this section, we propose a heuristic for the Floor Assignment problem. Our heuristic, which we call \(\text {FA}_{\text {heu}}\), tries to distribute the rooms evenly among the floors. This is motivated by the observation that an instance of Floor Planning with a nearly full floor is less likely to have a solution. Roughly speaking, \(\text {FA}_{\text {heu}}\) consists of three steps, namely, (i) reserving area on each floor, (ii) allocating space to the groups, and (iii) distributing the rooms of each group to the corresponding allocated space. We explain these steps now more precisely.

Fig. 4.
figure 4

\(\text {FA}_{\text {heu}}\) applied to a small problem instance (sM-3M, see Sect. 7). (a) Free space (grey) is evenly distributed to the three floors and the four groups get area allocated one after the other. (b) Allocated space is converted into rooms whereat at most one room per floor uses reserved space.

The first step of \(\text {FA}_{\text {heu}}\) works as follows. Recall that F is the set of floors. Now let K be the sum of the capacities of all floors, let A be the sum of sizes of all rooms, and thus \(K-A\) is the excess area of the building. Then \(\text {FA}_{\text {heu}}\) reserves on each floor an area of size \((K - A)/ |F |\), that is, an equal proportion of the excess area.

In the second step, the remaining area is allocated to the groups. To this end, \(\text {FA}_{\text {heu}}\) iterates through groups and floors concurrently. More precisely, suppose that currently group g and floor f are handled. Then as much area of f is allocated to g as either f has available or as g still requires. Accordingly, \(\text {FA}_{\text {heu}}\) either proceeds with the next floor or the next group. For an example, consider Fig. 4(a), where group 1 requires 105 m2 of the unreserved 129 m2 on floor \(f_1\). Proceeding with group 2, which requires 101 m2, the heuristic first allocates the remaining 24 m2 of \(f_1\) to group 2 and then continues with floor \(f_2\).

In the last step, \(\text {FA}_{\text {heu}}\) converts the allocated areas of the second step into an assignment of rooms to floors as follows. If the whole allocated area of a group g is on one floor, then the area can be straightforwardly partitioned into the rooms of g (like for group 1 in Fig. 4(a–b)). Otherwise, if g is the last group that got area allocated on a floor f (like group 2 on floor \(f_1\) in the example), then \(\text {FA}_{\text {heu}}\) repeatedly assigns the largest remaining (that is, unplaced) room of g on floor f that fits inside the allocated area. If this is no longer possible, but the allocated area of g on f is not fully used up yet, \(\text {FA}_{\text {heu}}\) assigns the smallest remaining room of g to f. In the example, first the largest room and then the smallest room of group 2 are assigned to \(f_1\). In this way, \(\text {FA}_{\text {heu}}\) processes floor after floor and group after group.

Note that as long as the reserved area on each floor is at least as large as the largest room size, \(\text {FA}_{\text {heu}}\) always returns a valid solution. We always place the smallest room at the end of a floor in order to equally distribute the excess area.

The first step takes \(\mathcal {O}(|G | \cdot |S | + |F |)\) time since we need to sum the sizes of all rooms and the capacities of all floors. For the second step, we need \(\mathcal {O}(|G | + |F |)\) time to greedily allocate the area of the floors to groups. The third step takes \(\mathcal {O}((|G | + |F |) \cdot |S |)\) time since every room is assigned successfully once and each size may be tried unsuccessfully once per floor. Therefore, the total runtime of \(\text {FA}_{\text {heu}}\) is also \(\mathcal {O}((|G | + |F |) \cdot |S |)\).

7 Test Data

To get a rough idea of realistic problem instances, we considered the situation at two institutes at the University of Würzburg; Mathematics and Computer Science. The actual floor plans of the mathematics buildings inspired the room sizes of our instances. We mapped each type of staff, such as professors and research assistants, to a different room size. Accordingly, we modeled the institutes’ chairs as groups, with their respective staff. Based on this data, we built problem instances that vary in the number of groups, in the number of floors, in the floor sizes, and in the number of different room sizes.

We first treat floor plans. We designed four different empty floor plans, \(f_\mathrm {S}\), \(f_\mathrm {M}\), \(f_\mathrm {L}\), \(f_\mathrm {XL}\) in order of increasing size; see Fig. 5. As an example, Table 1 shows the distance matrix of \(f_\mathrm {S}\). For all instances, we set the distance of the ith and the jth floor to \(|j-i |\cdot {20}\,\text {m}\) (seen as a penalty) and calculate the distances of edges and vertices of different floors with their distances to the stairs.

Fig. 5.
figure 5

The four empty floor plans used in our problem instances.

Note that the floor capacities correlate with the floor complexities in terms of numbers of edges and corners. We want to point out that \(\text {FP}_{\text {ilp}}\) does not take the actual geometry of a floor into account but only its complexity, the capacities, and the distance matrix. In particular, our problem definition does not insist that the same empty floor plan is used for every floor. For simplicity and comparability of the results, in each of our test instances, we do use the same empty floor plan for every floor.

We define the following sets of groups.

M : :

A set of groups based on the chairs of the Institute of Mathematics. It contains 11 groups with a total of 122 rooms of sizes 8, 15, or 18 m2. The exact groups are shown in Table 2.

C : :

A set of groups based on the chairs of the Institute of Computer Science that contains 9 groups with a total of 177 rooms of sizes 10, 15, 20, and 25 m2; see again Table 2.

sM : :

A small set of groups that contains the math groups 1, 2, 4, and 11.

MC : :

A large set of groups; the union of the sets M and C. It thus contains 20 groups with a total of 299 rooms of six different sizes.

Finally, we can define our six problem instances. We have three medium-sized instances that use the set M of math groups but floors of different sizes. Furthermore, we have a small, a large, and a very large instance.

M-18S : :

Math groups M and 18 copies of \(f_\mathrm {S}\).

M-9M : :

Math groups M and 9 copies of \(f_\mathrm {M}\). The problem instance is closest to the actual situation at the Institute of Mathematics.

M-3XL : :

Math groups M and 3 copies of \(f_\mathrm {XL}\).

sM-3M : :

Subset of math groups sM and 3 copies of \(f_\mathrm {M}\).

C-11L : :

Computer science groups C and 11 copies of \(f_\mathrm {L}\). This instance is larger and more complex than the math instances as it has more rooms and different room sizes.

MC-15L : :

Combined groups MC and 15 copies of \(f_\mathrm {L}\).

Table 1. Distances in the empty floor plan \(f_\mathrm {S}\).
Table 2. The mathematics and computer science groups.

8 Experimental Evaluation

In this section, we evaluate our three approaches for the Floor Planning problem on our problem instances from Sect. 7. First, we examine the performance of \(\text {FP}_{\text {ilp}}\) on its own. Then we combine \(\text {FP}_{\text {ilp}}\) with either \(\text {FA}_{\text {ilp}}\) or \(\text {FA}_{\text {heu}}\), and discuss the strengths and limitations of these approaches. Finally, we detail how we post-process \(\text {FP}_{\text {ilp}}\) solutions.

Using an ILP for Floor Planning. All ILP tests were run using CPLEX with OPL on a virtual machine that runs Ubuntu 18.04 with 16 cores and 96 GB of RAM. After preliminary experiments, we decided to use settings of CPLEX that resemble a depth-first search with a focus on finding feasible solutions. We tested \(\text {FP}_{\text {ilp}}\) twice on each of the six problem instances, once with a realistic time limit of one hour and once with a time limit of 12 h for comparison. The bare results are shown in Table 3.

Fig. 6.
figure 6

The solutions found by \(\text {FP}_{\text {ilp}}\), like the optimal solution for the problem instance sM-3M here, should not be interpreted as final floor plans.

Table 3. Best solutions found for different approaches and instances. The two versions of \(\text {FP}_{\text {ilp}}\) differ only in their time limit. Results written in required scaling of room sizes to admit solutions.

\(\text {FP}_{\text {ilp}}\) found solutions for small to medium-sized instances but it managed to solve only the smallest instance sM-3M to optimality. The resulting floor plans, found within five minutes, are shown in Fig. 6a. Knowing that at least one group needs to be split to two floors, the results looks satisfactory.

Concerning the medium-sized instances (M-XX), \(\text {FP}_{\text {ilp}}\) performed significantly better with the higher time limit. For example, for the instance M-9M, the floor plans after 1 h, 12 h, and 66 h of computation time are shown in Fig. 7. We observe that the floor plans after 12 h and especially after 66 h appear considerably tidier than after 1 h, though still not fully satisfactory.

The situation is worse for larger problem instances. Namely, for MC-15L, no solution was found even after 12 h. For C-11L, \(\text {FP}_{\text {ilp}}\) found solutions but ran out of memory after roughly 8 h. The RAM usage shown in Table 4 suggests that this is a systematic problem. Hence, these results indicate that it is necessary to break down large problem instances into smaller ones by computing a floor assignment first.

Floor Assignment as a Preprocessing Step. The two floor assignment algorithms \(\text {FA}_{\text {ilp}}\) and \(\text {FA}_{\text {heu}}\) distribute rooms to floors such that \(\text {FP}_{\text {ilp}}\) has to solve only single-floor instances. We compare the solutions found by either combination with those found by \(\text {FP}_{\text {ilp}}\) alone. To this end, we combined the solutions for the single-floor instances to a solution of the original multi-floor instance and computed the quality according to the objective function of \(\text {FP}_{\text {ilp}}\); see Table 3. \(\text {FA}_{\text {ilp}}\) instances were again solved with CPLEX and DFS-like settings.

Both floor assignment approaches made it possible to find solutions for the two largest problem instances where \(\text {FP}_{\text {ilp}}\) on its own did not succeed. Furthermore, the combination of \(\text {FA}_{\text {ilp}}\) and \(\text {FP}_{\text {ilp}}\) found a better solution to M-3XL than \(\text {FP}_{\text {ilp}}\) alone and this in a total of only 14 min. In general, the combination of \(\text {FA}_{\text {ilp}}\) and \(\text {FP}_{\text {ilp}}\) achieved better results than the combination of \(\text {FA}_{\text {heu}}\) and \(\text {FP}_{\text {ilp}}\). However, there is a caveat concerning these results. For most problem instances, it was necessary to downscale the room sizes for several floors such that they would admit solutions. In this regard, \(\text {FA}_{\text {heu}}\) performed better than \(\text {FA}_{\text {ilp}}\); we discuss this in more detail below.

Table 4. Maximum amount of memory used by \(\text {FP}_{\text {ilp}}\) (excluding overhead).
Table 5. Runtimes of \(\text {FA}_{\text {ilp}}\) in seconds for finding and for proving solutions optimal (rows 1 and 2); aggregated runtimes for the \(\text {FP}_{\text {ilp}}\) runs over all floors (rows 3 and 4).

Figures 8a and 8b show the floor plans computed for M-9M with the help of \(\text {FA}_{\text {ilp}}\) and \(\text {FA}_{\text {heu}}\), respectively. We find that both solutions appear tidier than those found by \(\text {FP}_{\text {ilp}}\) alone (Fig. 7). Moreover, since each group appears on at most two floors, these solutions appear closer to what a human planner would construct. We further want to point out that, for \(\text {FA}_{\text {heu}}\), only one floor required downscaling of room sizes.

Next, we consider the runtime of the floor assignment approaches. While the runtime of \(\text {FA}_{\text {heu}}\) is negligible, we gave \(\text {FA}_{\text {ilp}}\) a time limit of one hour. Table 5 shows the time required by \(\text {FA}_{\text {ilp}}\) to find optimal solutions and to prove that they are optimal. Often, \(\text {FA}_{\text {ilp}}\) found the optimal floor assignment solution within a few seconds for all instances, but required a few minutes to prove their optimality; for M-18S it was not able to prove optimality even after three days.

For both \(\text {FA}_{\text {heu}}\) and \(\text {FA}_{\text {ilp}}\) as preprocessing steps, Table 5 shows the runtime required by \(\text {FP}_{\text {ilp}}\) to find and prove optimal solutions (aggregated over all floors). \(\text {FP}_{\text {ilp}}\) solved most buildings in less than 10 s. Only the instances with the large empty floor plan \(f_\mathrm {XL}\) still took a few minutes to be solved. Nevertheless, we can conclude that first computing a floor assignment and then using \(\text {FP}_{\text {ilp}}\) for single floors yields a tremendous speed up.

Scaling to the Rescue. Since the floor assignment approaches do not take the empty floor plans into account when distributing the rooms it may happen that a floor assignment solution results in unsolvable floor planning instances. For such an unsolvable instance, we scaled down all room sizes with the same scaling factor such that the instance became solvable. For the different problem instances, Table 6 shows the worst needed scaling factor among all floors and the number of floors that required scaling.

Fig. 7.
figure 7

Solutions for M-9M computed by \(\text {FP}_{\text {ilp}}\) with different time limits.

Taking a closer look at the solutions in Fig. 8, we observe that downscaling was not only necessary because of a lack of empty space, but also because of a bad distribution of room sizes. For example, the sixth floor in the \(\text {FA}_{\text {heu}}\) solution has many small rooms but only one large room and therefore not all corners can be occupied. The same problem occurred on the second floor in the \(\text {FA}_{\text {ilp}}\) solution. We further find the \(\text {FA}_{\text {ilp}}\) solutions mostly required downscaling because of tightly packed floors. By design, this is less likely to happen with \(\text {FA}_{\text {heu}}\).

Fig. 8.
figure 8

Solutions of M-9M found by first computing a floor assignment with \(\text {FA}_{\text {ilp}}\) and \(\text {FP}_{\text {ilp}}\) as well as a manually crafted solution. Red line segments indicate that the sizes of the rooms next to the segments had to be scaled down slightly. (Color figure online)

Algorithms vs. Human. For the problem instance M-9M we also constructed a floor plan manually; see Fig. 8c. Compared to the floor plans computed by the three different algorithmic approaches (see again Figs. 7 and 8), the manual floor plan appears more coherent in the following sense. Groups form only few clusters and do not alternate in the cyclic order around the corridors (whereas they do in the ground-floor of Fig. 7b). Interestingly, the floor plan computed by \(\text {FP}_{\text {ilp}}\) after 66 h (Fig. 7c) achieved a lower score (4235) than the objective function value of the manual solution (5144), but appears less coherent. Note, however, that \(\text {FP}_{\text {ilp}}\) placed more groups within one floor (7 vs. 6). On the other hand, in Fig. 7c, the small orange group 2 is spread over four floors (with 1, 1, 2, 1 objects). This yields 14 times the intra-floor distance, that is, the distance between two consecutive floors (which we set to 20 m). Although the larger violet group 8 in Fig. 8c is spread over just two floors, where it occupies four objects on each floor. This yields more, namely 16 times the intra-floor distance. If we want to favor solutions that avoid spreading groups over more than two floors, we simply have to replace our linear floor distance function (see p. 11) by, say, a quadratic one (e.g., \(|j-i |^2\cdot {20}\,\text {m}\) for the distance from floor i to floor j).

Table 6. Worst needed scaling factors and the number of floors that needed scaling when solving the (single-floor) Floor Planning instances created by floor assignment solutions.

Post-processing of ILP Solutions. A solution computed with \(\text {FP}_{\text {ilp}}\) only specifies a room placement, which, by the definition in Sect. 3, is only a mapping of rooms to edges and corners that does not include an ordering of rooms along the same edge. For the floor plans depicted in Figs. 6, 7 and 8, we ordered rooms along the same edge manually in a post-processing step. In our experiments, we observed that in most cases only one group, rarely two groups, and only once three groups were present at the same edge. We hence expect the task of ordering rooms along an edge to be trivial in practice.

9 Concluding Remarks

In this paper, we introduced the Floor Planning with Group Proximity problem and described an ILP formulation to solve it. We tested our ILP on realistic test data using the ILP solver CPLEX. Our experiments showed that small problem instances (28 rooms, 4 groups) can be solved to optimality within minutes and with satisfactory results. While medium-sized instances (122 rooms, 11 groups) can still be solved within a few hours, the complexity of the problem makes it unfeasible to tackle larger instances directly.

We further showed that large (multi-floor) instances of the floor planning problem can be tackled by first solving the respective Floor Assignment with Group Proximity problem and then solving the resulting (single-floor) instances as before. We have formulated the floor assignment problem, too, as an ILP, but we also suggested a greedy heuristic for it. Our experiments demonstrated that splitting instances via a floor assignment wasn’t only much faster, but also improved some of the results for medium-sized instances that \(\text {FP}_{\text {ilp}}\) computed within a fixed runtime limit.

Let us consider the optimal solution found for the smallest instance sM-3M by \(\text {FP}_{\text {ilp}}\) in Fig. 6a. Since the ILP only optimizes according to an objective function, we should not be surprised to find, for example, gaps between rooms or corner rooms that cannot be entered. A planner would directly avoid these and other deficiencies. However, such deficiencies can easily be eradicated in a (manual) post-processing step as shown by the floor plan in Fig. 6b. As mentioned in the introduction, if a user is not satisfied with an optimal solution (say, to an ILP), then this is not a failure of the solver, but a failure of the model and the corresponding objective function. Here, we decided to keep the model as simple as possible to test the potential computational limitations of our approach.

The proposed variants of the floor planning problem and our algorithmic approaches have demonstrated their potential to support planners in the design of architectural floor plans of office buildings. We stress that formulating the floor planning problem as an ILP has the advantage that a planner may add further requirements. For example, one can easily add constraints that force two given rooms to be adjacent, extend the model to less constrained building outlines, or allow rooms to occupy two corners.