Indoor guided evacuation: TIN for graph generation and crowd evacuation

ABSTRACT This paper presents two complementary methods: an approach to compute a network data-set for indoor space of a building by using its two-dimensional (2D) floor plans and limited semantic information, combined with an optimal crowd evacuation method. The approach includes three steps: (1) generate critical points in the space, (2) connect neighbour points to build up the network, and then (3) run the optimal algorithm for optimal crowd evacuation from a room to the exit gates of the building. Triangulated Irregular Network (TIN) is used in the first two steps. The optimal evacuation crowd is not based on the nearest evacuation gate for a person but relies on optimal sorting of the waiting lists at each gate of the room to be evacuated. As an example case, a rectangular room with 52 persons with two gates is evacuated in 102 elementary interval times (one interval corresponds to the time for one step for normal velocity walking), whereas it would have been evacuated in not less than 167 elementary steps. The procedure for generating the customized network involves the use of 2D floor plans of a building and some common Geographic Information System (GIS) functions. This method combined with the optimal sorting lists will be helpful for guiding crowd evacuation during any emergency.


Introduction
Navigation is an old topic in geography: one of the most useful applications of maps has always been the tracking of paths from one location to another and storing the routes. Nowadays, with digitized maps, outdoor routing analysis is simpler than it once was. As one of the fastest growing Geographic Information System (GIS) areas, indoor GIS is booming because of the rapid development of threedimensional (3D) technology and increased demands from industries, and those industries include but not limited to robotics, architecture, and city management. The applications such as detection of assets and dynamic evacuation planning in an indoor space are showing the value of indoor GIS analysis. Research works regarding navigation in indoor environment is one of the fundamental studies in this area. However, considering the complexity of indoor environments, indoor navigation is never an easy job. GIS researchers face a bunch of challenges such as lack of complete building data, low accuracy of indoor positioning, and inhomogeneity of path generation. Among those challenges, path generation is the base for navigation. In most cases, a path network data-set is required before performing any kind of network analysis in GIS. This data-set is not usually a concern for outdoor GIS analysis since road data already carries basic information about the paths and, therefore, could be easily retrieved as a polyline layer. On the other hand, for indoor environments, 2D/ 3D building data do not have the path feature embedded as a polyline layer; the lack of network data-set impedes the further GIS analysis in indoor environment. Therefore, in order to support indoor navigation and routing analysis for indoor GIS, there is a demand in both GIS and architecture field for simple and effective methods of generating the path network data-set for architectural plans.
The proposed solution in this paper was to develop an executable and automatic method that could generate the indoor path network for architectural floor plans. This suggested method is based on the Triangulated Irregular Network (TIN), and it is designed to both increase the efficiency of data usage and decrease the difficulty of generating process. This paper sought to (1) effectively generate the network by using algorithms based on 2D floor plan drawings (CAD); and (2) discover a path generation method for 2D floor plan using common GIS functions. By creating the method and workflows in GIS, readers would be able to use them as guidelines and adapt them for other buildings. The scope consisted of a detailed description of the workflow on generating path network data-sets for 2D floor plans and an example of applying it.
Furthermore, the case of a room (rectangular room) with a given number of persons (99) to be evacuated during an emergency is considered as an application example. Several researchers have investigated the crowd evacuation topics (Kirchner et al. 2003;P'ecol et al. 2010;Karamouzas et al. 2014). For instance, cellular automata, social forces, and ant colony models are widely used (Blue & Adler 2001;Burstedde et al. 2001;Alonso-Ayuso et al. 2014;Chang & Liao 2015). However, the time for optimal evacuation is not provided by these methods. In case of emergency, the shortest evacuation duration is a key issue. A new algorithm which aims to minimize the evacuation duration time proposed in this paper, is coupled with the indoor generated path network in order to optimize the complete evacuation from the room first and the external exit gates of the building finally.

Literature review
Indoor navigations were dealt and studied by several researchers within the last few years. It is obvious that, indoor navigations can be divided into two categories: (1) geometrical and (2) graphical. However, the graph-based models were improved through integrating semantics with the model. The difference between geometrical and graphical is in the level of accuracy, where the geometrical is more accurate due to utilizing quantitative methods in determining geometric path, while graphical methods use topology of premises for planning of the paths in navigation. Franz et al. (2005) showed the comparison among various graphical models for indoor navigation, whereas Afyouni et al. (2012) presented a survey for indoor space models. Lee (2004) generated a geometric network model based on algorithm that he was previously developed, called straight medial axis transformation (S-MAT), one of the major shortcomings in this algorithm is that, it generated many redundant nodes and edges. Moreover, Lee et al. (2007) used grid map method as a geometrical based method to determine the geometric path. Stoffel et al. (2007Stoffel et al. ( , 2008) established a hierarchical model for indoor space navigation and developed a graph depending on hierarchical graph concept, in addition to that they proposed algorithm to create a multilevel hierarchy based on floor plans, and represented the corridors as single nodes. This proposed method does not depend on a semantic data, and it depends on geometrical model, because the boundary nodes that connect polygons together do not have any semantic information.
Furthermore, the method cannot be able to use when obstacles exist in the room, and when the shapes of corridors are irregular. Meijers et al. (2005) described a graph model based on dividing a whole space of buildings into smaller parts called sections. The model involves a semantic description and embedding geometric to enhance accuracy in route planning. Tsetsos et al. (2005) developed a navigation system based on both geometrical and graphical representations. The system regarded the perceptual and physical characteristics of the user and the semantic rules in identifying the path plan for the user. Yang and Worboys (2015) pointed out the importance of semantic models in generating intelligent plans; they proposed a comprehensive approach for creating indoor navigation graph, the approach based on utilizing formal combinatorial map, to provide description for the topology and connectivity of the indoor structure, also the approach based on emerging geometric and semantic data. Other researchers utilize 3D building models in producing navigation graph. Groger and Pl€ u mer (2010) developed a step forward graph method for route planning: the graph is created based on the rules of grammar and constraints and not directly from 3D semantic buildings. Lertlakkhanakul et al. (2009) used building information modelling (BIM) to produce routes. In this model, building was established using 'GongTown' model that is a BIM modeller. Choi et al. (2007) indicated that the structural floor plan of the building was used too in this model. Moreover, the space graph was generated through representing building components like doors, spaces, and windows as a node, whereas connections between spaces were represented by a link. The space topology graph, distance, and attributes of building components like windows and doors were considered in performing way finding. Moreover, this method was able to overcome and solve the problem of existing obstacles and concave spaces through dividing the space. The graph was created through representing each subspace and each edge between subspaces by nodes. Once the nodes were generated, all doors are connected to the closest subspace node to develop the navigation routes. However, there are common international standards that were used for facilitating building indoor navigation and support geometric and semantic representation and visualization like IFC and CityGML, the space in these standards was divided into well-known parts.
Borovikov (2011) used a Delaunay triangulations (DTs) concept in developing navigation graph. There is approximately duality relationship between navigation network and indoor structure, where triangulation dual constitutes a basis of the graph that was simplified by eliminating the obstacles represented by edges traversing the structure such as walls. The work in this research is similar to that performed by Borovikov (2011) in (1) dividing space in a floor; (2) and in creating connections using the centre of triangle. Even though the existing of similarities, the work in this research is advanced and differentiated in (1) utilizing additional internal sub-networks through considering the centre point of the edges, (2) the proposed method is definitely faster due to considering less critical points, and (3) generating TIN and removing intersecting edges with walls which in turn facilitate nodes connecting. All of these give strengthening to the proposed model. However, it is very crucial to apply and develop the method considering 2D data, since most of building drawings are in two dimensions.

Method and workflow
This section explains in detail on how to achieve the proposed TIN method, which is an efficient new way for generating the indoor network data-set. Two TINs were generated using this approach. The first applied the room vertices as nodes and the walls as critical edges to split the floor space. The second used the centre points of the first TIN triangles, the centre points of the first TIN edges that are not on the walls, and door points as nodes to create the base path network for the floor. Finally, the base path network became a serviceable network after selecting all edges that are completely within the rooms' space or removing the intersection edges with walls. The macro design for the TIN was to generate a 2D network data-set for each floor and integrate them together with the stair/elevator connections as a 3D network data-set for the building. The algorithm is as follows: V is the set of all vertices of walls P W is the set of all vertices of walls V D is the set of all doors in form of points P D is the set of all doors' space in form of polygons or polylines P R is the set of all rooms' space in form of polygons G is the set of all 2D floor plans in a building, N G is the total number of floors S is the set of all stairs/elevators in form of points in a building L is the set for holding the floor connections, it is a polyline data-set Ã Note: 1. All input features have the height value and are 3D features.
2. All the sets are the collection of features on the same 2D floor plane except G and S For each building: Set N is the indoor network data-set for this building The graphic explanation is also provided in figure 1

Proof for completeness
The existing methods that involve TIN often have the problem of dealing with narrow Z-shaped hallways; paths that include the corners are difficult to dealing with. Since the traditional methods do not have the ability to generate enough critical points in the corner areas, therefore, error may occur when applying these methods. In order to solve the narrow Z-shaped hallway problem in the TIN approach, the centre points of the first TIN edges that were not on the walls were included as part of the nodes in the final network. This section gives a proof on why these centre points (e n ) should be part of the node set.
Proof: e n is required for describing any movements on S without using w n (points on the wall) Let A be the floor plane, C represents the set of all points on the plane. Let W be the set of points on the wall and S be the set of points on the open space, then, C D W [ S after forming the 1st TIN Let T be the set contains all the points in the TIN triangles, Let E be the set contains all the points on the TIN edges but not in W, then, T [ E D S Let t n 2T, e n 2E, w n 2W, n2I, I D {1, 2, 3, ... } Then, without using w n , travelling on S is the movement from t i to t j , or the movement from t n to e n , or the movement from e i to e j , i 6 ¼ j Case 1: t i and t j are in the same triangle Case 2: t i and t j are in different triangles So, after abstract each triangle as one point, Case 1 no longer exits. t i and t j snap to the centre points of the triangles. Considering Case 2, since t i and t j are surrounded by e n , e n has to participate in the travelling process. The movement from t n to e n and the movement from e i to e j each contains at least one e n Therefore, e n is required for describing any movements on S without using w n 4. Implementation

Data preparation
ArcGIS is a good platform for performing outdoor network analysis, a path network data-set is always required before running the analysis. As opposed to outdoor GIS, indoor building data files as CAD/BIMs do not have such data-set. Therefore, it is necessary to generate the path network data-set for CAD/BIMs in ArcGIS. The BIM data used in this paper is in the IFC format; therefore, in order to work with BIM data in ArcGIS, transferring file is required. The Data Interoperability extension in ArcGIS provides the ability to import BIM to ArcGIS (from IFC to a file geodatabase). The IFC architectural model contains two kinds of information: geometric and semantic. The geometric branch is the 3D representation of the building components and the semantic branch explains the relationships between these components. For this paper, the automatic transaction process is used to provide data for path generation. Its general purpose was to simplify the process while still maintaining the critical components. Further data editing and preparation were required before the implementation. BIM data are an excellent source for construction and management, but in order to use them efficiently for 2D path generation, critical components like doors and stairs have to be transferred into spatial points in advance. At the same time, new spatial points inherit attributes from their original multipath features. CAD data are much easier to dealing with, since it already contains doors, walls, and rooms in forms of points, polylines, and polygons; however, they still need validates for errors.

Routing result
In ArcGIS 10 and later versions, ESRI provides a tool to calculate the shortest path between two locations in the network data-set (ArcTutor/Network Analyst/Workflow/3DRouting). This method can be used to generate a path network for each floor. However, stair connections tend to compromise floor linkage. In order to perform sharper analysis and attain usable results for multi-storey buildings, further adjustments were needed for generating correct geometric connections between floor planes.
The graphic representation of the implementation for CAD is shown in figure 2: (a) the input CAD drawing, (b) dividing space according to its geometry criticality, and (c) generating the critical points in space. After operating the scripts, figure 2(d) serves as the final 'road' for this 2D floor plan. The shortest path from one point to another is shown in figure 2(e) as a highlighted line on the 2D floor plan.
For BIM data, the shortest path between two locations is added to the graph as a 3D tube in figure 3(a). The 3D elements inside the room could also be considered in the path generation process by treating their footprints as untouchable spaces. As figure 3 shows, this example is (b) taking small 3D elements into consideration of available paths and then generated the network dataset by  following the same step in Section 3, and (c) select the beginning and ending points, the available path is calculated and shown in (d).

Optimal crowd evacuation: guided evacuation algorithm
When dealing with crowd evacuation, various behaviour models can be adopted for the persons present in a room that should be evacuated. Models based on social forces (attraction, repulsion, and interaction between persons and obstacles, as well as cellular automata (motion from a busy cell in a grid towards the empty neighbour cells and conflicts solution when several persons head to the same target cell) have been widely investigated (Ren et al. 2008;Helbing et al. 2002;Pourrahmani et al. 2015;Shen et al. 2015). There is still a challenge to optimize the evacuation time. A new algorithm for minimizing the total duration time for crowd evacuation can be summarized as follows: Step 1: Discretize the rectangular room into a grid of rectangular or squared cells. Each cell corresponds to the standard dimensions that may contain a person (0.5 m £ 0.5 m, for instance). Obviously, the dimensions of the elementary cells can be adapted to the particular cases or morphology of the users (kids, old persons, wheel chairs). For the example case shown in figure 4(a), the room contains 99 persons and the grid contains 11 rows and 17 columns. This configuration can represent a show room during a conference, for instance. No obstacle is considered for the example, i.e. neither chairs nor tables are placed within the room.
Step 2: Locate the room gates and the walls or obstacles.
Step 3: Locate the persons within the grid (random number and location for simulation purposes and sensitivity analysis, for instance). In the example case, two gates are considered: gate 1 (red) and gate 2 (blue) shown in figure 4. Define the rules for the displacement within the grid. For the present example, the persons can move to the four cells if there is no wall at this location: horizontally at right, left, and vertically up and down. Furthermore, the motion is allowed if the target cell is empty. If several persons are willing to move to the same target cell, one of them is arbitrarily selected to move first, the others should wait until the next step.
Step 4: Prepare the first waiting list for each gate according to the total number of steps for each person before it reaches the gate. For instance, person 11 is in the first position for Gate 2 but 99 position for Gate 1, whereas person 78 is first in waiting list for Gate 1 but 99 position for Gate 2). Step 5: Prepare the sorted waiting lists for each gate since none of the persons can be present in both sorted lists. Thus, the rearrangement between the initial waiting lists and the sorted lists is done such that a person should always be given the best position according to the initial total number of steps to reach the considered gate and the fact that a person should always wait two steps if the target cell is busy: wait one step to free the target cell due to the motion of the occupying person and move at the next step.
Step 6: Once the sorted lists are established, the motion can start. For instance, persons (3-11) shown in figure 4(a) are ready to move to the right cells towards gate 2 as shown in figure 4(b) and person 78 can escape at gate 1, whereas all the others have to wait until the next step for a possible motion. One should notice that persons (1 and 2) do not move at the first step as shown in figure 4 (b) since they are on the sorted list for gate 1 even if the right cells are empty for a possible motion. As the evacuation is guided, they should wait strictly until the escape at gate 1, as shown in figure 4 (e) for person 2.

Discussion and analytic proofs
This optimal guided evacuation request only 102 elementary steps before the room is completely evacuated as shown by the simulation shown in figure 4. For the particular case of dense crowd (no porosity between the persons, i.e. no more than one step left empty between any person and its neighbour), the total number of steps before the room is completely evacuated can be easily obtained by analytic developments as follows: n g1 D 1: steps number for the first person evacuated at gate 1 (for the example case: person 78); n g2 D 8: steps number for the first person evacuated at gate 2 (for the example case: person 11); N s1 D n g1 C 2 Ã (N L1 ¡ 1): total number of steps to evacuate the list L1 allocated to gate 1; N L1 D total number of persons evacuated through gate 1, i.e. number of element on list L1; N s2 D n g2 C 2 Ã (N L2 ¡ 1): total number of steps to evacuate the list L2 allocated to gate 2; N L2 D total number of persons evacuated through gate 2, i.e. number of element on list L2. The optimal steps number before the room is completely evacuated satisfies the constraint: N s1 D N s2 Under the condition that N L1 C N L2 D N p where N p is the total number of persons to be evacuated (for the example case: N p D 99 persons).
The real solution is: N s1 D N s2 D 101.5 steps, i.e. the integer value is N s1 D N s2 D 102 steps as shown in figure 4(f). The proposed algorithm is thus able to reduce the time for total evacuation duration time in case of emergency. Actually, if the evacuation for any person was rather guided by the proximity to the gates, which is the usual governing parameter, the evacuation would have lasted 167 elementary steps. As the room is located inside a large building, the total duration for the evacuation will depend not only on the total room evacuation but also on the time needed for the route from the exit gates of the room towards the external exit gates of the building. For the example case considered in this paper, a simple configuration is adopted as shown in figure 5. The coupling of the two methods developed and proposed appears powerful to deal with any topology of the building Figure 5. Optimal route from the room gates to the external exit gates of the building. and any disposal of the rooms inside the building. Under the hypothesis that each person gets the real time instruction for the personal exit route, the building can be evacuated in the shortest duration time in case of emergency.

Conclusions and future work
The goal of this paper was finding an automatic and executable way to generate network data-sets for CAD/BIMs in GIS and developing an efficient algorithm for optimal guided evacuation of crowds from a room somewhere inside the building towards the external gates of the building.
The TIN method was proposed to complete this goal; it is effective for path generation in ArcGIS and requires very small storage space and processing time but only utilized a limited number of nodes in its constructing network, and the nodes did not cover the space in equal density. The network data-set was generated from limited CAD/IFC entities. Stairs are imported as detailed polyhedron features, but their attributes do not have the connection information that can be used to create geometric links. Therefore, as a compromise for linkage, this paper abstracted stairs as points and used them to fashion connections between floors. Moreover, this paper attempted to build a starting point for the use of common GIS functions implemented in current GIS software, i.e. ArcGIS as a platform in path generation and routing analysis for BIMs.
This automatic research of route from a location inside the building towards another inside or outside the building is very helpful for guided crowd evacuation. An efficient algorithm based on sorted and shared waiting lists between the potential exit gates from a room has also been developed and used for simulation purposes. Based on the shortest duration time principle, the room can be evacuated in almost 2/3 times the duration required by the usual solutions based on gate proximity priority. For the example case reported in this study, only 102 steps instead of 167 steps in order to evacuate a rectangular room containing 99 persons evacuated through two opposite gates. Coupled to the TIN method and path generation, it becomes then easy to optimize the duration time to evacuate the rooms inside a building through adequate routes towards the external gates of the building.
Thus, the results show that the possibility of applying it to real objects and points to be the value of further investigation. Presently, the solutions proposed by this paper are usable for path generation on each building floor, but stairs present a problem in floor linkage. Hence, improving the data import method and finding other methods to create accurate connections between floor levels are suitable future endeavours. In addition, merging the semantic information with visualized results would help routing analysis and extend its potential usages. Another field of expansion could be combining the indoor navigation system and outdoor GPS system together, creating a seamless connection within a point-to-point navigation system. Now, there is limited support for path generation in ArcGIS; however, with the development of indoor 3D analysis in the GIS world, the integration between BIM and GIS is gaining in strength.