1 Introduction

A residential plan is a complex document that shows one aspect of the living culture to which each resident belongs. In recent years, various resident requirements have emerged because of the continuing urbanization worldwide. Residents use various smart devices in indoor spaces to engage in novel indoor activities. An optimized indoor space design requires a residential floor plan that can respond to new lifestyle types. Previously, the life patterns of residents were analyzed using many sensors [1, 2] or by conducting surveys [3, 4]. However, these methods incurred high costs. Recently, spatial information has been integrated with various industries and technologies, thereby enabling the application areas to expand rapidly owing to the extensive use of smartphones with built-in small sensors. In addition, researchers have attempted to create a new industry rapidly by combining spatial information with machine learning [1]. Herein, a method that uses personal application (app) logs of smartphones to analyze the daily-life patterns of residents easily is introduced, wherein the patterns are used for indoor space design. Because our method involves only spatial information from smartphones, separate sensors are not required for spatial information acquisition, and a large amount of data can be collected. Previously, [24] conducted studies pertaining to methods similar to ours; however, they focused primarily on customer analysis in shopping mall spaces. Moreover, the behaviors of residents in a building based on energy optimization problems [5] or building structure layout and design problems [7,8] have been investigated.

Our study was motivated by the studies of Zawidzki [53]. In this paper, we propose an optimized design based on multimodal data obtained using a smartphone from an indoor space, referred to as an apartment. Our approach differs from conventional methods in that the high-dimensional behavior data of users are created from the app usage contents of the residents, and the data are then used for spatial optimization. In our study, the spatial analysis domain is automatically expanded in proportion to the number of smartphone users and data. Furthermore, our proposed design can increase the accuracy of machine learning in proportion to the data size. We applied our proposed method for the residential-zone analysis of apartments. After obtaining the daily-life patterns from residential environments in apartments of two typical sizes, we performed optimized spatial arrangements. Subsequently, we investigated the amount of improved spatial efficiency afforded by the rearranged spaces based on the test data. Compared with existing studies, the contributions of the current study are as follows:

  • A low-cost spatial analysis system: Location and high-dimensional multimodal data that can be easily used for machine learning are obtained at a low cost using spatial data extracted from users’ smartphones.

  • Optimization algorithm based on multimodal data: A method for an optimized space layout that satisfies the behavior minimization cost based on the multimodal data obtained is proposed.

2 Previous work

The current study is related to the research areas of (1) Spatial analysis platform, (2) Behavior analysis using multimodal data, and (3) Floor plan optimization. Some previous studies associated with each area are introduced below.

2.1 Spatial analysis platform

Spatial analysis techniques involving the use of data obtained from various small sensors have been proposed. Hannu [13] proposed a framework to perform potential mobile customer measurements to obtain data. They proposed a technique that installs a separate app in mobile devices, obtains data for each mobile situation, and sends the data periodically to a server for synchronization. Kang et al. [14] proposed a method where various data on a network are obtained and then analyzed in a mobile environment. The data obtained comprises GPS, calls, SMS, photo viewing, photographs, weather, mp3, battery, and other types of data. Additionally, a method was proposed to allow a network business operator to optimize the construction of infrastructure and create services based on analyzed data [15]. Harman et al. [16] extracted, combined, and analyzed pricing and customer review information for the technical, customer, and business aspects of an app. Chaix et al. [17] proposed the visualization and evaluation of trajectory itineraries, travel destinations, and activity spaces (VERITAS) system. Their system was an interactive Web mapping application that can identify the locations of relevant areas such as trajectories between locations and a person’s activity locations. Kelly et al. [18] proposed a spatial analysis method for analyzing demographic characteristics. They investigated relationships among the demographics, location-based behavior patterns, and social characteristics of individuals. Hamka et al. [19] showed that several service clusters can be defined from the perspectives of content service usage and network usage. Subsequently, they proposed a customer segmentation method from the perspectives of handset manufacturers, network operators, and application developers. Mafrur et al. [20] used 19 types of data sensors to propose methods for constructing behavior models to identify humans based on life-logs. The proposed system exceeded 80\(\%\) in terms of identification accuracy. Jalali et al. [21] proposed a lattice-based data fusion technique for recognizing events. They adopted a framework that detects co-occurrence patterns from multiple event streams. Subsequently, they proposed a data modeling and analysis method for user behavior analysis. Yamamoto et al. [23] proposed a technique for utilizing smartphone usage logs using a physiologically assessed stress metric. This technique minimizes the effect of participant subjectivity and increases objectivity. Lee et al. [24] proposed a variant of seq2seq architecture by combining an existing neural embedding architecture and an existing seq2seq architecture. Subsequently, they proposed a method for classifying smartphone users. Fukazawa et al. [25] proposed an experiment using the state-trait anxiety inventory (STAI) to evaluate the anxiety-related stress levels of 20 participants. They showed that the anxiety-related stress level can be predicted using smartphone log data. Sarker et al. [26] presented a method for mining recency-based personalized behavior, known as RecencyMiner. The effectiveness of RecencyMiner was analyzed based on individual smartphone user’s real-life contextual datasets.

2.2 Behavior analysis using multimodal data

Methods for analyzing various multimodal data and classifying user behaviors have been proposed continuously. Chan et al. [41] proposed solutions that enable the elderly or people with diminished physical functions to live in safe environments, i.e., using smart houses or sensor-embedded houses. Casale et al. [37] attached a wearable device to each user to obtain the time-series data of an accelerometer. Subsequently, five basic patterns in daily lives, i.e., “standing,” “walking,” “climbing stairs,” “working on a computer,” and “talking with people” were obtained. Fujimoto et al. [38] proposed a user (human) activity estimation method using fuzzy decision trees. They measured a user’s activities using a wearable multisensor with a built-in three-axis accelerometer and electrocardiogram monitor. Lee et al. [2] proposed a modeling framework for the malling behavior of customers within an urban shopping mall using raw sensor data from customers. Based on the stay point method proposed by GeoLife [44], they used a technique that extracts customer tracking data from raw sensor data. Their method comprises three aspects, i.e., stay detection, store recognition, and post-processing. Ke et al. [40] investigated human activity recognition using videos and performed a detailed analysis in three processing stages, i.e., human object segmentation, feature extraction and representation, and activity detection and classification algorithms. They used a viewpoint decision algorithm based on various view sequences via multiple cameras. Ann et al. [39] focused on the use of images and videos from RGB cameras to classify human behavior. They used depth maps of RGB frames obtained from depth cameras to increase behavior classification accuracy. Fallmann et al. [43] introduced human activity recognition in ambient assisted living based on a three-axis accelerometer and a three-axis gyrometer. In their study, accelerometer and gyrometer data collected from wearable sensors were analyzed using a continuous-time hidden Markov model. Singh et al. [42] proposed a deep learning model that learns to classify human activities in situations where no prior knowledge is available. Their study was conducted in a situation where data were delivered through smart home sensors. Zhang et al. [3] introduced unmanned store technologies, which are based on Wi-Fi technology, mobile and wearable sensing, and radio-frequency identification (RFID). They introduced three technologies necessitated by DeepStore; in particular, they demonstrated that customer behavior can be understood using five technologies: Kinect-based, RFID-based, smartphone, wearable-based, and Wi-Fi-based sensing. Chen et al. [4] the effect of members in a group on the purchase decisions of each member. They used mobile device movements and acoustic sensors to identify potential customers in a store. Clustering-based behavior analysis methods are relatively favorable because data annotation is not required. The following cluster-based algorithms have been proposed. Yang et al. [27] suggested the extraction of three features from a network environment comprising customers, and they can be classified into different categories, e.g., real-time communications, news browsing, and shared-resource downloading. They used a support vector machine to perform clustering. Perdisci et al. [28] introduced a new scalable system to perform the network-level behavioral clustering of HTTP-based malware. The ultimate objective was to efficiently assemble newly collected malware samples into malware family clusters. Bauckhage et al. [29] introduced a player behavior evaluation method using advanced spatial clustering techniques. They proposed two methods operating on asymmetric spatial similarity matrices to investigate likely transitions between preferred spaces. Drachen et al. [30] used unsupervised methods to develop a behavioral clustering technique using the playtime data of 70,014 World of Warcraft players. Leoni et al. [33] introduced a case study of UWV (employee insurance agency), one of the largest administrative factories in the Netherlands. Their framework unified various approaches proposed in the literature for correlation analysis, and a general solution that can perform those analyses was proposed. Farhan et al. [32] proposed a method for detecting depression using a multiview bi-clustering algorithm. They detected depression by analyzing smartphone detection data and identifying certain behavioral features correlated with depression measures using a patient health questionnaire (PHQ-9). Wang et al. [31] suggested an unsupervised system that can capture dominating user behaviors from clickstream data (traces of users’ click events). They identified clusters of similar users by partitioning a similarity graph. Peach et al. [34] presented a mathematical framework for analyzing time-series online learner engagement, which enables the identification of clusters of learners with similar online temporal behaviors directly from raw data without prescribing subjective reference behaviors a priori.

2.3 Floor plan optimization

Wang et al. [47] pioneered the use of optimal algorithms for floor plans to solve the floor plan area optimization problem. Rebaudengo et al. [48] suggested using a genetic algorithm (GA) to solve the floor plan area optimization problem. Their method involve the use of two ad hoc defined heuristic operators to improve performance. Their proposed system is insensitive to the internal structure of the building, and the memory requirement is low because intermediate results need not be stored during optimization. By expanding conventional methods, Wang et al. [49] introduced a method that can process large floor plans successfully. Michalek et al. [50] used two automated optimization algorithms, i.e., geometry and topology algorithms, to automate the generation of design layouts. They developed an optimization model that can quantify the layout design of building floor plans and introduced a method that integrates mathematical optimization with subjective decision-making. Rodrigues [51] focused on the increasing demand for designing energy-efficient buildings and proposed a solution. The aim of his study was to support architects in the spatial planning stage, in which floor plans reflecting users’ preferences and requirements are automatically generated, evaluated, and optimized. Dogan et al. [52] compared the energy use intensity levels between an American society of heating, refrigerating, and air-conditioning engineers-prescribed zoning scheme and a representative set of floor plans; subsequently, they demonstrated the importance of optimization based on simulation results. Zawidzki et al. [53] proposed a layout optimization framework that can maximize functionality and aesthetics while minimizing external noise. The proposed framework was applied to an actual case of a 14-room detached house located on an existing building site, and practical results in terms of architectural design were obtained. In this paper, we propose a low-cost behavior acquisition system that facilitates large data acquisition using the most easily accessible smartphone app logs among existing spatial analysis techniques. Using the data obtained, we applied a GA to optimize the room layout.

3 Floor plan optimization system

Our platform analyzes GPS data and app data from a smartphone to optimize the space layout. Our system primarily comprises two systems: (1) a data acquisition and app data integration system and (2) an optimization system. Figure 1 shows the process flowchart of our system. Our system collects the user’s log data and then associates it with the Google app server to label the log. By linking the generated labeling data with the space editor data input by the user, a 2D dataset required for the evolutionary algorithm is constructed. Subsequently, the optimized layout is searched by applying a 2D genetic algorithm.

Fig. 1
figure 1

Process flowchart of system

3.1 Data acquisition and app data linking system

The data acquisition and app data linking system was developed by applying a spatial analysis system developed by us previously [45, 46]. This system is designed to obtain location information from a GPS when an app is used on the smartphone; it records the location values and app category used from the time when the app is launched.

The aim of this study is to generate a layout that is optimized for the movement trajectories and behavior costs of users in an indoor environment. In previous studies pertaining to indoor trajectories, only the movement trajectories of users were regarded as the optimization target. By contrast, the optimization targets in our study include the costs for various daily-life behaviors in an indoor environment. Typical behaviors (e.g., washing dishes and cleaning rooms) in indoor environments are extremely difficult to measure accurately. To detect them automatically, a system comprising cameras and behavior recognition algorithms is required to detect each behavior. This is disadvantageous as it necessitates separate sensors to be installed in personal spaces, and a behavior recognition module specialized for each individual must be developed using information obtained from the sensors.

In recent years, the utilization of terminal devices using the smartphones of users at home has increased significantly. If a spatial analysis system uses smartphone app usage information in addition to the movement trajectory data of the user, then the optimization process will become easier because more accurate behavior information can be obtained at a relatively low cost.

We calculated the objective of optimization based on an approximate behavior cost \(T_t\) instead of using a simple moving distance. We set the following equation as the optimization objective. If \(T_t\) is the total time to complete the task, then it can be calculated as

$$\begin{aligned} T_t = T_a + T_e, \end{aligned}$$

Where \(T_a\) is the trajectory cost (time) required to complete the task. It can be obtained by summing the cumulative length of the sampled points. \(T_e\) is the time required to perform a certain operation using an app. \(T_e\) is calculated as the sum of the basic behavior costs incurred by the smartphone behaviors.

$$\begin{aligned} T_e = \sum _{}^{} \hbox {Time to execute primitive operations} \end{aligned}$$

For these smartphone behaviors, representative app categories were summarized. By 2020, the app categories in the Google Play Store comprised 32 subcategories, and the game category comprised 17 genres. We regrouped the 17 genres to construct eight app categories (information, communication, entertainment, news, education, shopping, finance, and telephone), which we believe are significantly related to real daily life, and recorded the app usage logs at the pertinent time. The GPS location information was sampled every 30 s. An app was recorded as being used only when the app was activated on the full screen, beginning from the launch of the app. Each space index (room number) was generated by space editor. They were entered by the user as input values of a 2D array through a 2D drawing interface on the space layout at a separate top-view point. Subsequently, the location (space) in which a movement trajectory occurred indoors was identified. This editor is developed as a Windows-based application.

Various modeling methods of behavior cost exist in behavior analysis fields [54]. However, an accurate method to model the cost of smartphone behavior does not exist, to our best knowledge. Hence, the cost was defined empirically for each behavior. We assigned a behavior cost with 1 point to each sampling point where no app was used, and 2 points to each sampling point where a certain app belonging to any of the eight app categories was used. The rationale was that the cost would be higher when the smartphone was used regardless of the usage type, compared with when simply moving. We allowed the user to assign a weight to the behavior to be optimized. If the user regards a particular behavior as important, then he/she must increase the weight for that behavior. For example, if a user thinks that the education environment is important and assigns a higher weight to the educational behavior, then a greater cost weight is assigned to the sampling points where educational apps are used. In this situation, the adjustment of the trajectories, on which the educational apps have been used, will exert a more significant effect on the optimization of the system for minimizing the total cost. An example of a simple behavior cost method and its estimated execution time is shown next. In the log example in Table. 1, when \(T_t\) is substituted into Eq. (1), the total cost is calculated as \(T_a\) (2 logs *1 behavior value) + \(T_e\) (1.8 Behavior Cost +1.8 Behavior Cost +1.6 Behavior Cost) = 7.2 Behavior Cost.

Table 1 Behaviors and cost example

3.2 Evolutionary optimization method

3.2.1 2D Optimization modeling

The goal of the proposed system is to identify a furniture/room layout that minimizes the behavior cost of the user in an indoor environment. It is extremely similar to the traveling salesman problem (TSP) in the artificial intelligence domain. The TSP [55] involves identifying the shortest path connecting all N cities, and it is an NP-hard problem, in which the calculation time increases as an exponential function of N. Methods for solving the TSP include neural networks, simulated annealing, and GAs. Among them, the GA is a meta-heuristic algorithm influenced by nature’s evolutionary process and the laws of genetics. In general, GAs identify an optimal solution by (1) defining the population of entities, (2) selecting a process based on fitness, (3) performing crossover for generating offspring, and (4) performing mutation for inducing the generation of new offspring. Tabu search has been applied since the early research stage of GAs, and to date, many solutions have been presented. Among them, GA methods for satisfying the city-visiting-order condition include order crossover [56], cycle crossover [56], partially matched crossover [57], edge recombination [58], the precedence matrix [59], the union operator [60], and Voronoi quantized crossover [61].

Our system uses a 2D genetic algorithm [62] to minimize the trajectories and app usage cost obtained from the user. The 2D genetic algorithm enables the optimal layout to be identified for the optimization goal on a 2D space. First, we created a behavior graph by sampling the app usages and the trajectories obtained from the 3D real-world. Figure 2 shows a behavior graph used in our study. The behavior graph exhibits a data structure that abstracts the complex trajectories of the real world based on the costs of connecting the rooms. In the behavior graph, the behavior cost of each visit based on each room is represented by the value of an edge, and the trajectory records the sequential order of visiting the rooms. As the distance between each room increases, the value of the edge increases because of the difference in the distance. Using our system, we aimed to identify room locations where the total sum of the edges on the behavior graph would be minimized on a 2D space. In general, if the distance between the rooms increases, then the values of \(T_a\) and \(T_e\) increase simultaneously. In particular, because the weight is assigned by app usage for \(T_e\), its value is reflected clearly in the result when the edge includes various smartphone behaviors.

Fig. 2
figure 2

Generation process of behavior graph from trajectories

3.2.2 Chromosome expression

In this study, we discretized a 3D residential space into a 2D grid shape. In the discretized 2D map, each room number is shown as an integer. Each cell can have a maximum value of n depending on the number of rooms. A value of 0 indicates that the point of the layout zone is empty, whereas a different number indicates that a certain object is occupying that space. For a zone in which the user does not intend to place a room, -1 is recorded in the corresponding cells. If the user intends to place a certain room, then an integer of 100 or higher is denoted. The 2D design space is mapped to the parent chromosomes, which are located in a 2D array. Figure 3 shows the chromosome representations used in this study.

Fig. 3
figure 3

Two-dimensional chromosome representation

3.2.3 Mutation

We applied the mutation operator in three methods. In the first method, an arbitrary continuous integer cluster (e.g., room/furniture) entity is selected arbitrarily from the parent. The room/furniture entity is removed from its current location, which is then filled with 0. The selected room entity is shifted to an arbitrary location within the empty space. If it overlaps with another room/furniture after it is shifted, then it is relocated for more than a certain number of times. If it continues to overlap with another room even after multiple times of relocation, then that room/furniture is no longer relocated; instead, another room/furniture is selected to perform the relocation. In the second method, two room/furniture entities are selected randomly and their locations are changed. If a room/furniture entity does not fit in the empty location because of other entities, then it is rearranged by changing the direction. If another entity exists that does not fit in the empty space because of size difference, then a new replaceable location is selected. Third, all room/furniture entities are selected randomly from the parent, and the direction is rotated. The direction can be changed by rotating the entity \(90^{\circ }\) against one of the edges. The purpose of utilizing this type of mutation operator is to attain the global optimal solution rapidly.

3.2.4 Crossover

Two children are generated by mating a randomly selected parent pair with a crossover operator. This operator combines a certain characteristic of Parent 1 and a different characteristic of Parent 2, thereby producing offspring from the parents. When offspring are generated, two parents are randomly selected. Subsequently, the currently placed room/furniture is selected from each parent, and they are combined to generate offspring. If an overlapping area exists when the selected rooms/furniture are combined, then a different combination that does not overlap is selected. If an overlapping area exists after all combinations are selected, then one of the layout plans is selected from the parents. The advantages of using this type of operator for crossover are as follows: first, the efficiency of the algorithm is increased, whereas offspring without defects are not generated; second, the maximum value is inherited from one of the parents. Figure 4 shows the crossover process used in this study.

Fig. 4
figure 4

Example of crossover

3.2.5 Fitness evaluation

The main purpose of the optimization module is to minimize the total time for all behavior costs by adjusting the position of the sample points (Eq. 1). We used \(D_t\) as the objective function for the GA optimization.

$$\begin{aligned} D_t = D_m + D_c, \end{aligned}$$

Here, \(D_m\) is the sum of all behavior costs, and \(D_c\) is the sum of constraint costs. \(D_c\) refers to the condition that must be satisfied in addition to the room layout condition to minimize the behavior cost. It is the satisfaction of various constraints for the room arrangement in an indoor environment. We added the following two constraints. Without these constraints, the optimization may be achieved in a layout form that is difficult to apply in the real world (Fig. 5).

  1. 1.

    Placement constraints: When a room is placed, a zone that the user prefers and one that the user wishes to avoid exist. These zone constraints are added to reduce the size of the search space and increase the efficiency of the GA. The user enters these zones as inputs through a separate painting tool.

  2. 2.

    Adjacent sides: The edges of the rooms placed can be adjacent to each other, and the possible adjacent edges can be attached to each other. This constraint is intended to reflect the fact that rooms are arranged based on walls in most houses. The adjacency information is entered through a separate edge selection tool.

Fig. 5
figure 5

Example of optimization result when constraints are/are not applied

4 Experimental results

We conducted behavior clustering experiments using mobile phones in two indoor buildings, which comprised one-room and three-bedroom structures, separately. These experimental environments were selected to observe the difference in the users’ behavior patterns in indoor environments based on the indoor space size.

Ten participants were recruited for the experiment (one-room apartments: six participants; three-bedroom apartments: four participants). After installing the apps for facilitating data acquisition, the participants performed daily activities for one day. Data were acquired every 30 min. Furthermore, data were collected when the residents were inside the designated indoor spaces. The movement trajectories were classified into two categories: trajectories collected while the apps were not operating, and trajectories collected while an app was operating. After operating an app, data were obtained by defining a transaction as a duration until the app was terminated, or until it shifted to the background.

According to the overall log results, the residents who participated in the experiments used the phone app frequently in their daily life; nevertheless, they also used various apps in extremely short time intervals. The logs that showed app usages constituted approximately 20\(\%\) of the entire position log. The app usage intervals showed that the users used their smartphones once every 10–15 min, indicating that they used the smart devices actively indoors. The logs of one-person room users showed that entertainment, information, and communication apps were used frequently. Meanwhile, the three-bedroom logs showed that shopping, finance, and education apps were used frequently. The difference appeared to be caused by differences in daily-life patterns between single residents and family residents comprising three to four people.

We performed spatial optimization for the single rooms first. Because a single room unit (i.e., a studio apartment) contains no separate room except for a bathroom, the optimization target was the space where the furniture layout was emphasized. The experiment participants specified the locations of certain spaces that were dependent on the furniture (e.g., desk, table, and sofa) and determined the space layout that minimized the behavior cost in the indoor environment. Because the single rooms had no spatial constraint based on walls, the users were able to specify the spaces unrestrictedly.

Figure 6 shows the behavior clustering result for 3 h beginning from 7:00 p.m. for a single room. In this study, the one-room apartment houses a one-person user who lives alone. During the three hours, clustering occurred primarily at the bed (blue), table (cyan), and sofa (pink). These log records appeared to correspond to dinner or resting activities after work. The logs obtained indicate that the user frequently used entertainment apps in bed or at the table, and communication apps on the sofa. Overall, the behavior analysis results showed that the frequency of using entertainment apps in bed was the highest, followed by on the sofa. When the optimization algorithm was applied to these three pieces of furniture, the sofa was placed between the bed and table in the result. For the result, an adjacency constraint was assigned at four directions for each piece of furniture. The optimization result was a layout that aimed to minimize the sofa–table and sofa–bed distances such that the cost at the latter, where most activities occurred, would be reduced. The experimental result shows that the proposed system can be applied effectively for furniture layouts in indoor spaces.

Fig. 6
figure 6

Space layout of single-room apartment based on clustering results in indoor space of single-room. Movement trajectories classified by app category (color): none, i.e., no app was used (blue); information (pink); communication (cyan); entertainment (yellow); news (red); education (green); shopping (purple); finance (gold); and telephone (white) (color figure online)

Figure 7 shows the spatial optimization result for the single-room apartment of another participant. Similar to the first single-room apartment, because no separate room existed except for the bathroom, the space designated arbitrarily by the participant was assumed to be a virtual independent space. The behavioral data of this particular participant were collected for 6 h on a weekend afternoon.

During the period, clustering occurred primarily at the study desk (blue), sofa (green), and hobby table (red). The participant used education-related apps primarily at the study desk and entertainment apps on the sofa; meanwhile, activities pertaining to phone calls were performed at the hobby table. In addition to the abovementioned pieces of furniture, clustering based on phone calls was observed at the upper left corner and suggested that the related activities were performed in a sitting or lying posture on the floor instead of on a furniture. Overall, the highest behavior cost was incurred at the table.

When the optimization algorithm was applied to these three pieces of furniture, the hobby table and the study desk were placed adjacent to each other in the result. For the result, adjacency constraints were assigned to the study desk and hobby table for the four sides inside the room. Consequently, the locations were searched to minimize the distance between these two pieces of furniture while placing them adjacent to the exterior of the house. Additionally, we specified the user’s preferred sofa location at the center of the room; consequently, the sofa was relocated to a location close to the center zone. The experimental result shows that the proposed system can identify the optimal location while satisfying the user’s preference.

Fig. 7
figure 7

Space layout in single-room apartment based on clustering result in indoor space of single room

Figure 8 shows the optimization result for four spaces in a three-bedroom apartment. The data obtained were a set of behavioral data of four persons for 3 h beginning from 7:00 p.m. The three-bedroom apartment comprised users of a four-person household. The optimization targets were the following four spaces: (1) a large room for the parents (Room \(\#1\): blue), (2) a bathroom (green), (3) a room for child 1 (Room \(\#2\): red), and (4) a room for child 2 (Room \(\#3\): dark green). Based on these rooms, the movement trajectories were classified. The living room space was not specified as a separate room to avail the spaces that can be assigned to the four spaces. Unlike the single-room apartment, the three-bedroom apartment indicated more distinct space characteristics since the spaces were partitioned.

The logs of the movement trajectory showed that the experiment participants performed activities in and around their respective rooms. The occupants of Room 1 primarily used finance apps, whereas the occupants of Rooms 2 and 3 primarily used entertainment and news apps. Various apps were used in the living room space, and they were primarily used on the sofa in the living room. The overall behavior patterns showed that the participants performed their objective behaviors in their respective rooms preferentially and engaged in activities in the living room at other times. It was peculiar that the bathroom at the bottom included lines connected to all other rooms, and it was marked as the most frequently visited space.

Figure 8d shows the result of applying the optimization algorithm to the four spaces. Whereas the remaining three rooms maintained their current positions, Room 3 (dark green), which was detached, moved to a position adjacent to Room 2 (red). Here, the room was rotated by \(90^{\circ }\). It appeared that the system has suggested a layout in which all living spaces are concentrated around the bathroom, which is the most frequently visited space in general. In particular, by rotating the most distant room, i.e., Room 3, the rooms were concentrated to the maximum to minimize the total behavior costs of four persons living in the apartment. The experimental result shows that the proposed system can be applied effectively for room layouts as well.

Fig. 8
figure 8

Space layout in three-bedroom apartment based on clustering result in indoor space

Table. 2 shows the behavior cost reduction effect after optimization was performed in each experiment. The overall behavior cost reduction was 20–30% when the proposed optimization was applied. The overall optimization results showed layouts in which spatial components with many back-and-forth movements of the users were concentrated. These layouts may differ from the intention of the building designer who wishes to protect the independence of the spaces; however, they are the most effective layouts in terms of the total behavior cost. Our system shows that realistically applicable floor plans can be created by adding adjacency constraints and conditions for the preferred and/or to-be-avoided spatial arrangements, which reflect the design intention of the user partially.

Table 2 Evaluation Result

5 Conclusion

We proposed an optimization method for indoor element layouts using smartphone multimodal data and a 2D GA. The proposed method differs from conventional methods in that the usage data of smartphones, which are increasingly used indoors recently, were added to the behavior cost minimization factors in addition to the traditional movement trajectory analysis. Using our method, the details of spatial usage can be analyzed easily because the users participated in the experiment by carrying their mobile phones in the typical manner in indoor environments. Furthermore, our method can suggest the optimal layout for furniture, rooms, and interior elements that are placed indoors. Our methodology satisfies the necessary constraints in room layout but does not reflect various situations that must be considered in the actual design (e.g., privacy independence between rooms and perspective issues). In future research, we would like to add more such detailed conditions. Our results provide designers with semantic information necessitated for currently used spaces when they design an interior space or reconstruct a building, thereby facilitating the design of spaces that are more specific to the behavior patterns of users.