Friday, May 18, 2012

A Semester with OpenSim

Over the last few months I have been teaching a class in the Department of Computational Social Science entitled "Building Virtual Worlds" where we surveyed the role of virtual worlds for social science research. The emphasis of the class was on tools, software frameworks, and applications of virtual worlds.  On the applications side we discussed how virtual worlds are being used for History, Archeology, Healthcare, Tourism, Urban Modeling, Architecture, Agent-based Modeling along with more generally teaching and learning. We explored a variety of tools for building virtual worlds before focusing on OpenSim. The movie below shows some of the final outputs using OpenSim.





We used OpenSim 0.7.3, configured with the Standalone-Hypergrid mode and a SQLite database hosted on a Windows 7 server. The server simultaneously simulated 64 different regions, and at various points during the semester the server hosted well over 15000 primitives (prims) and ran hundreds of scripts across this landscape; one region alone hosted over 8000 prims. 

Why so many regions? We were interested in how many the server could cope with but also we wanted to have a virtual world representing the whole of the GMU Fairfax campus  (~4km2) and regions in OpenSim are limited to 256m by 256m. We built the terrain for the campus utilizing the National Elevation Dataset (NED) DEM from the United States Geological Survey which was first manipulated in ArcGIS before being processed in  L3DT (Large 3D Terrain Generator). Finally, the DEM was imported into OpenSim. The movie below should give a sense of what the basic terrain looks like.





Once the terrain was built, we populated it with buildings, however, we were not just interested in the external appearance of the buildings but also there internal structure for modeling and simulation purposes.  Therefore the class focused their attention on building a highly detailed Johnson Center.

Model of Johnson Center taken from Google SketchUp 3D Warehouse

Vector based, 2D CAD files were obtained and imported into Google SketchUp before using SketchLife to build the 3D initial building core, walls, doors and windows.

Constructing a vector-based model of the Johnson Center internal structure
The SketchLife final rendering of the Johnson Center

Once built in SketchUp using SketchLife the model was imported into OpenSim 

External view “in world” of what we accomplished in building the Johnson Center
In addition to using SketchLife for the JC, many objects such as chairs, staircases and tables were either built using the tool or those native to OpenSim.

An “in world” shot at ground level, on the 1st floor, viewing the atrium and clock tower
 in the Johnson Center
CSS class photo "in-world"

However, our work with OpenSim does not stop here, below is another movie of some ongoing work with one of our PhD students, Chris Rouly who is creating agent-based models embedded in OpenSim to explore past habitats among many other things.




I would like to thank the "Building Virtual Worlds" class and the Department for enabling this blog post.

Wednesday, April 25, 2012

SimTable and fires

To quote from the site "The SimTable takes sandtable exercise to the next level by making sandtables real. The SimTable is a 3D interactive fire simulator, bringing sandtable exercises to life." Below is a Los Alamos National Lab video demonstrating their use of the SimTable in their Emergency Operations Center.




The movie below demonstrates more of the functionality of SimTable , specifically how one can simulate rainfall and how it flows over the terrain. Or how it can be used to simulate a wildfire spreading and how residents might evacuate from the area. 


Monday, April 16, 2012

Natural Disasters and Crowdsourcing: Haiti

Natural disasters such as earthquakes and tsunamis occur all over the world, altering the physical landscape and often severely disrupting people’s daily lives. Recently researchers’ attention has focused on using crowds of volunteers to help map the infrastructure and devastation caused by natural disasters, such as those in Haiti and Pakistan. For example, in the movie below shows the response to the earthquake by the OpenStreetMap community within 12 hours of the earthquake. The white flashes indicate edits to the map (often by tracing satellite/aerial photography).




While this data is extremely useful, as it is allows us to assess damage and thus aid the distribution of relief, but it tells us little about how the people in such areas will react to the devastation, the supply of food, or the reconstruction. To address this, we are exploring how agent-based modeling can be used to explore peoples reactions. To do this we have created a prototype spatially explicit agent-based model, created using crowdsourced geographic information and other sources of publicly available data, which can be used to study the aftermath of a catastrophic event. The specific case modeled here is the Haiti earthquake of January 2010. Crowdsourced data is used to build the initial populations of people affected by the event, to construct their environment, and to set their needs based on the damage to buildings. 

The idea behind the model is to explore how people react to the distribution of aid, as well as how rumors propagating through the population and crowding around aid distribution points might lead to food riots and similar social phenomena. Such a model could potentially provide a link between socio-cultural information of the people affected and relevant humanitarian relief organizations.




The animation above shows one simulation run where there is the spread of  information and agent movement (red dots) around one center (blue dot). While the chart below shows how over time the density of agents around the food station increases as the simulation progresses.

The idea behind such a model is one can take crowdsourced information and fuse it into an agent-based model and see how people will react to the distribution of food centers. For example, the movie below shows how agents find out about four (hypothetical) different food centers and decide whether or not to go to them in a 6 by 8km area of Port-au-Prince.



Spread of information and agent movement (red dots) in a 6 by 8km area of Port-au-Prince.

More details about this model to come......

Friday, April 13, 2012

#Earthquake: Twitter as a Distributed Sensor System

Our work on using social media continues to develop and we have recently had a paper accepted in Transactions in GIS, entitled "#Earthquake: Twitter as a Distributed Sensor System". Below we present our abstract and some of the results.
Social media feeds are rapidly emerging as a novel avenue for the contribution and dissemination of information that is often geographic. Their content often includes references to events occurring at, or affecting specific locations. Within this paper we analyze the spatial and temporal characteristics of the twitter feed activity responding to a 5.8 magnitude earthquake which occurred on the East Coast of the United States (US) on August 23, 2011. We argue that these feeds represent a hybrid form of a sensor system that allows for the identification and localization of the impact area of the event. By contrasting this to comparable content collected through the dedicated crowdsourcing ‘Did You Feel It?’ (DYFI) website of the US Geological Survey we assess the potential of the use of harvested social media content for event monitoring. The experiments support the notion that people act as sensors to give us comparable results in a timely manner, and can complement other sources of data to enhance our situational awareness and improve our understanding and response to such events.
The movie below show geolocated tweets with references to the earthquake through keyword (earthquake or earth and quake) and hashtag search (#earthquake or #quake) for the first hour after the earthquake.





The following images give a glimpse at some of our analysis.
Response pattern as function of distance from epicenter for the first 400 seconds after the earthquake. At the top we see a plot of (reaction time, distance) of all tweets during that period. At the bottom we show the histogram of the number of tweets as a function of distance.
Locations of the 40 tweets in the shaded area of the figure above overlaid over the USGS CDI scale map. Tweet locations are marked as green circles. Color-coding in the graph is ranging from red (high perceived intensity) to yellow (lower perceived intensity). The dashed line shows a distance of approximately 950 km (8.5 degrees of angular distance) from the epicenter.
The movie below gives you an idea of some of the tweet content:





Full reference to this paper is:
Crooks, A.T., Croitoru, A., Stefanidis, A. and Radzikowski, J. (2013), #Earthquake: Twitter as a Distributed Sensor System, Transactions in GIS, 17(1): 124-147. (pdf)

Wednesday, March 14, 2012

Distributed MASON


Last week, the Center for Social Complexity at GMU, hosted Prof. Vittorio Scarano and Carmine Spagnuolo from the ISISLab of the Università degli Studi di Salerno who have been working on a distributed version of MASON (DMason). The idea is that one can create an agent-based model in MASON and then use the framework to easily distribute it over many machines. The movie below shows an example of what can be done. More information can be found here.




However, if you don't use MASON, you might also be interested in Repast for High Performance Computing