Consistency of Criteria in Building Interiors through the Analytic Hierarchy Process for Simulation of Feasible Evacuation Routes

Disasters can happen anytime in urban areas, forcing people to evacuate buildings to safeguard their lives. Therefore, it is important that safe routes for the transit of people are first identified. However, when defining evacuation routes to safer places, the basic condition considered is the shortest distance, excluding other criteria related to the security of environmental elements. We propose the simulation of feasible evacuation routes under the influence of importance indexes obtained from the validation and consistency of the security criteria of building elements performed by the analytical hierarchy process (AHP). We find that the security criteria of building elements can be classified into ranges of a suitability model and validated in comparison matrices with consistency ratios (CR) < 10%, which guarantee data consistency. Furthermore, we obtain the importance indices S(n) interpreted by a variant of the A-star (A*) pathfinding algorithm, showing evacuation routes traced through safe areas, when performing simulations. Our results demonstrate the importance of the consistency of security criteria employed in the AHP, whose indexes highly influence the execution of the variant of the A* pathfinding algorithm when it determines safer rather than shorter evacuation routes, for different simulation scenarios.


Introduction
Over the last few decades, trends in the construction and design of buildings have become more complex and specialized in order to provide greater comfort and better services to citizens. All structures must be able to cope with natural hazards that can affect vulnerable people. Therefore, when emergency activities are performed inside buildings, it is important that evacuation routes are first identified.
Different methods have been applied in previous studies to calculate evacuation routes using the building geometric data and pathfinding algorithms. Karas et al. introduced a mathematical model for the processing and registering of the building topology in a geodatabase, and calculated the shortest route using the Dijkstra algorithm. (1) Deng showed a tool for data exchange between the Building Information Modeling (BIM) and Geographic Information System (GIS) platforms. (2) Hart et al. proposed the A-star (A*) algorithm, which incorporates heuristic data in the solution of mathematical problems. (3) Lu presented the advantages of the A* algorithm over linear programming algorithms. (4) Applications of A* algorithm effectiveness in the simulation of evacuation routes were performed in the works of Xu and Doren (5) and Yoo et al. (6) However, the basic criterion used for the calculation of evacuation routes is the shortest distance to the exit point of the study area, without going into detail about the security and vulnerability conditions of the structural and nonstructural elements of the environment.
In this study, we propose the calculation of feasible and safer evacuation routes for different simulation scenarios, which are prioritized on the basis of consistent data about the security criteria of building elements and validated by the analytical hierarchy process (AHP). The data on the design, location, and functionality of the structural and nonstructural elements in a building are organized in the BIM. Subsequently, through the application of the AHP, the data are prioritized and assessed for all selected criteria: size, walkability, materials, vulnerability, and facilities. Importance indexes [S(n)] are assigned to the elements and inserted as heuristic data in a variant of the A* pathfinding algorithm. The algorithm processes them together with the simplified geometry taken from the BIM and calculates the most feasible evacuation routes for simulation scenarios according to the classification of people in terms of their physical conditions and age.
In experimental results, the methodology is applied in a study case to validate the importance of the AHP in the data consistency used by the variant of the A* pathfinding algorithm. The algorithm prioritizes the routes on the basis of the importance indexes of the consistent criteria and calculates the times, distances, and safest evacuation routes.

Methodology
In this study, the geometric data from the BIM are processed and the consistency of their attributes is analyzed through the AHP in order to assign S(n) in the safety criteria of building interiors. The indexes are added into a variant of the A* pathfinding algorithm to generate modified evacuation routes, and these results are obtained for different simulation scenarios. The methodology is shown in Fig. 1. In addition, the evacuation time and distance are calculated to validate the feasibility of the routes proposed by the variant A* pathfinding algorithm.

Geometric data processing
The BIM is designed to define the internal conditions of the building. The data of the materials used in the construction, the location of the structural and nonstructural elements, distances, areas, sizes, and the use of spaces are stored. The Industry Foundation Classes (IFC) standards shown in Table 1 are applied so that the BIM data can be understood and organized clearly and precisely. (7) Using the location data (coordinate pairs) of the building elements, the information is reconstructed in a simple polygon-based geometry. The flowchart shown in Fig. 2 details the pseudocode used to obtain the simplified geometry stored in the geodatabase, where "vector" is the selected feature; n is the node; xn, yn are the coordinate pair of the node; Mn and Ma are the matrices of the geometric and attribute data, respectively, and st is the spatial table. Each element preserves the spatial reference of its nodes and edges, as well as the link to its attribute table. The database is classified into two groups. The nonspatial tables contain the elements used to define conditions for the allocation of weights by the AHP. The spatial tables add the G_GEO_COL column (geometric data) as a consecutive set of coordinate pairs registered in the hexadecimal system. The relational model is generated through the data dictionary standards described in Table 2.

Consistency of criteria and prioritization
The AHP is a multicriteria decision making method applied to guarantee consistency between groups of considered criteria. (8,9) The scheme of the AHP is shown in Fig. 3. The  AHP assigns prioritization values, weight factors, and importance indexes to the conditions inside the buildings by comparison among them. This method assesses the priority of every criterion to classify the criteria into groups through a suitability model. Since the distribution of the building facilities and the security conditions are analyzed, five criteria are considered: the width of the areas (Cri 1 ), restrictions   on walking (Cri 2 ), floor materials (Cri 3 ), the vulnerability of nonstructural elements (Cri 4 ), and the availability of facilities (Cri 5 ). Each criterion is divided into five suitability levels and priority values are assigned to it. For criterion Cri 1 , following the Standards of Accessible Design, proposed by the Americans with Disabilities Act (ADA) of the United States, (10) the wider corridors and rooms receive the highest priority. For criterion Cri 2 , it has been assumed that the rooms with electrical power supply equipment have the strongest restrictions on walking, so they will receive the lowest priorities. This classification is based on the Building Vulnerability Assessment Checklist of the Federal Emergency Management Agency (FEMA) of the United States. (11) For criterion Cri 3 , areas with a stable and flat surface are prioritized because they are more accessible for the walking of diverse groups of people. (10) For criterion Cri 4 , the vulnerability is divided into levels depending on the use of each room and its exposure to hazardous materials. (11) For criterion Cri 5 , the areas with facilities for the elderly have the highest priority because they support their movement. (10) The relationship between the classification and its score is inverse because the A* pathfinding algorithm prioritizes the minimum values in its equation.
The AHP also defines weight factors for multiple criteria by comparing them in pair groups. (12) The method classifies the comparison of conditions in the scale of relative importance (8) shown in Table 3. The scale is divided into nine groups on the basis of scored classifications and subdivided into 17 levels, where "1/9" represents the lowest level of importance when comparing two criteria, while "9" on the opposite side represents the highest level of importance when comparing them.
The matrix of comparison, which has reciprocal values, is processed to obtain scored classifications. Only when the values are compared with themselves will the score be of 1, being uniform. (13) To define the consistency of the values, the AHP calculates a normalized comparison matrix and more variables. The eigenvector or weight factor (w) is the average of the weights for each criterion in the comparison matrix. The eigenvalue (Amax) is calculated as the product of the normalized comparison matrix and the matrix (w). The consistency index (CI) is the result of the average (Amax − nu)/(nu − 1). "nu" represents the number of assessed criteria. After dividing CI by the random consistency index (RI), the consistency ratio (CR) is obtained. Table 4 shows the values of RI. (9) For satisfactory data consistency, CR must be less than 10%; if it is higher, the method will have no significant effect on the results. (9) After obtaining the results of pair comparisons, the weight factors are calculated and the consistency of the results is validated. Every criterion is represented as a layer and rasterized to obtain a set of grids. The geometric elements store the prioritization values in their attribute table based on the level of suitability for each criterion. The weighted linear combination (WLC) multiplies the prioritization values of the cells by the weight factor assigned to the corresponding criterion. Then, it adds the result of each layer to determine S(n) as the final result. The WLC model is described by Eq. (1), where S(n) is the importance index for every cell n, w (n,i) is the weight factor of criterion i for every pixel n, and x (n,i) is the prioritization value of criterion i for every pixel n. (1)

Pathfinding algorithm and simulation scenarios
A variant of the A* pathfinding algorithm was developed as reported in this subsection. The A* pathfinding algorithm shown in Eq. (2) expands nodes on the basis of their heuristic value and associates a cost function with a node. In the variant, the algorithm takes S(n) as an additional condition of the heuristic data to determine routes by different simulation scenarios. (14) Therefore, Eq. (1) is added to Eq. (2), resulting in the variant of the A* pathfinding algorithm given by Eq. (3), where g(n) is the cost of the path, usually the length between the start node and node n, and h(n) is the heuristic data provided by the user about the cost of traveling from node n to the end node.
The variant of the A* pathfinding algorithm is executed on the basis of the flowchart shown in Fig. 4, where stn is the start node, cnd is the current node, end is the end node, S(n) is the importance index, im is the matrix of the importance index, chil is the group of adjacent nodes to the current node, chi is the selected adjacent node to the current node, ol is the open list, cl is the closed list, d is the distance, and t is the time.
Three simulation scenarios to obtain evacuation routes have been classified on the basis of groups of people by health and age. Likewise, the initial conditions of the cells for the calculation of the simulations are defined as follows: • Each cell contains two basic special markers: blocked and free. Blocked cells with 0 values will be constant in all simulations because they represent the structural and fixed nonstructural elements of the floor. The evacuation routes cannot cross those areas but can cross the connections where the doors are located. Free cells have diverse classifications from 1 to 5 based on the conditions assessed by the AHP. • Four start points and two end points with fixed locations are defined. The start cells indicate the position of the pedestrian in the scenario. The end cells define the location of the exit door. All the possible combinations between start and end points will be covered to compare the results of the evacuation route simulations. • All the cells are assumed to be homogeneous and isotropic. The resolution of the grid and the speed of movement of people are also variables defined to calculate the distance and evacuation time in different simulation scenarios. To obtain the resolution, the area is divided into cells of 20 × 20 cm 2 , which represents the average width of the walls in a building (marked as blocked areas), and is less than the average space that a person can occupy in a dense crowd, (15) which is 40 × 40 cm 2 . The distance between two adjacent pixels is classified into two types: d 1 = horizontal/vertical distance and d 2 = diagonal distance. d 1 is the size of the pixel and d 2 is calculated using the Pythagoras theorem. The speed of movement is classified in two groups, namely sp 1 = 1.34 m/s is the speed of people in a healthy physical condition and sp 2 = 0.6 m/s is the speed of the elderly group from 55 to 80 years old, to allow for the fact that older people may require more time to mobilize. (16) The time is calculated using the equation of motion shown in Eq. (4), and the total evacuation time is the result of adding all the times between one cell and the following cells located along the proposed route. Equation (5) gives the evacuation time et, where t is the time to move from one cell to the neighbor cell, x is the distance between one cell to the neighbor cell, y is the speed according to the group of people, and n is the number of cells in the evacuation route. Finally, by applying the variant of the A* pathfinding algorithm that considers the AHP, the most feasible evacuation routes and evacuation times are obtained for the different simulation scenarios.

Software architecture
To develop the methodology including the simplification of the geometric data, the programming of the variant of the A* pathfinding algorithm, and the simulation of the evacuation routes, we used a group of open source software programs that are free for educational purposes. The architecture for the processing in every stage of the methodology is shown in Fig. 5.
The processing of the initial geometric data and its organization into a BIM were performed using Revit software, which is specialized in the analysis of structural elements in the construction field. The building's geometry was simplified through Revit Application Programming Interface (Revit API). The spatial database was designed and implemented using the PostgreSQL management system. The PostGIS extension can support data tables, enabling the geometry to be simplified. Python was the software used for the application of the AHP to guarantee consistency between criteria and process the WLC to calculate S(n). The variant A* pathfinding algorithm executed to simulate evacuation routes and calculate the time and distance in different scenarios was also developed in Python. Finally, the graphical results were visualized through AutoCAD software.

Development and storage of building interior geometry
A BIM design of an office floor with dimensions of 40 × 24 m 2 is shown in Fig. 6. The stored structural data are those of the walls, columns, and doors. In the nonstructural data, pieces of furniture with a fixed location are grouped. The doors are assumed to be unlocked and can be opened freely if a route passes through the doors. There are wide corridors that have a handrail to assist the elderly, and there are also narrow corridors without such facilities. The distribution and main conditions of the spaces are detailed in Table 5.
Through the execution of the algorithm to simplify the geometric data, the vectors along with their attribute tables are stored under the summarized logical model of the spatial database shown in Fig. 7. The spatial and nonspatial tables are also described in Table 6.
On the basis of the location, the distance from the exit doors, and the use of spaces, four start points (A1 to A4) and two end points (B1 and B2) are selected to simulate the feasible evacuation routes. A1 and A2 are located in the main office of the lower left corner on the map; this office has two doors with different paths. A3 is located in the cafeteria in the lower right corner of the map, whereas A4 is in the small meeting room located at the bottom of the map. B1 and B2 are the main and back doors in the top and upper right of the map, respectively. Figure 8 displays the locations of the selected start and end points in perspective views.

Assessment of the consistency of criteria
The suitability model resulting from classifying every criterion associated with safety conditions is detailed in Table 7. The "Very Suitable" score is assigned with the priority value 1, whereas the "Largely Unsuitable" score is given the priority value 5.
To apply the comparison matrices allocating the weight factors to the criteria, the scenario variables detailed in the methodology section are considered. Tables 8 and 9 show the calculations of the paired matrix between the five criteria for different requirements in every scenario. Using RI = 1.12, the results of the CR for Tables 8 and 9 are 2.8 and 5.2%, respectively, which are acceptable for setting the consistency between the criteria.
After the rasterization of the criteria as layers, the weight factors also are calculated for each subcriterion of every criterion and they are classified under suitability model levels.
The graphical results are shown in Fig. 9. S(n) achieved from the execution of the WLC is distributed by areas for each scenario, as shown in Fig. 10.

Simulations of feasible evacuation routes
The simulations of scenarios and evacuation routes are performed. In the case of SM1, the conventional A* algorithm is used. For SM2 and SM3, the variant of the A* pathfinding algorithm that includes S(n) in its calculations is executed. The graphical areas of S(n) overlap with the simulations of the evacuation routes, traced in red lines, for every combination from the start points to the end points, and the results are shown in Fig. 11.    In the case of SM1, the shortest proposed evacuation routes given by the conventional A* algorithm are generated along the walkable area from the start point to the end point without considering any additional criteria and avoiding the blocked cells. However, most of these routes would be unfeasible for search and rescue activities. For example, routes A2-B1, A2-B2, A3-B1, A4-B1, and A4-B2 cross offices and move between furniture and high-voltage electrical equipment without restrictions. Furthermore, instead of choosing wider corridors, routes A1-B1 and A1-B2 go through narrow corridors located close to the electricity control rooms, making them highly vulnerable routes.
In the cases of SM2 and SM3, the evacuation routes proposed by the developed variant of the A* pathfinding algorithm follow the areas of highest priority owing to the influence of S(n). Therefore, they always pass through corridors and do not cross offices or vulnerable places, which mean that they are safer routes than those proposed by SM1. SM2 produces the safest feasible evacuation routes for people in a healthy condition. In the case of SM3, the evacuation routes are longer than those in SM2, because the priority criteria are closely related to the location of facilities enabling the movement of the elderly; therefore, the areas without facilities are not selected.
In addition, using Eqs. (4) and (5), the evacuation time and distance for all the combinations of start and end points in SM1, SM2, and SM3 are calculated with the assumption that the average speed of the evacuee in every group is constant. The results are shown in Table 10.
For the group in a healthy condition, using sp 1 , the results of SM1 (without any criteria) and SM2 (based on the group criteria) are compared. In most cases, the evacuation times of SM1 are 1-3 s less than those of SM2; however, the routes of SM2 are the safest. Because the time difference is short, the SM2 route can be selected as the most feasible. In the case of the elderly group, using sp 2 , a comparison is performed between the results of SM2 (which does not have the required facilities to enable mobility and the assistance of another person would be essential) and SM3 (which has the facilities to enable the movement of this group). For three of the simulation results (A3-B1, A3-B2, and A4-B1), the evacuation times of SM2 and SM3 are the same because the routes in both simulations do not change. However, in the remaining five simulation results, where the routes are different, those of SM3 take up to 6 s longer than those of SM2. This is due to the fact that areas with the facilities prioritized by SM3 are not always located on direct routes. Therefore, for the elderly group, the decision of the feasible evacuation route must involve choosing between a short and safe route but without facilities on the way, generated by SM2, or a longer route that is also safe but with facilities, generated by SM3.
In most scenarios, the evacuation routes based on the influence of S(n) are not the shortest in distance; however, the results prove that all the routes are the safest, and this is a critical factor in safeguarding the lives of vulnerable people. Although in our case study, the time difference between the shortest and safest route is less than 3 s, in buildings with wider floors, this difference will increase proportionally; therefore, decision makers should carefully select either the shortest route when a quick evacuation is required or the safest route when time is not a primary factor and evacuation can be performed more safely.
In future research, simulation tests should be performed in curved and not flat spaces, and include connections between two or more floors. The addition of slopes and winding areas will provide more realistic study cases based on current building design trends. Likewise, the capture of building data with advanced devices such as 3D scanners will give greater reliability in the location, size, and shape of the geometric elements, making it easier to adjust the precision of the results.

Conclusions
In this paper, we proposed a methodology for calculating feasible evacuation routes inside a building, applying the AHP to guarantee data consistency based on safety and vulnerability criteria and assign weights to the structural and nonstructural elements of the building. We divided the methodology into three stages. In the first stage, we organized the building data in a BIM following IFC standards and stored the data in a spatial database. In the second stage, using the AHP to guarantee the consistency of data associated with size, walkability, materials, vulnerability, and facilities, we calculated importance indexes for the simplified geometry. In the last stage, using a variant of the A* pathfinding algorithm, which can process the results of the AHP, we obtained feasible evacuation routes for diverse simulation scenarios.
In the experimental results, we applied the methodology in a study case for evacuation in an office floor and calculated the routes from four start points to two end points in three simulation scenarios. In the first one, SM1, the conventional A* algorithm was applied without imposing any conditions. In the second one, SM2, a variant of the A* pathfinding algorithm that considers the results of the AHP related to a group of people in a healthy condition was applied. In the third one, SM3, the variant of the A* pathfinding algorithm was also applied, but the conditions of the AHP linked to the location of facilities for the elderly were considered.
The simulation scenarios revealed that the consistency criteria analyzed by the AHP have a strong influence on the calculation of feasible evacuation routes by the variant of the A* pathfinding algorithm. The algorithm prioritizes the routes based on S(n) and modifies the evacuation routes in every simulation scenario. SM1 produces the shortest routes but they cross vulnerable places. In SM2, owing to the influence of S(n), the evacuation routes follow the areas of the highest priority for healthy people. Therefore, they pass through corridors and do not cross vulnerable places, which mean that they are safer routes for evacuation than those obtained with SM1. In the case of SM3, the routes are longer than in the other simulations because S(n) is linked to the location of facilities for the mobility of elderly people; thus, these routes are the safest and most feasible for this group of people. The results of the study are important for decision makers, because they will be able to select feasible and safer evacuation routes on the basis of consistent criteria for search, rescue, and evacuation activities inside buildings.