JUST – A Network Simulation Toolkit for Complex Systems Researchers Networks are everywhere, yet we understand relatively little about these complex systems. Online social networks such as Facebook and Google+ are increasingly becoming a part of our everyday lives. Networks can also affect us in less obvious ways. Health researchers have used simulations of networks to forecast how epidemics may develop and spread. Despite the growing importance of complex networks to our daily lives, there is a tremendous amount that we do not yet know. Simulations of changes in networks are one important way for researchers to better answer questions related to these complex systems. In this paper I describe JUST a software framework designed to help researchers rapidly develop custom simulation models of networks. JUST stands for JUNG Universal Simulation Toolkit. JUNG is an open-source project written in Java that focuses on network analysis (O’Madadhain et al. 2010). JUST is not just a framework to develop and run simulations, but a complete package that gives users the ability to visualize their models, share them with others and export the data they generate to other packages for analysis (see images of the software in Illustrations 1 and 2).
Illustration 1: JUST application loading Illustration 2: Main application window showing a simulation on a random network 1 of 11
JUST – A Network Simulation Toolkit for Complex Systems Researchers While other simulation tools exist, there are no simulation toolkits specifically designed for network research. As a result, complex-systems researchers interested in networks are often forced to learn a simulation package and then create much of the network-oriented components from scratch. JUST solves this problem by taking care of many of the complexities of creating a network simulation while allowing researchers to focus on the logic driving the dynamics of their own model. The JUST simulation framework leverages JUNG to create a feature-rich simulation toolkit for researchers. Models designed with JUST require minimal code and can be easily shared and explored with other researchers. Because JUST is written in pure Java it should run on any platform. In the sections that follow, I will discuss some important examples of the uses of network simulations, list some the features of JUST and describe how the users can write their own network simulations. Finally, I explain how the support of WICI would be very beneficial to developing a community of researchers and practitioners concerned with complex-systems network research.
Examples of models using JUST As noted in the introduction, network simulation models often deal with contagion. In a contagion model, one agent has some sort of infection – it could be a disease, access to some information, etc. – and there is a risk that they will spread it to others. These sorts of simulation models are important not only to epidemiological research but to social science research as well. Using the JUST framework, creating network simulation models of contagion spread is straightforward. Social science researchers will find JUST a useful tool for social network simulations 2 of 11
JUST – A Network Simulation Toolkit for Complex Systems Researchers concerning social capital. Social capital is concerned with how the structure of a person's relationships can influence outcomes. In order to better capture this notion of social capital, researchers in the social sciences have developed a number of measures of network position. These measurements are used to compare different positions within a network in order to infer whether certain agents may have advantages relative to other agents in the network (Linton C. Freeman 1977; Burt 1992). The JUST framework includes many common network measures that are commonly used by researchers.
JUST provides a number of features: •
The framework allows researchers a way to get their network simulation up and running quickly.
•
Once a model is created, JUST provides an intuitive visualization of the network.
•
The visualization is dynamic – researchers can “step through” their network over time to explore dynamic changes. For example, Illustrations 3 and 4 show the simulated spread of an infection through a networked population. The illustrations show how a researcher can visualize the spread of an infection by simply moving the slider at the bottom of the application window.
3 of 11
JUST – A Network Simulation Toolkit for Complex Systems Researchers
Illustration 3: Network simulation of contagion spread at first time step •
Illustration 4: Network simulation of contagion spread in the ninth time step
JUST handles the generation of the underlying networks for analysis. It allows researchers to easily explore the implications of network dynamics for different network types (for more detail, see Newman 2003), including:
•
•
Randomly generated networks (also called Erdos-Renyi)
•
Preferential attachment networks (such as the Internet)
•
Small-world networks (common in social science)
JUST provides customizable visualization layout algorithms so patterns can be easily
spotted. Illustrations 5, 6 and 7 show how different layout algorithms used on the same network highlight different characteristics of the network.
4 of 11
JUST – A Network Simulation Toolkit for Complex Systems Researchers
Illustration 5: Circle layout of Watts-Strogatz small world network
•
Illustration 6: Selforganizing layout of the same small world network
Illustration 7: Kamada-Kawai layout of the same small world network
JUST gives complete control over the data in a simulation network model. Researchers can capture data from their simulations for further analysis and use in other programs.
•
JUST automatically saves all network models in the popular popular “pajek” file format (Batagelj and Mrvar 2002). Researchers can export the structure of their network to any network analysis software.
•
JUST supports doing “batch runs” of multiple simulations. Users can configure the software to gradually change variables of interest. An analysis of the resulting data can show bifurcation or “tipping points” (Gladwell 2002) present in the network model.
•
JUST includes extensive application programming interface (API) documentation (see Illustration 9).
•
Model configuration options can be altered through a simple text editor. This makes models easy to save, change and share. Illustration 8 shows an example configuration file.
5 of 11
JUST – A Network Simulation Toolkit for Complex Systems Researchers
Illustration 8: JUST text configuration file
Illustration 9: JUST programming documentation in JavaDoc format
•
The framework also includes common social capital and network measurements.
•
Randomly generated simulation models can be reproduced by recording the model's random key in the configuration file. This allows researchers to share models and ensure they see the same dynamics.
Writing network simulations using JUST In order to make use of JUST, complex-systems researchers only need to alter a few files, adding their own logic to existing templates. Even relatively inexperienced programmers will find the framework intuitive. More experienced Java developers will find the Application Programming Interface (API) documentation to be easy to understand and build upon. At its essence, the JUST framework is comprised of three main objects. These objects intuitively map on to the simulation process (see Illustration 10). The first object represents the environment in which the simulation is to take place. This object handles information about the context of the simulation – this information is drawn from the text configuration file 6 of 11
JUST – A Network Simulation Toolkit for Complex Systems Researchers mentioned earlier. The next object is the universe in which the simulation happens. This object controls the conditions of the “world” in which the simulation will be run. The universe uses information from the environment object and it is populated with the third object-type: agents. Each agent may have links to other agents and with each passing moment of time, agents interact with one another in ways determined by the researcher's interests.
Illustration 10: A representation of the JUST framework and its relation to user software code
Rather than directly alter these major classes – the environment, universe and agents – users can extend them. In object oriented terminology, when one object is extended by another, the child object inherits the characteristics of the parent in addition to whatever unique characteristics it is given. This inheritance allows for objects to share information and capabilities, while also encapsulating each object's unique logic. The key advantage is that the amount of software that needs to be written is drastically reduced. Object oriented software is written as classes and then these general classes are instantiated into objects. In the JUST framework, users extend the base classes of environment, universe and agent and inherit in their own classes the foundational code necessary to create a network simulation. 7 of 11
JUST – A Network Simulation Toolkit for Complex Systems Researchers The configuration file of the JUST framework allows users to specify which of their user simulation codes to run. By altering a few lines in the configuration file, a user can change which of their simulations will be run.
Design of JUST JUST is designed to enable researchers to explore the implications of social capital within simulated social networks. In many ways, social scientists are limited because the phenomena that are of concern cannot be reproduced in controlled environments. Agentbased simulation modelling is one solution to this problem. The JUST framework is designed to aid researchers developing network simulation models and explore the implications of social capital in different kinds of networks under different conditions. As a piece of software, JUST promotes the idea of openness and interoperability with other tools. JUST allows for generated network structures to be shared easily with other programs, and researchers can easily save and export their own data. The text-based configuration file that JUST uses makes it easy for researchers to experiment with their models without having to recompile their code or make difficult changes. Models can also be easily saved and shared with other researchers.
JUST project future – goals of community development Simulation models of networks offer one way for social scientists to come to grips with the complex nature of human systems. The JUST project has the potential to play an important role in complex-system network research. As a simulation toolkit, JUST allows researchers to rapidly develop and explore their own simulations. As an open-source project, JUST has the
8 of 11
JUST – A Network Simulation Toolkit for Complex Systems Researchers potential to become a forum for complex-system researchers concerned with network simulation. The key strength of open-source projects is that they improve and develop through community participation. The JUST project can accept bug fixes and improvements from academic researchers who are solving their own unique problems. It is my hope that with WICI recognition and support, JUST will gain traction with a community of complexsystems researchers who will also, in turn, contribute to the framework's future development. As previously noted, there is enormous potential for network simulation models in the social sciences, health and technical fields. The JUST platform offers researchers the ability to develop their models more efficiently and explain them effectively to those outside their field.
Conclusion JUST is unique because it allows users to quickly and easily create, monitor and evaluate a wide variety of different network simulations. The JUST package takes care of tedious work in the set-up and construction of network simulations, and gives researchers the freedom to easily develop their own simulation model logic. Researchers have complete control over the agents in the framework and how they react. They can output customizable reports on any aspect of the simulation that is of interest. JUST's object oriented framework allows researchers to focus on the logic encapsulated within and between agents in the simulation. The framework handles output of the network information for use in other network analysis tools using standardized, open file formats. By building on the JUNG framework, JUST allows researchers to easily access a wide variety of network measures. An opensourcing of this project would allow for others to easily build and extend upon the existing
9 of 11
JUST – A Network Simulation Toolkit for Complex Systems Researchers framework.
10 of 11
JUST – A Network Simulation Toolkit for Complex Systems Researchers Works Cited Batagelj, Vladimir, and Andrej Mrvar. 2002. Pajek - Software for Network Analysis and Visualization. http://pajek.imfm.si/doku.php. Burt, Ronald S. 1992. Structural Holes: The Social Structure of Competition. Cambridge, Mass: Harvard University Press. Gladwell, Malcolm. 2002. The Tipping Point: How Little Things Can Make a Big Difference. 1st ed. Back Bay Books. Linton C. Freeman. 1977. “A Set of Measures of Centrality Based on Betweenness.” Sociometry 40 (1) (March 1): 35–41. doi:10.2307/3033543. Newman, M.E.J. 2003. “The Structure and Function of Complex Networks.” SIAM Review: 167–256. O’Madadhain, Joshua, Danyel Fisher, Tom Nelson, Scott White, and Yan-Biao Boey. 2010. JUNG Java Universal Network/Graph Framework (version 2.0.1). http://jung.sourceforge.net.
11 of 11