Full text
Proceedings of the 2014 Winter Simulation Conference A. Tolk, S. D. Diallo, I. O. Ryzhov, L. Yilmaz, S. Buckley, and J. A. Miller, eds. APPROACHING SIMULATION TO MODELERS: A USER INTERFACE FOR LARGE-SCALE DEMOGRAPHIC SIMULATION Cristina Montañola-Sales, Josep Casanovas-Garcia Bhakti S. S. Onggo UniversitatPolitècnica de Catalunya - BarcelonaTech Management Science Department Barcelona Supercomputing Center Lancaster University JordiGirona 29, 08034 Barcelona, Spain Lancaster LA1 4YX, United Kingdom Jose Maria Cela-Espín Adriana Kaplan-Marcusán UniversitatPolitècnica de Catalunya - BarcelonaTech Departamentd’Antropologia Cultural i Social Barcelona Supercomputing Center UniversitatAutònoma de Barcelona JordiGirona 29, 08034 Barcelona, Spain 08193 Bellaterra, Spain ABSTRACT Agent-based modeling is one of the promising modeling tools that can be used in the study of population dynamics. Two of the main obstacles hindering the use of agent-based simulation in practice are its scalability when the analysis requires large-scale models as in policy research, and its ease-of-use especially for users with no programming experience. While there has been a significant work on the scalability issue, ease-of-use aspect has not been addressed in the same intensity. This paper presents a graphical user interface designed for a simulation tool which allows modelers with no programming background to specify agent-based demographic models and run them on parallel environments. The interface eases the definition of models to describe individual and group dynamics processes with both qualitative and quantitative data. The main advantage is to allow users to transparently run the models on high performance computing infrastructures. 1 INTRODUCTION Today, our world faces the challenge to manage an unprecedented population growth. Population trends poses significant challenges especially for western economies and their social welfare systems, where fertility ratios are often low and elder population increases. To confront these challenges, governments need to gather information about population dynamics to understand and analyze population trends. Among social studies, demography is an area of research which has greatly contributed to project people to guide societal planning (Rees, 2009). Although the population projection is a simplification and uncertain representation of the modeled group, it is often used as an input to models used for planning and policy making. Simulation is a useful tool to deep on the understanding of population dynamics. Agent-based modeling (ABM) is one of the most widely used approaches for simulating complex social interactions. The main reason is that the object of study in these disciplines, human society present or past, is difficult to analyze through classical analytical techniques due to the unpredictable and changing (dynamic) nature. Agent-based Simulation (ABS) opens the door to artificial experimentation of social phenomena. For this reason, ABS allows the implementation of experiments and research that would not be feasible © 2014 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes,creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works. Extended version of: https://informs-sim.org/wsc14papers/includes/files/389.pdf
Montañola-Sales, Casanovas-Garcia,Onggo, Cela-Espín and Kaplan-Marcusán otherwise (Pavon et al. 2008). ABS has been applied in the physical sciences as well as the social sciences (Macal and North 2007). ABM has already been applied to demographic simulation. Among recent works, Wu and Birkin (2012) proposed an agent-based extension of a spatial microsimulation model of demographic change. Their approach helped to understand the impact of interactions, behavior and impact of personal history in projecting the student migration and mortality in Leeds (UK). Geard et al. (2013) showed how ABM can be used to create a synthetic population which can describe basic demographic processes of ageing, mortality, partnership and kinship at an individual and household level. They examined the interaction between these processes and patterns of infection and immunity. Kniveton, Smith, and Wood (2011) used ABM to understand environmental migration in Burkina Faso to assist policy makers. Silverman et al. (2013) examined how changes on family structures in the UK population may affect the provision of health care with ABS. ABM is commonly used for small scenarios because the number of agents and interactions between them can be extremely large in some of case studies, thus forcing the scientist to limit its number in order to execute the simulation in a standard computer. However, complex policy models that include biological factors (such as health-related factors), cognitive factors (such as learning) or social factors (such as social network) may require a significant amount of computing power. Those reasons lead us to think parallel simulation techniques might pay an important role in the future of social simulation. They can provide support to manage large simulations, not only in terms of dealing with complex models but also when working with large data sets. Currently, there are many tools to support the development and execution of generic ABM. However, typically desktop ABM tools do not scale well to what is required for extremely large applications. Indeed, the performance analysis is a difficult task in parallel and distributed simulation (Fujimoto, 2000), especially when the system is as dynamic as human populations. Scalability (the capacity of the system to handle a higher amount of work as the hardware grows) needs to be addressed, though there is no consensus on dealing with the difficulties it encounters on agent-based models (Hybinette et al., 2006; Tesfatsion, 2002). We have developed a tool that is designed to allow demographic ABM be run in parallel environments. To make our tool accessible to experts interested in population projections, we have designed a graphical user interface (GUI). This interface allows modelers to specify demographic ABMs and to transparently run the models on a parallel computing infrastructure. The rest of the paper is organized as follows. Section 2 discusses Human Computer Interfaces (HCI) for simulation. Section 3 summarizes the architecture of the tool. We present the GUI design in section 4. Finally, section 5 presents our concluding remarks and highlights the lines of further work. 2 HCI FOR SIMULATION From the point of view of users, the interface of a simulation tool is the tool itself (Hix andHartson 1993), since it is the part of the system with which they interact. In complex systems easy-to-use interfaces are especially important since models are difficult enough for non-experts to understand (Saw & Butler, 2008). HCI simplifies the development of models and relieve social scientists of self-development simulation features, such as simulation input-output procedures (Tobias and Hofmann 2004). In Kuljis (1996) issues that affect usability of simulation systems are examined. The author remarks the importance of simulation software design that addresses the specific needs of a particular domain and supports user model development. Therefore, characteristics such as user degree of computer literacy and knowledge or domain knowledge should be taken into account in the interface design (Shneiderman and Plaisant 2010). Myers, Hudson, and Pausch(2000) state it is often believed that a powerful solution to a problem justifies a steep learning curve on GUIs, while this can determine the tool’s adoption. Among the reasons that determine a tool’s success, they point at ease of operation, quality, and the ability of dealing with diverse dexterity of users. Thus, a good interface should be easy to use, efficient, supportive and satisfy user needs (Smith 1997). The development of good GUIs and supportive manuals can be
Montañola-Sales, Casanovas-Garcia,Onggo, Cela-Espín and Kaplan-Marcusán fundamental for software adoption, enabling its diffusion among people both experts and non-skilled users (Bonaccorsi and Rossi 2003; Murphy and Perera 2002; Viorres et al. 2007). Among different kinds of user interfaces, web-based approaches for simulation take advantage of a browser to support the interaction of simulation graphical interfaces with users. Indeed web-based solutions not only serve as an operating system but also as a distribution channel for use (Kuljis and Paul 2003). Integrating the Web with the field of simulation has several advantages, such as the ease-of-use, wide availability, cross-platform capability, collaboration features and control access(Byrne et al. 2010). However, it encounters also some disadvantages, including loss in speed, graphical interface limitations, security vulnerability, application stability and license restrictions. Despite these drawbacks, the current tendency is to increase the development of web user interfaces since web technologies provide means as rich as local PC-based applications (Myers et al., 2000; O’reilly, 2007). However, areas such as user interface ease-of-use should be further research (Murugesan et al. 2001), particularly in the area of simulation where the number of works in this direction is scarce. 3 YADES ARCHITECTURE Currently, there are some tools that allow the design of generic ABM to be run on parallel environments such as Repast-HPC(Collier and North 2011), Pandora (Rubio-Campillo 2013)or PDESMAS (Suryanarayanan, Theodoropoulos, and Lees 2013).However, they required some skills in language programming (Java or C++ mainly). To embrace different simulation models, they provide a desktop user interface where users can define agents’ settings and an environment (a grid or a Graphical Information System) where agents can move and a set of simulation displays. Agent behavior is specified with the corresponding programming language. While this approach is interesting for users who want to use social simulation as a virtual laboratory for their experiments, it is not ideal when users have non-existing or basic programming skills neither when they are not familiar with ABM. Moreover, graphical design support attempts (such the ones Repast suite provides) tend to get too complex as soon as models get a particular size. Figure 1: Yades modeling and simulation framework To approach ABS techniques to modelers interested in population projections, we developed a tool (called Yades) which simulates the demographic evolution and interactions of individuals in a society based on discrete-event modeling paradigm. Yades is built on top of previous work (Onggo 2008). It INPUT Yades User Interface DB code Cluster/ supercomputer OUTPUT JOB EXECUTION Yades Simulation library
Montañola-Sales, Casanovas-Garcia,Onggo, Cela-Espín and Kaplan-Marcusán provides the placeholders for different demographic processes such as fertility, mortality, change in economic status, change in marital status, and migration. Yades has three components: a web user interface, a demographic simulation library and the simulation code generator. The web user interface is designed so that modelers can build their demographic ABMs for a set of group dynamics processes. The simulation code generator can produce the corresponding C++ code that is linked to the demographic simulation library which uses a scalable parallel discrete-event simulation engine. The generated code is ready for compilation using a target C++ compiler. The overall framework is shown in Figure 1. There are two types of agents in Yades: family unit and regions. A family unit is defined as a single independent individual or two independent individuals living together (as married, in civil-partnership, or in cohabitation) and any dependent individuals (children). A family unit may receive events that are related to five demographic components that may change the system states. Modelers can specify models for five demographic components: fertility, a change in economic status, a change in marital status, migration and mortality. The second agent type represents a region where a number of families live. This agent will handle domestic migrations, immigration, changes in simulation parameters and periodic reports. Yades allows users to have regions with different population characteristics. Figure 2 shows how the demographic scenario is mapped on a parallel architecture . Figure 2: Correspondence between the demographic scenario to simulate and the ABS framework Yades simulation library is implemented using µsik parallel simulation library (Perumalla, 2005). µsik is a parallel discrete-event simulation library that supports multiple synchronization algorithms such as lookahead-based conservative protocol and rollback-based optimistic protocol. This library adopts the process interaction world-view in which a simulation model is formed by a set of interacting (logical) processes. Logical processes (LPs) communicate through events with the standardized communications protocol Message Passing Interface (MPI). Multiple LPs can be mapped onto a physical process that is run on top of a processing element (PE). A machine can have more than one PE (e.g., in multi-core architecture). Figure 3 shows the layers of µsik software needed to implement the parallel simulation tool using µsik. Yades uses LP to implement agents and µsik kernel for simulator instances, using an optimistic synchronization with a state-saving mechanism and a time window of 12 months. The detailed implementation has been reported in (Onggo 2008) and (Onggo, Montañola-Sales, and Casanovas-Garcia 2010).
Montañola-Sales, Casanovas-Garcia,Onggo, Cela-Espín and Kaplan-Marcusán Figure 3: Parallel simulation using µsik We now present a web user interface aim to support the development of agent-based models with Yades simulation library which is accessible at http://yades.fib.upc.edu. 4 GUI DESIGN Modeling and simulation platforms are designed to support simulation modeling methods and help modelers to perform challenging models. Platforms are aimed to free modelers from the unnecessary part of design development processes that can be automated, accelerate the model development process and give a chance to reuse models and analyze results (Shneiderman and Plaisant 2010). In this section, we explain the GUI design to build agent-based demographic simulation models with Yades. We have followed a participatory design with the anthropologist who co-authors this paper and who is interested in the use of ABS. Participatory design is especially positive when working on complex systems (Shneiderman and Plaisant 2010). The discussion suggested that we need to provide four types of interfaces to allow modelers specify the behavior of individuals in relation to the fertility, mortality, marital status, economic status and migration. They are state-transition diagram, multiple regression, logic rules, and standard theoretical distributions. The GUI is implemented in PHP and we used HTML5, CSS and JavaScript for the front-end layer. We will now introduce the need of a GUI for a demographic ABS and describe GUI components involved. 4.1 The need of a specialized GUI To confront the difficulty that social scientists and policy modelers are not familiar with computer programs/codes, we need a specialized GUI which could allow users to easily model different behaviors using familiar methods such as regression or intuitive diagrams such as a state-transition diagram. In that way, we ensure the software design answers the needs and capabilities of the users for whom they are intended (Stone and Stone 2005). Social modelers often use statistical estimation techniques to derive into agent decision rules and behaviors. These rules are simple models that relate certain situations with some actions. Key variables that govern agent behaviors have to be identified and statistical relationships have to be obtained (Macal and North 2005). For example, Yang and Gilbert(2008) give some advice on how to use qualitative data Network ( MPI / TCP / Myrinet / SM) Machine Machine ... PE PE PE PE ... LP LP LP LP LP LP LP LP LP LP LP LP LP LP LP LP µsik kernel µsik kernel µsik kernel µsik kernel ...
Montañola-Sales, Casanovas-Garcia,Onggo, Cela-Espín and Kaplan-Marcusán on the design and validation of ABMs in social simulation. They also draw attention to the fact that modelers might need to give some educated guesses to the model based on existing theories and decide how to quantify some variables. To summarize, the requirements for the design of the GUI are as follows. • To design a simple user interface for users who are not familiar with programming and parallel computer environment • To exploit the potential power offered by parallel computers transparently • To provide different types of input data: theoretical distributions, multiple regression, logical rules and state-transition diagram. • To produce/show outputs at micro and macro levels The GUI presented in this paper follows a user-centered design approach which involves users throughout the design and development process (Stone and Stone 2005). To achieve this, we include a user during the requirement analysis and design. The crucial part, however, is to also involve the user in the evaluation of the system during the whole design and development process. 4.2 GUI components The demographic ABM is made up of five agent behaviors that shape the population dynamics: fertility, mortality, marital status, economic status and migrations. In this subsection, we will explain the GUI design for each part. Before running the simulation, modelers will also need to specify the initial population and simulation settings. The features of the initial population in one area could be different from other regions. Hence, the user interface would also support this requirement. Figure 4 shows the internal structure and components of the GUI. Figure 4: Internal components of the GUI 4.2.1 Initial population specification The user interface allows users to specify typical family structures in the region. It includes information on the population distribution by gender and age groups, distribution of different types of family units (parents with/without children, single parents, single individuals, etc.), the age distribution of children in the family, the distribution of different economic statuses, and the distribution of different marital statuses. The GUI allows the information to be entered manually or to import it from a CSV file. Graphical user interface Simulation settings Population settings Initial population Birth Mortality Marital status Economic status Domestic migration/ emigrations Configuration Rules Support interface Immigrations Regions
Montañola-Sales, Casanovas-Garcia,Onggo, Cela-Espín and Kaplan-Marcusán 4.2.2 Fertility Common fertility models to describe the propensity of the women to bear children include agespecific fertility, parity-specific fertility, birth spacing and their combinations. Age-specific fertility uses age to determine the probability of having a child. Parity-specific fertility takes into account the number of children a female person has already had. The birth spacing model focuses more on the time between each birth. This model is rather complicated because it includes factors such as birth control, abstinence period, economic status, etc. The user interface is designed to allow users to specify these models. They will need to indicate the fertility age interval and a model to generate the time to birth (see Figure 5). Most of these models can be specified using a theoretical distribution function, a multiple regression function or logical rules based on individual characteristics. Figure 5: View of birth settings in Yades UI 4.2.3 Mortality The most commonly used mortality models are the life table (and its variants) and survival analysis. The life table summarizes the variation of mortality by age and gender. Survival analysis uses a distribution function to sample an individual’s lifetime at birth. The user interface allows users to specify these two commonly used models through entering the life table manually or importing it from a CSV file. 4.2.4 Marital status In demography, we recognize a number of marital statuses such as single, married and divorced. The GUI is designed to allow users to specify the transition in a state-transition diagram, a graphical tool which helps on defining the multi-state modeling, a standard methodology in demography (Willekens 2005). Allowing multi-state models enable users to represent different transition models, previously inferred. The difference between marriage and cohabitation has shown to be significant in terms of understanding households dynamics (de Vaus 2004). Users will then need to specify each transition and the time to the next state using distribution function, multiple regression or logical rules. Transitions that involve two singles to form a new family unit are treated differently. Modelers will need to specify a “match maker” function, which is based in logic rules according to age, gender, economic status. Figure 6 shows how an example of a marital status' state diagram is set in the GUI. 4.2.5 Economic status The ability to track an individual’s economic status is included in the model because there is a plan to build a policy model on top of it (for public policy planning and analysis in such areas as taxation, pensions and benefits). As well as marital status, economic status component is essential for this purpose. The GUI for the change in economic status is very similar to marital status model but in this case we do not need the match maker function.
Montañola-Sales, Casanovas-Garcia,Onggo, Cela-Espín and Kaplan-Marcusán 4.2.6 Migrations Modelers need to specify two types of migration: national migration and international migration (either emigration and immigration). The user interface allows modelers to specify domestic migration model that determines whether a family unit is going to migrate. Mobility is specified using a constant probability, logit regression or logical rules. For those who migrate, the destination area is determined by a migration matrix. The same user interface is also used for the emigration. Immigrant populations are likely to have different demographic characteristics to the populations they join (Haug, Compton, and Courbage 2002). For this reason, users need to specify the number of immigrants per month and their characteristics. Figure 6: Partial view of marital status model in the GUI 5 YADES GUI CODE GENERATOR Figure 7 shows the interface for code generation. The tool is meant to be run either in a sequential or parallel environment. However, access to a parallel environment is usually restrictive. Moreover, we cannot produce an executable of the simulation because it depends on the architecture is going to be used. Therefore, we provide users the simulation code resulting from their specification of the model. In that way, users with access to a cluster or supercomputer can compile and execute the code. While we free users from the coding process of the model we cannot release them from managing a job in a High Performance Computing environment. Other ABS tools have similar functioning in leaving the
Montañola-Sales, Casanovas-Garcia,Onggo, Cela-Espín and Kaplan-Marcusán management of job’s execution to users, though there have been attempts to automatically generate parallel agent-based simulation code (Richmond et al. 2010). Figure 7: Screenshot of simulation launcher and code generation 6 CONCLUSIONS We have presented a user interface for our agent-based demographic simulation tool which is available for public and we expect to have more feedback from users who would use this tool for group analysis. We believe the two of the main issues in the wider adoption of parallel simulation are scalability and ease-of-use. This tool tackles the scalability problem in large scale and complex agent-based models by running the models on top of a parallel discrete-event simulation engine. The ease-of-use issue is tackled by providing a GUI that allows modelers to describe personal behavior, such as fertility and change in marital status. Using an agent-based simulation modeling paradigm they can transparently generate codes that enable the model to run on a parallel infrastructure. The user interface is designed for experts on