Methodology for the Construction of a Virtual Environment for the Simulation of Critical Processes

Information Technology is growing rapidly. With the birth of high-resolution graphics, high-speed computing and user interaction devices Virtual Reality has emerged as a major new technology in the mid 90es, last century. Virtual Reality technology is currently used in a broad range of applications. The best known are games, movies, simulations, therapy. From a manufacturing standpoint, there are some attractive applications including training, education, collaborative work and learning. This book provides an up-to-date discussion of the current research in Virtual Reality and its applications. It describes the current Virtual Reality state-of-the-art and points out many areas where there is still work to be done. We have chosen certain areas to cover in this book, which we believe will have potential significant impact on Virtual Reality and its applications. This book provides a definitive resource for wide variety of people including academicians, designers, developers, educators, engineers, practitioners, researchers, and graduate students.


Introduction
In the so-called real world, any given process occurs simultaneously with a myriad of other processes. All these processes take place on a continuum of mass, energy and time (the world). All things in this continuum are interlinked in some way. Defining a process as such is in itself already an act of abstraction. One way to study a process is to split it into three entities: the observer, the process itself and the rest of the continuum. The observer usually simplifies a process in his or her attempt to understand it. The observer considers some factors and variables as taking part in the process while ignoring or excluding others. All the variables involved in a given process form a type of microcosm. Using the scientific method, researchers aim to determine laws that govern the interplay among certain entities. To this end, different models and techniques may be used.
A virtual environment is a computer environment. It represents a subset of the real world, where models of real world variables, processes and events are projected onto a threedimensional space. The creation of a virtual environment is an important tool for simulating certain critical processes, especially those in which human beings or things are likely to suffer irreversible or long term damage. This methodology combines a representation of the three-dimensional space with geographic references, the agent-based models, and an adequate representation of time, and aims to construct virtual environments able to simulate phenomena or processes. The three-dimensional geo-referenced representations of space can either be the spatial representation of traditional geographical information systems (GIS), or the representation adopted by Google Maps TM (Google, 2011). Adding autonomous agents to these spatial representations allows us to simulate events, measure any variable, obtain a possible spatial distribution of people and objects, estimate any environmental impacts, build alternative scenarios and train staff to deal with these critical processes.
Through the tool of simulation, it is possible to build and explore models that help people gain a deeper understanding of the behaviour of a specific process or system.
The advantages of using simulation include:


Informed decision-making: a simulation permits implementing a range of scenarios without consuming any resources. This is critical because once a decision to implement a policy is taken in the real world, material and human resources are used, thus generating costs.  The compression or expansion of time: a simulation can compress or expand the duration of a process or phenomenon, in order to allow a complete and timely analysis of it. One can examine a problem in minutes instead of spending hours observing it while all events unravel.  In order to fully understand a phenomenon, it is generally necessary to know why, where and when it occurs in the real world. Thanks to simulation, it is possible to get answers by reconstructing a scenario and subsequently carrying out a microscopic analysis. In the real world, it is often very difficult to do this, because it is impossible to observe or control the system completely.  Problem diagnosis: dynamic phenomena have a high degree of complexity; one advantage of simulation is that it allows us to understand the interactions among the different variables. This helps in the diagnosis of problems and enables researchers to have a better understanding of the process.  Preparation for change: it is a fact that the future brings changes. Understanding in advance "why" and "how" these changes will take place is very useful in redesigning systems / existing processes and predicting behaviour in accordance with different scenarios.  Training staff: simulation models are excellent training tools when designed for that purpose. Used as such, staff and teams can come up with solutions and evaluate their mistakes by comparing each proposed scenario.
Some disadvantages of simulation are as follow (Banks, 1998):


The construction of an effective model is a form of art: it requires special training garnered over time and experience. If two models of the same system are built by two distinct and competent technicians, these may be similar, but they are unlikely to be identical. The goal of the proposed architecture of a virtual environment (VE) is to construct scenarios to analyze the information related to given critical processes ( Figure 1).
The models, built to represent different processes, phenomena or systems, are based on the behaviour of objects over time. Eventual movements of people or objects are taken into account, both of which are represented by an agent-based system (ABS). The spatial area will also be incorporated into the model using a geographic information system (GIS).
Typical autonomous agents, in an agent-based system (ABS), have some state variables, which determine their situation in the systems, and some of their behaviour, in the same way as object methods in object-oriented programming. A typical autonomous agent, that represents a person in some process, has the following state variables: i) a personal identity; ii) a position given by a set of coordinates (x, y, z); iii) a direction or angle relating to the true north; iv) a speed. Its behaviour could involve: i) moving to some position; ii) speeding up or slowing down.
The proposed virtual environment (VE) must include an appropriate representation of the space or environment in which these autonomous agents receive sensory inputs and produce outputs in the form of actions. In general, geographic information systems (GIS) use raster or vector structures to represent space in bi-dimensional models. In some cases, a third dimension is represented through the digital elevation models (DEM) of a terrain. A given GIS spatial representation (a shape file, for example) can integrate an agent-based system (ABS) and the structure of a dynamic spatial model, incorporating the dimension of time, in order to simulate a dynamic phenomenon. The GIS spatial representation is the environment in which autonomous agents of these ABS models will operate.
For each specific phenomenon, we are only interested in particular information about the environment. So, considering the geographical space where the phenomenon develops, it is necessary to filter only the aspects of interest to the study. These factors are perceived by the autonomous agents, thus causing their actions. The data is organized in different layers, each layer representing different elements such as: utilities, river and lakes, roads and rails, soil maps, land parcels, etc. It is necessary to select only the elements or layers that are of interest to the study. Objects that are not of interest must be eliminated. An environment full of superfluous objects would unnecessarily complicate the modelling and reduce its effectiveness. So, depending on the problem, it is necessary to considerably simplify the simulation, as has been done in the proposed architecture (De Almeida Silva & Farias, 2009;Farias & Santos, 2005).
In dynamic spatial models, in particular cellular automata models (Lim et al., 2002), it is common to represent space as a cell-based or raster structure (Veldkamp & Fresco, 1996;Verburg et al., 2002;Soares Filho & Cerqueira, 2002;Lim et al., 2002). Time is characterized as an incrementing value of a variable t (each increase corresponding to a simulation cycle). At the start of the simulation (when t=t 0 ), the system will be initialized with all data describing the phenomenon or process under study as seen in the state t=t 0 . Following this, the simulation as such begins ( Figure 2). In the first step, it is possible to analyze, given some inputs and/or a particular configuration of cells, which cells should have their attributes changed. In the second step, certain rules are applied to the cellular automata, in order to alter its structure. In the third step, the t variable is incremented; if this t variable is less than a pre-determined value t f -which represents the total time of the simulation -the simulation returns to the first step and the whole cycle repeats itself; otherwise the simulation ends.
This structure of dynamic spatial models can be adapted to a GIS to represent the iterative cycles during which knowledge about the environment is acquired (in other words, sensed and perceived) by the agents who then act correspondingly.

The characteristics of agent-based systems (ABS)
For thousands of years people have created models to help them understand the world. These models not only help them to better understand the phenomena they study, they also help them to transmit their ideas to other people. Through computational simulation of agent-based systems (ABS), people can better understand the effect of a specific phenomenon in an environment under study, which makes it easier to determine the consequences and risks involved.
The idea of an abstract automaton was developed in the work of Alan Turing on the development machine (Levy, 1992). The cellular automaton was popularized by John Von Neumann and Stanislaw Ulam in 1950 through the development of the tessellation model (Levy, 1992). The idea of connecting and interacting spatial units was developed by Norbert Wiener in his work on cybernetics (1948( /1961( ) (Levy, 1992. Cellular automata were originally used to describe units in a series of networks that interact with and influence each other through messages. These networks have been used to represent a series of phenomena: computing devices, neural networks, the human brain, tissue, cellular and ecological networks, etc. They were popularized in the work of John Horton Conway called The Game of Life (Gardner, 1971), and widely applied in the fields of physics, chemistry, biology and ecology (Wolfram, 2002).
(An entity represents an object that requires an explicit definition.) An entity can be dynamic, meaning it moves through the system, or it can be static and play a complementary role in others' tasks. An entity has specific attributes that distinguish it from others. Like state variables, the attributes defined and used for a particular research interest may not applicable to other investigations.
The word "agent" refers to all beings that possess the capacity to act on its own and others' behalf. Representing humans, agents would be people with more knowledge or a more specialized capability in a determined area, which enables them to help other people accomplish their tasks. For example, a secretary makes decisions and deals with particular situations on behalf of her boss, saving him or her from having to carry out certain tasks, such as scheduling appointments and meetings, etc. (Wooldridge & Jennings, 1995).
Autonomous agents, or agents, are the software equivalent of real world entities such as human beings, animals, viruses, ships, cars, etc. For this reason, there exist several definitions for autonomous agents arising from authors' perspectives on the subject (De Almeida Silva & Farias, 2009;Farias & Santos, 2005). Here is one definition (Wooldridge & Jennings, 1995): "A system situated within a given environment, which senses that environment through its perception mechanism and acts on that environment and/or on other agents, as time flows, in pursuit of its own agenda, plans or beliefs. Eventually the agent´s perception/action mechanism evolves with time" (Figure 3).
Autonomous agents can be classified according to their amplitude of perception, their capacity to act and the effectiveness of their action. There exist reactive and cognitive agents.
Reactive agents merely react-in an opportune way, according to very simple behaviour patterns-to changes in the way they perceive their environment. Cognitive agents are more complex. They not only interact with their environment, but are also capable of remembering previous experiences, learning from these, communicating with one and another, and finally of following a defined goal, strategy or plan.
Multi-agent systems (MAS) are composed of several agents, which, in addition to having the above mentioned characteristics, can interact with one another through communicative mechanisms. In most cases, these autonomous agents can exhibit great variation and display competitive or collaborative behaviour, depending on the context (Wooldridge & Jennings, 1995).
Simulations, using Multi-agent systems (MAS), provide a computational platform in which the dynamic of spatial-temporal systems can be studied. To do this, it is possible to use reactive (simpler) or cognitive (more complex) autonomous agents ( Figure 4) (Benenson & Torrens 2004;Wooldridge & Jennings, 1995).
It can also be said that an autonomous agent is a computer system situated in an environment, and that is capable of autonomous action within it, in order to meet its design objectives. For it to be autonomous, the system should be able to act without any direct human (or other agent) intervention, and should have control over its own actions and internal state (Longley & Batty, 2003).

Fig. 3. An Autonomous Agent
An autonomous agent exhibits the following properties: i. Social ability: agents should be able to interact, as deemed appropriate, with other artificial agents and humans in order to carry out their own problem solving and help www.intechopen.com Methodology for the Construction of a Virtual Environment for the Simulation of Critical Processes 141 others with their activities. This requires agents to follow certain communication mechanisms; ii. Responsiveness: agents should perceive their environment and respond in a timely fashion to changes which occur within it; iii. Proactiveness: agents should not simply act in response to their environment; they should be able to exhibit opportunistic, goal-oriented behaviour and take the initiative when appropriate.
In addition to these conditions, a number of other potentially desirable characteristics have been proposed. These include: adaptability -the ability of an agent to modify its behaviour over time in response to changing environmental conditions or an increase in knowledge about its problem solving role; mobility -the ability of an agent to change its physical location to enhance its problem solving; veracity -the assumption that an agent will not knowingly communicate false information; and rationality -the assumption that an agent will act in order to achieve its goals and will not act in such a way as to prevent its goals being achieved without good cause (Maguire et al., 2005).
It is possible to model the behaviour of people in some determined environment through the computational technology of agents, as well as consider other elements that interact with these people using this same technology, observing their behaviour and the consequences of these interactions. An environment can be created where software agents simulate critical process. The agents will have some properties such as: mobility, reactivity and objectivity. People, objects and elements will be also represented by software agents. In this way, it is possible to study, analyse and manage the critical process through agent-based simulation.

Fundamentals of geographic information systems (GIS)
The record of spatial phenomena through predetermined coding has enabled the creation of a model distribution of natural phenomena and human settlements, which has become very important in thinking about population distribution, environmental analysis, navigation, trading routes and military strategies.
Geographic information systems (GIS) are systems that store, manipulate, analyze and display data that is mapped in a geographic coordinate (or geo-referenced) system. The information is encoded in the GIS through geographic features such as points, lines, and areas or through digital data which stores data as pixels (picture element cells) in a twodimensional array.
Understanding how to use GIS is not simply understanding how to use of maps, it is necessary to see how a person views the world, what models are used to represent what is observed and what types of coding are used to represent them. The representation of a map in GIS can be regarded as a visual projection of a spatial database at a given time (Burrough, 1998).
The model used in a GIS program consists of a series of entities that are described by their properties and are mapped using a geographic coordinate system. These entities are points, lines and polygons. In order to represent some region of the earth, for example, it is possible to associate these entities to real world object-like rivers, mountains, cities, buildings, etc.and define theirs attributes, boundaries and location.
The systematic use of GIS enables the building of very huge spatial databases. Data can then be displayed through maps, charts or graphs. Thematic maps compile information related to a specific subject. This facilitates the storage of a large volume of data relevant to a particular phenomenon under study.
The basic functions of GIS are to: (Burrough, 1998):  Show the location of an entity;  Show the distance between an entity and a place;  Calculate the number of occurrences of an entity;  Calculate the size of an area;  Allow the crossing of various spatial data;  Determine the best route from one point to another in a geographic area;  List the attributes of an entity located a certain points;  Reclassify or recolor entities that have similar attributes;  Know the value of an entity at some point and be able to predict its value at another point;  Simulate the effect of a process over time for a given scenario; It is necessary to use a specific technique in order to build spatial data models and their data structures used in GIS. This technique allows researchers to describe the geographical phenomenon and consists of the following steps (Burrough, 1998): i. The construction of the real world model (view of reality); ii. The construction of the conceptual model (human analog abstraction); www.intechopen.com iii. The construction of the spatial model (formalized abstraction without following any convention); iv. The construction of the data model (that reflects how the data will be stored on the computer); v. The construction of the physical computer model (How the files are organized on the computer); vi. The construction of the model defining data manipulation (the rules for data processing); vii. The construction of the GUI model (the rules and procedures for displaying spatial data); Geographic information systems (GIS) and its survey methods and software, have been used in different fields. It is possible to use GIS for any activity that requires geo-referenced information (location in geographical space). The potential of remote sensing and GIS facilitates the planning, control and management of large geographical areas.
Compiling geo-referenced data enables temporal and spatial analysis and provides parameters for implementing management programs in certain areas ( Figure 5).
In areas where there is a critical process, a geo-referenced map can reveal the extent of the process, existing landforms, roads, cities, and even streets and buildings. These data allow for a detailed analysis of the critical process at hand and its potential impact on an urban area.
GIS works by combining tabular data with spatial data. The structures of the raster (satellite imagery) and vector (point, line and polygon) data types are used to digitally represent spatial objects. The vector structures identify vector space objects by points, lines or polygons (two-dimensional space). This type of identification is combined with the elaboration of a polygon "background", which complements the coverage of the entire plan information. The raster structure (or matrix) uses discrete units (cells) which represent spatial objects in the form of clusters (aggregates of cells). In this way, it is possible to see layers of spatial data and their link with tabulated data (roads, buildings, population, plantations, railways, ports, airports, consumers, buildings, water networks, etc.). Therefore, GIS permits researchers to represent the real world through various aspects of geography, which are separated into thematic layers.
For the GIS technology to be used effectively, it is necessary to define a methodology which represents the geographical area under study and to select the main variables to be analyzed.


This methodology consists of the following steps:  Elect the study area (define its limits);  Define the sources of information;  Collect data;  Analyze the data collected;  Provide geo-referenced data;  Manage the use of information.
Information systems are widely used by organizations to manage their critical data. Through systems-based database, a large volume of information can be stored in different business areas. The so-called spatial data refer to information in a defined geographical area (latitude, longitude, topography, hydrography, land, cities, population, agricultural production, infrastructure, etc.). These data are managed by geographic information systems (GIS). The GIS provides not only the spatial view of a given area, but also the data about it across time , thus allowing researchers to gain a better understanding and to make more informed decisions. All data are geo-referenced and stored in spatial databases. In this way, GIS makes it possible to register, view, index, standardize and map a large volume of information about an existing geographic area.

Merging an agent-based system (ABS) with a geographic information system (GIS)
When a phenomenon is too complex to be studied analytically, it is necessary to recreate it in an artificial universe in which experiments can be made on a smaller scale and in an environment that simulates the real world but where the parameters can be controlled with greater precision (Drogoul & Ferber, 1994).
Computer models can be used to understand more about how real world systems work. These models allow researchers to predict the behavior of a wide range of real world processes and understand their structure. Computational models reduce the cost and time of conducting actual experiments, which are often impossible to execute in the real world. Simulations can be repeated many times over and are not invasive. The data generated by computer models are easier to analyze than that of real-world systems. (Gimblett, 2002).
A process is deemed critical when it presents complex behaviour over time. Examples of critical processes are population growth, radioactive accidents, chemical accidents, soil erosion, movement of rivers, epidemic diseases, pests, forest fires, slums in urban areas, vehicle traffic in urban areas, climate change and animal migration. These processes provoke critical effects on the population, the surrounding environment and geographical areas, which must be analyzed and mitigated in order to minimize any pre-existing vulnerability (De Almeida Silva & Farias, 2009).
One significant development in the creation of simulation models has been the inclusion of intelligent agents (autonomous agents) in spatial models. This technique enables the simulation of human behaviour in the environment within which a critical process is to be analyzed and facilitates the study of simulation outcomes. (Gimblett, 2002).
The use of GIS allows a more accurate spatial representation of the environment within which autonomous agents will act, thereby representing the elementary processes that exist in the real world. The challenge is to build a simulation that enables the generation of data appropriate to an analysis of the phenomenon under study.
The use of object orientation (OO) represents a new perspective for the integration of geographic information systems (GIS) with agent-based systems (ABS). This technology enables the creation of objects that can represent entities existing in the real world in a simulation environment. The properties (attributes and methods) of these objects entities in an OO design, a modularity capacity, the low complexity of programming code and reusability are characteristics that give great flexibility to modeling the existing elementary processes of complex processes (Gimblett, 2002).
Object orientation is a global trend in terms of programming and development systems.
Applied to the area of databases, the concept of OO enables a more accurate definition of models and data structures which better represent the real world. This is especially useful to GIS, since the spatial characteristics of data make it difficult to model using traditional techniques.
The construction of a framework that represents a virtual environment is made possible thanks to the principles of object orientation (OO). The objects built following these principles provide a representation of the real world through software simulation. OO focuses on the object and represents a tool to construct it.
The two fundamental OO concepts are classes and objects. An object is an entity that has attributes) and an identity. A class is comprised of objects that share common properties. OO as applied in GIS is characterized by types of objects, divided into classes, which may have a hierarchical relationship, whereby subclasses inherit the behaviour derived from the main classes ( Figure 6). The geographic objects must be represented in a geographic or spatial database. A geographic object is an element that can be geo-referenced and registered into a spatial database. Such databases allow the storing, retrieving and manipulating of spatial data including descriptive attributes that form the basis for the geometric representation of a geographic space (Elmasri & Navathe, 1994).
Objects are programming codes that can represent activities, movements and properties of real world entities (people, animals, cells, insects, chemicals, vehicles, etc.). They have three fundamental characteristics: identity (which distinguishes it from other objects), attributes and methods. A class provides a template for building a collection of objects of the same type. Embedded in an environment, objects are able to simulate a phenomenon through their multiple interactions. The application of a small number of rules and laws to entities (objects) in a given space gives rise to so-called emerging systems, which are able to simulate complex global phenomena, such as vehicle traffic, the growth of cities, etc. These are systems in which the combination of objects and their interaction with the environment reproduce the phenomenon analyzed. The objects contained in these systems are adaptable and act in synergy between one another. The framework built with objects and their combination automata (abstract automaton) lets researchers explore, analyze and predict critical processes in a study.
A greater degree of realism in simulations based on agents can be achieved by integrating the technologies of agent-based systems, geographic information systems and data acquisition via satellite. In other words, the virtual environments in which the agents will act may be two-dimensional (digital maps) or three-dimensional (digital elevation models), which depict reality to a high degree of accuracy, as can be observed through tools like Google Maps TM (Google, 2011;Gimblett, 2002;Longley & Batty, 2003). It is thus possible to achieve a very accurate model environment where agents with their corresponding attributes and behaviours are positioned and interact with each other and the environment, thus simulating dynamic processes or phenomena.
The use of ABS, based on OO and set up through simple rules, should establish standards of behaviour and the fulfillment of tasks in a geo-referenced environment (GIS). The autonomous agents act and react in the geo-referenced environment in which they are immersed. Fig. 6. A class diagram of geographic object orientation

Methodology for building a virtual environment (VE)
Simulation is the process of building a model of a real system and conducting experiments with this model, in order to understand the behaviour of a complex system and to evaluate strategies for its operation. Simulation, following the proposed methodology, can be used to describe and analyze the behavior of a system, answer questions about it and help to design a better system in the real world (Banks, 1998).
The steps of the proposed methodology are: i. The construction of a conceptual model representing a phenomenon in the real world; www.intechopen.com The proposed architecture of a virtual environment (VE) requires a spatial framework for modeling a complex system. The main characteristics of the architecture of a VE are the existence of autonomous agents, existing within a geo-referenced environment which simulates the phenomenon or critical process of interest.
The autonomous agents have rules of behaviour and attributes and are capable of positioning themselves in a geographical space. A spatial database system is used to store, retrieve, manipulate and analyze data that are generated by the behaviour of these autonomous agents, through time (years, hours, minutes, and seconds). The main features of the autonomous agents, in this architecture of VE, are their ability to transmit information and to move to another position. They also demonstrate more complex behaviour, such as meeting predetermined goals and storing information. It is also necessary to consider another important feature of the autonomous agents in this architecture: their typology, the environment where they are located and the spatial relationship they have with other agents. It is important to guarantee the process that governs changes in characteristics and that which governs changes in spatial location (De Almeida Silva & Farias, 2009).
The VE architecture is composed of two categories of data: spatial data generated by Google Earth TM /Google Maps TM (Google, 2011), which is used as a geographic information system (GIS) and behavioural data generated through autonomous agents. These autonomous agents are built by Repast 3 TM (Argonne, 2011;North et al., 2006), a software toolkit that programs the interaction of autonomous agents in a geographic environment. Generated data are stored in a database called MySQL TM (Oracle, 2011;Appleton & Stucker, 2007), which is then used to simulate the critical process.
The proposed VE is based on autonomous agents that act within a predefined georeferenced environment. They are able to perceive and react to stimuli. There are many software toolkits to build multi-agent simulations such as Repast TM (Argonne, 2011), Cougar TM , Zeus TM , Jack TM , Jade TM , Swarm TM , Star Logo TM and Net Logo TM . In the proposed architecture, the Repast TM software was used (Argonne, 2011) for the following reasons ( Figure 7):  It integrates agents with geo-referenced information (GIS);  Its source code is in Java TM , which makes the tool highly portable;  It is a rapid application development (RAD) tool;  It allows for the monitoring of both the autonomous agents and the constructed model;  It uses graphics for the output of results;  It features a user-friendly graphical interface for the construction of agents;  It is an open source tool that is constantly evolving;  It is compatible with three different programming languages/frameworks: Java TM (RepastJ and RepastS), Microsoft.NET TM (Repast.NET), and Python TM (RepastPy) (Crooks, 2007); The representation of the area selected (Google Maps TM ) (Google, 2011) will be the virtual environment in which entities representing objects in the real world will be inserted. The latter are abstractions, called autonomous agents, which represent different types of actors of the real world ranging from living beings endowed with a high degree of intelligence to entities exhibiting basic behaviour. The autonomous agents are able to interact with one another and are modeled as pro-active autonomous objects endowed with a greater or lesser degree of intelligence and which are able to understand the environment in which they are immersed (Wooldrigde, 2002).

Fig. 7. Simulation tool based on GIS and agents -Repast 3 TM
The architecture of the VE has the ability to organize and display information in a graphical interface whereby the autonomous agents are positioned arbitrarily within a spatial environment and their distribution appears on a geo-referenced map, to be viewed and interpreted (Maguire et al., 2005) (Figure 8). These objects and individuals are modeled by autonomous agents and have the following attributes: i. object identifier; ii. the object's position given by its coordinates; iii. individual identifier; iv. the individual's position given by its coordinates; For the construction of this virtual environment, the following tasks were performed (Banks, 1998): i. Formulation of the problem: define the problem to be studied, including the goal of the solution; ii. Goal setting and planning of the project: raise questions that should be answered by the simulation and the scenarios to be analyzed. The planning of the project will determine the required time, resources, hardware, software and people ware involved as well as controls and outputs to be generated; iv. Building the model: create the model using a conceptual tool for simulation; v. Verification: Check that the implementation of this model has been done correctly; vi. Test of valididity: verify that the model is a conceptual representation reasonably "accurate" system of the real world; vii. Simulation of scenarios: define various scenarios and their parameters; viii. Running and analysis of the scenarios: estimate measures of performance for the scenarios that are being simulated; ix. Documentation and report generation: provide information about the result of the modeling carried out; x. Recommendation: determine the actions to be taken to solve the problem that is being analyzed based on the results of the simulation.
For the implementation of this virtual environment, the following steps were performed ( Figure 9): i. Definition of the critical process: choose a type of critical process to study (e.g. population growth, radioactive accidents, chemical accidents, soil erosion, movement of rivers, epidemic diseases, pests, forest fires, slums in urban areas, vehicle traffic in urban areas, climate change and animal migration); ii. Definition of a scenario: construct a conceptual model representing a phenomenon in the real world; iii. Planning the services of the virtual environment: define the characteristics of the system necessary to model a phenomenon (procedures, input and output variables of this system); iv. Construction a physical model of the database: create the structure of the files; v. Construction of individual autonomous agents whose goals, type, attributes and methods are defined in accordance with the analyzed phenomenon Customization of a Google Maps API: define new features for geographic representation; vi. Customization of Repast libraries: define the graphics and outputs;

Conclusion
The proposed methodology to construct a virtual environment (VE) for the purpose of simulating a critical process allows us to create a software simulation capable of analyzing a phenomenon that occurs in a specific geographical area. This architecture of a VE explores how systems based on autonomous agents can be effective in simulating complex phenomena. The implemented model that incorporates autonomous agents, existing within a georeferenced environment and which capable of receiving stimuli as input and of producing actions as output, aims to simulate the dynamics of the phenomenon selected to be studied.
This VE architecture enables researchers to do the following: i. Construct and analyze scenarios; ii. Design autonomous agents with goals, behaviours and attributes using Repast TM ; iii. Use a powerful and user-friendly GIS: Google Earth TM /Maps TM . iv. Quantify a specific measure; v. Obtain any spatial distribution of people or objects; vi. Inform variable inputs and obtain variable outputs; vii. Storage data output; viii. Estimate the impact of a critical process; ix. Define prompt answers; x. Train personnel to handle the analyzed situation; Following this methodology, it is possible to integrate both a geo-referenced environment together with agent-based models in order to simulate a critical process present in the real world