3DGIS-BASED MULTI-AGENT GEOSIMULATION AND VISUALIZATION OF BUILDING EVACUATION USING GAMA PLATFORM

Recent GIS applications have already extended analyses from the traditional 2-2.5D environment (x,y,attributes) to 3D space (x,y,z,attributes). Coupled with agent-based modeling (ABM), available 3DGIS data can be used to develop simulation models for improved analysis of spatial data and spatial processes. One such application is on building evacuation for which ABM is integrated with 3D indoor spatial data to model human behavior during evacuation events and simulate evacuation scenarios visualized in 3D. The research presented in this paper develops a multi-agent geosimulation model for building evacuation, integrating 3DGIS dataset of the case study building as input in ABM using the GAMA simulation platform. This model is intended to complement and improve traditional approaches in building evacuation planning and management such as earthquake and fire drills. The initial model developed includes PEOPLE agents to model the building occupants, and FLOORS, ROOMS, INDOOR_PATHS and EXIT_POINTS agents, which are modeled from the 3DGIS layers. The INDOOR_PATHS and EXIT_POINTS agents influence the movement of PEOPLE agents. Test simulations were performed involving PEOPLE agents placed in rooms of the building based on potential number of occupants computed based from the floor area of each room. The PEOPLE agents are programmed to find the shortest path along the INDOOR_PATHS towards the EXIT_POINTS instance designated for each room of the building. The simulation computes for the total time it takes for all PEOPLE agents to exit the building. * Corresponding author.

Coupled with agent-based modeling (ABM), available 3DGIS data can be used to develop simulation models for improved analysis of spatial data and spatial processes.This is the concept of a multi-agent geo-simulation (MAGS) model which utilize agent-based modeling to simulate agents with respective geographic locations and to analyze how different agents and agent aggregations interact and change spatially and temporally (Mekni & Haddad, 2010;Crooks, Hudson-Smith, & Patel, 2010).One such application is on building evacuation for which ABM is integrated with 3D indoor spatial data to model human behavior during evacuation events and simulate evacuation scenarios visualized in 3D.

Objectives:
This research generally aims to develop a multi-agent geosimulation model for building evacuation that will be based on 3DGIS dataset of the case study building.Specifically, the study aims to explore and evaluate the implementation of GAMA simulation in a continuous 3DGIS environment.The resulting model is intended to complement and improve traditional approaches in building evacuation planning and management such as earthquake and fire drills, as well as to serve as framework for further indoor spatial environment simulation analyses, such as a GIS-assisted indoor emergency response.

Case Study Building:
The case study building shown in Figure 1   The 5-floor building houses the UP College of Engineering, including several engineering departments and the college of engineering dean"s office.

Limitations of the study:
Due to computational limitations, the number of PEOPLE agents generated as building occupants for the test evacuation simulation was only set as 6% of each room"s floor area.Also, the actual studentclass schedule data will be included in the further implementation of the model.
Only the main building is included in the model.The location of the other annexed buildings and laboratories in the College of Engineering compound will be reflected in the model but will not yet be included in the simulation test.Validation of the results is not yet conducted as of this study and will be included in the final geosimulation modeling.

3D GIS Dataset
Studies have been conducted to explore the development of 3D models to extend 2D visualization and spatial analyses of traditional GIS to the 3D, specifically in the indoor urban environment for building evacuation studies (Lee, 2007;Thill, 2011) and also to model 3D network relationships of the indoor structure of buildings to make 3D GIS-based analyses available, specifically in the calculation of evacuation routes and exit possibilities (Lee & Zlatanova, 2008;Meijers, Zlatanova & Pfeifer, 2005).
The 3D GIS dataset of the case study building was previously developed as part of the project Establishing the 3D Campus GIS of UP Diliman (UPDGIS-3D) which sets the framework for establishing a 3D geo-database of the university campus, intended to support different spatial applications for the university including land use analysis, disaster risk reduction and management (DRRM), facility allocation, building management, and security applications (Macatulad, Blanco & Dili-dili, 2013).

Building Evacuation Simulation
Agent-based modeling and simulation (ABMS) has been described as a new methodology to model systems of "autonomous interacting agents".The advances in computational technology have allowed for an increase in the number of agent-based models in different application domains (Macal & North, 2008).
ABM and simulation models has been incorporated with GIS for building evacuation studies to model the movement of people and look at multiple scenarios for evacuation planning and emergency response within indoor networks (Chen, 2011;Kwan & Lee, 2003;Rosetti & Ni, 2010;Tang & Zhang, 2008;Uno & Kashiyama, 2008).Such simulation models have been successfully implemented in 2D crowd movement during emergency parks or theaters that provided information of the whole evacuation and helped optimize the preparedness and response planning (Bo, & Yong-gang, 2009).

RESEARCH METHODOLOGY
In this research, the previously developed 3D GIS dataset of the case study building is used as input for the development of a Multi-agent geo-simulation model using the GAMA platform.
There are several free and paid ABM simulation platforms available, some of which were initially inspected in this study as possible platforms for the geo-simulation model.GAMA, or more completely named GIS & Agent-based Modelling Architecture platform, was selected because it provides a "complete modeling and simulation development environment for building spatially explicit multi-agent simulations" (Grignard et. al., 2013).Basically, the methodology follows a straightforward process as shown in Figure 4 below.

Agent-based Model
The 3D indoor spatial environment for the agent-based model is modeled from the 3D GIS dataset to create the representative "agents" of the building FLOORS, ROOMS, INDOOR_PATHS and EXIT_POINTS.A PEOPLE agent is modeled to represent the building occupants that will be evacuated in the simulation experiment.
Each ROOMS agent has a designated exit from the 3DGIS analysis in ESRI"s ArcGIS.For the test simulation, the number of PEOPLE agents to occupy each room is computed as 6% of the floor area of each room.
The INDOOR_PATHS agent is modeled in GAMA as a graph layer geometry composed of edges and nodes.By default a weight map is incorporated to the graph layer using each line segment"s corresponding length.To reflect the effects of the type of path, e.g. if stairs, a speed multiplier is added to the weight map of the INDOOR_PATHS agent.GAMA is programmed to read the attribute "multiplier" which has the values 0.5 for stairs and 1.0 for the other paths.However in GAMA, the weights are inversely proportional to the speed of the traversing agent.Thus, the multiplier is added to the default weight map by multiplying its reciprocal.
Preliminary attributes programmed for the PEOPLE agents are the speed, room location, target exit and floor of origin.The speed is set to 3m/s.The room location is based on the attribute of the ROOMS agent if it is an occupied room.The target exit is set respective to the room location of the PEOPLE agent and the floor of origin is assigned upon its creation.

3DGIS and ABM Integration in GAMA
GAMA has its own modeling language called GAML to create a simulation model which is generally composed of three (3) main sections: the GLOBAL section, where agent creation is implemented and where the variables and behaviors of the "world" agent is defined; the ENTITIES section, where agent "species" and their attributes and behaviors are defined; and the EXPERIMENT section, where the experiment display and simulation is defined.For further information on GAMA, the reader is directed to the platform"s web page: https://code.google.com/p/gama-platform.
A view of the GAMA modeling interface is shown in Figure 4 below.Several sample models are also available with the installation program of GAMA, which help as reference in learning the syntax of the platform.Built-in agents and skills are included in this platform which can be used directly in implementing simulation models.In this research, the built-in agent species and skills in GAMA were adapted, including the "moving" skill to develop the MAGS model for building evacuation.
Because GAMA can directly read shapefiles, integrating the 3D GIS dataset was easily implemented.The developer version of GAMA has capabilities to read GIS database through PostGreSQL, but for this study, the stand-alone program is used.The shapefiles need to be imported to the project folder of the GAMA model to be loaded in the simulation as can be seen in Figure 5.

Test simulation of Building Evacuation
The test simulation creates the PEOPLE agents in the ROOMS of the building based on the potential capacity computed from the floor area of the room.The designated exit among the EXIT_POINTS agents for each room is assigned as the targets for the PEOPLE agents in the respective rooms.A sample simulation experiment run is shown in Figure 6.In the above figure, the color of the ROOMS is set to "red" if occupied by PEOPLE agents and "yellow" if not occupied (e.g.comfort rooms and storage rooms).The EXIT_POINTS are visualized as squares and the PEOPLE agents as green spheres.
During the simulation run, the PEOPLE agents "move" towards the target exit along the INDOOR_PATHS.
A counter is set to count the number of PEOPLE agents created for each floor and the evacuation time is monitored through the chart functionality in GAMA.The chart show a line graph of the number of people for each floor over time, as well as a pie graph showing the percent distribution of the people in each floor over the total population.A screen capture image of the chart is shown in Figure 7, Figure 8, Figure 9 and Figure 10.
In this particular simulation run, the number of PEOPLE agents created per floor are 1 ST Floor: 115, 2 ND Floor: 95, 3 RD Floor: 96, 4 TH Floor: 85, and 5 TH Floor: 41 as shown in the pie graph in Figure 7.At time = 11 seconds, the chart already shows that the PEOPLE from the first floor of the building, as well as from the second floor to have been able to evacuate after 9 seconds, while the remaining PEOPLE from the other floors are 3 RD Floor: 40, 4 TH Floor: 85 and 5 TH Floor 41, as can be seen in Figure 8.
In Figure 9, we can see simulation after 21 seconds the PEOPLE from floor have already evacuated and after 28 seconds those from the fourth floor as well.For the PEOPLE from the fifth floor it shows that there are 5 PEOPLE still inside the building.Letting the simulation run until 96 seconds, the remaining PEOPLE are just 2, as seen in Figure 10.However, this is a case where the remaining agents have stopped moving and appear to be stuck in a particular INDOOR_PATH segment as shown in Figure 11.

Problems encountered and evaluation of the implementation
The test simulation performed satisfactory, however that is for the assumption of only 6% room occupancy.The reason for this assumption is that a higher number of PEOPLE agents to be generated results to higher computational task for the initial model.This is expected to be addressed by improving the simulation code.
Another challenge during the implementation of the simulation model is the programming of the movement behaviour of the PEOPLE agents.The weights applied to the INDOOR_PATHS is just one of the parameters that affect the movement of people in a building evacuation and should still incorporate more variables, such as knowledge of the building and disability of an evacuee.
Furthermore, as seen in 11 above, in several trial runs of the model there were instances that a PEOPLE agent will stop or get "stuck" in a particular segment of the INDOOR_PATHS.This will be investigated further to remove this possible bug or error in the code.

Conclusions
The GAMA simulation platform has proven to be easy to learn and to implement for multi-agent modeling of GIS data as inputs.Furthermore, its 3D features allow for modeling of a continuous 3D network for an indoor spatial environment and 3D visualization of agent simulation.The built in tutorials and the online community of GAMA developers help a GIS user shorten the learning curve, allowing for more time to focus on the spatial component of the geo-simulation.However, the casual programmer needs to invest a bit of time to familiarize with the native language of GAMA.Quick integration of ABM and GIS is enabled by GAMA, albeit only loosely coupled.
Utilizing the MAGS model can really help better visualize and analyse different evacuation scenarios to gain more information and understanding of the process.The flexibility and ability to conduct different number and scenarios of simulation is advantageous in planning and managing building evacuation.However, the modeling of building occupant behaviour is one of the critical components of an effective building evacuation model.In this study, comparing different simulation results can improve the analysis of the evacuation process, however it will only be as good as the behavioural model adapted for the evacuation model.

Recommendations for Future Work
In order to improve the performance of the simulation, such as in modeling a more realistic number of building occupants, it is recommended to look at the simulation code and make the necessary adjustments.The opinion of other programmers such as from the GAMA developers and its online community can possibly help.The incorporation of student-class schedule is also importation to reflect the actual temporal distribution of the Melchor Hall building occupants.This will allow for additional evacuation scenarios to be simulated and compared.Validation of the results should be implemented upon the finalization of the simulation model.
The plugins in GAMA for PostGreSQL is suggested to be studied for automatic read-write capabilities to a geo-database.
For future work in this research, it is suggested to include modeling a building fire event, which would incorporate smoke models in an evacuation model.
below is the Melchor Hall building, located approximately at 14°39'22.97"N,121°4'11.23"E,along Osmeña Avenue of the UP Academic Oval in the University of the Philippines Diliman Campus.

Figure 1 .
Figure 1.Location of the Melchor Hall building inside the UP Diliman campus

Figure 2
Figure 2 below shows the work flow followed in the development of the 3D GIS dataset for the case study building.

Figure 2 .
Figure 2. Work flow for the Development of the 3D GIS Dataset From the CAD floor plans, building layers were extracted to create GIS feature layers for FLOORS, ROOMS, INDOOR_PATHS and EXIT_POINTS.A 3D geometric network model was also created from the INDOOR_PATHS layers which serve as inputs to 3D network analyses.The 3D attributes and topology were created through ESRI"s ArcScene software.Figure3shows an image of the 3D visualization of the Melchor Hall building from the 3DGIS dataset.

Figure 3 .
Figure 3. 3D Visualization of the Melchor Hall in ArcScene showing the extruded rooms and the indoor paths

Figure
Figure 4. Research Methodology

Figure 4 .
Figure 4.A screen capture image of the GAMA modeling interface

Figure 5 .
Figure 5.A screen capture image of the GAMA simulation experiment window showing the 3DGIS building dataset 4. RESULTS AND DISCUSSION

Figure 7 .
Figure 7.A screen capture image of the PEOPLE agents population chart at time = 1 second

Table 1 .
Table 1 below.Comparison of Evacuation Times per Floors for 10 Simulation Runs