Computational Model Library

This model analyzes two investors forming their expectations with heterogeneous strategies in order to optimize their portfolios by means of a Sharpe ratio maximization. Traders are distinguished according to their methodology used in forecasting. Two acknowledged algorithms of technical analysis have been implemented to compare portfolios performances and assess profitability of each technique.

Schelling famously proposed an extremely simple but highly illustrative social mechanism to understand how strong ethnic segregation could arise in a world where individuals do not necessarily want it. Schelling’s simple computational model is the starting point for our extensions in which we build upon Wilensky’s original NetLogo implementation of this model. Our two NetLogo models can be best studied while reading our chapter “Agent-based Computational Models” (Flache and de Matos Fernandes, 2021). In the chapter, we propose 10 best practices to elucidate how agent-based models are a unique method for providing and analyzing formally precise, and empirically plausible mechanistic explanations of puzzling social phenomena, such as segregation, in the social world. Our chapter addresses in particular analytical sociologists who are new to ABMs.

In the first model (SegregationExtended), we build on Wilensky’s implementation of Schelling’s model which is available in NetLogo library (Wilensky, 1997). We considerably extend this model, allowing in particular to include larger neighborhoods and a population with four groups roughly resembling the ethnic composition of a contemporary large U.S. city. Further features added concern the possibility to include random noise, and the addition of a number of new outcome measures tuned to highlight macro-level implications of the segregation dynamics for different groups in the agent society.

In SegregationDiscreteChoice, we further modify the model incorporating in particular three new features: 1) heterogeneous preferences roughly based on empirical research categorizing agents into low, medium, and highly tolerant within each of the ethnic subgroups of the population, 2) we drop global thresholds (%-similar-wanted) and introduce instead a continuous individual-level single-peaked preference function for agents’ ideal neighborhood composition, and 3) we use a discrete choice model according to which agents probabilistically decide whether to move to a vacant spot or stay in the current spot by comparing the attractiveness of both locations based on the individual preference functions.

Spatial rangeland model

Marco Janssen | Published Tue Jan 22 01:51:09 2019 | Last modified Fri Mar 4 23:21:53 2022

Spatial explicit model of a rangeland system, based on Australian conditions, where grass, woody shrubs and fire compete fore resources. Overgrazing can cause the system to flip from a healthy state to an unproductive shrub state. With the model one can explore the consequences of different movement rules of the livestock on the resilience of the system.

The model is discussed in Introduction to Agent-Based Modeling by Marco Janssen. For more information see

The purpose of this curricular model is to teach students the basics of modeling complex systems using agent-based modeling. It is a simple SIR model that simulates how a disease spreads through a population as its members change from susceptible to infected to recovered and then back to susceptible. The dynamics of the model are such that there are multiple emergent outcomes depending on the parameter settings, initial conditions, and chance.

The curricular model can be used with the chapter Agent-Based Modeling in Mixed Methods Research (Moritz et al. 2022) in the Handbook of Teaching Qualitative & Mixed Methods (Ruth et al. 2022).

The instructional videos can be accessed on YouTube: Video 1 (; Video 2 (; and Video 3 (

PolicySpace2: modeling markets and endogenous public policies

B Furtado | Published Thu Feb 25 13:21:22 2021 | Last modified Fri Jan 14 13:46:42 2022

Policymakers decide on alternative policies facing restricted budgets and uncertain future. Designing public policies is further difficult due to the need to decide on priorities and handle effects across policies. Housing policies, specifically, involve heterogeneous characteristics of properties themselves and the intricacy of housing markets and the spatial context of cities. We propose PolicySpace2 (PS2) as an adapted and extended version of the open source PolicySpace agent-based model. PS2 is a computer simulation that relies on empirically detailed spatial data to model real estate, along with labor, credit, and goods and services markets. Interaction among workers, firms, a bank, households and municipalities follow the literature benchmarks to integrate economic, spatial and transport scholarship. PS2 is applied to a comparison among three competing public policies aimed at reducing inequality and alleviating poverty: (a) house acquisition by the government and distribution to lower income households, (b) rental vouchers, and (c) monetary aid. Within the model context, the monetary aid, that is, smaller amounts of help for a larger number of households, makes the economy perform better in terms of production, consumption, reduction of inequality, and maintenance of financial duties. PS2 as such is also a framework that may be further adapted to a number of related research questions.

Space colonization

allagonne | Published Wed Jan 5 18:11:56 2022

Agent-Based-Modeling - space colonization
ask me for the .nlogo model
The goal of this project is to simulate with NetLogo (v6.2) a space colonization of humans, starting from Earth, into the Milky Way.


At the heart of a study of Social-Ecological Systems, this model is built by coupling together two independently developed models of social and ecological phenomena. The social component of the model is an abstract model of interactions of a governing agent and several user agents, where the governing agent aims to promote a particular behavior among the user agents. The ecological model is a spatial model of spread of the Mountain Pine Beetle in the forests of British Columbia, Canada. The coupled model allowed us to simulate various hypothetical management scenarios in a context of forest insect infestations. The social and ecological components of this model are developed in two different environments. In order to establish the connection between those components, this model is equipped with a ‘FlipFlop’ - a structure of storage directories and communication protocols which allows each of the models to process its inputs, send an output message to the other, and/or wait for an input message from the other, when necessary. To see the publications associated with the social and ecological components of this coupled model please see the References section.

Communication processes occur in complex dynamic systems impacted by person attitudes and beliefs, environmental affordances, interpersonal interactions and other variables that all change over time. Many of the current approaches utilized by Communication researchers are unable to consider the full complexity of communication systems or the over time nature of our data. We apply agent-based modeling to the Reinforcing Spirals Model and the Spiral of Silence to better elucidate the complex and dynamic nature of this process. Our preliminary results illustrate how environmental affordances (i.e. social media), closeness of the system and probability of outspokenness may impact how attitudes change over time. Additional analyses are also proposed.

MCA-SdA (ABM of mining-community-aquifer interactions in Salar de Atacama, Chile)

Wenjuan Liu | Published Tue Dec 1 19:30:17 2020 | Last modified Thu Nov 4 18:10:42 2021

This model represnts an unique human-aquifer interactions model for the Li-extraction in Salar de Atacama, Chile. It describes the local actors’ experience of mining-induced changes in the socio-ecological system, especially on groundwater changes and social stressors. Social interactions are designed specifically according to a long-term local fieldwork by Babidge et al. (2019, 2020). The groundwater system builds on the FlowLogo model by Castilla-Rho et al. (2015), which was then parameterized and calibrated with local hydrogeological inputs in Salar de Atacama, Chile. The social system of the ABM is defined and customozied based on empirical studies to reflect three major stressors: drought stress, population stress, and mining stress. The model reports evolution of groundwater changes and associated social stress dynamics within the modeled time frame.

Plastics and the pollution caused by their waste have always been a menace to both nature and humans. With the continual increase in plastic waste, the contamination due to plastic has stretched to the oceans. Many plastics are being drained into the oceans and rose to accumulate in the oceans. These plastics have seemed to form large patches of debris that keep floating in the oceans over the years. Identification of the plastic debris in the ocean is challenging and it is essential to clean plastic debris from the ocean. We propose a simple tool built using the agent-based modeling framework NetLogo. The tool uses ocean currents data and plastic data both being loaded using GIS (Geographic Information System) to simulate and visualize the movement of floatable plastic and debris in the oceans. The tool can be used to identify the plastic debris that has been piled up in the oceans. The tool can also be used as a teaching aid in classrooms to bring awareness about the impact of plastic pollution. This tool could additionally assist people to realize how a small plastic chunk discarded can end up as large debris drifting in the oceans. The same tool might help us narrow down the search area while looking out for missing cargo and wreckage parts of ships or flights. Though the tool does not pinpoint the location, it might help in reducing the search area and might be a rudimentary alternative for more computationally expensive models.

This website uses cookies and Google Analytics to help us track user engagement and improve our site. If you'd like to know more information about what data we collect and why, please see our data privacy policy. If you continue to use this site, you consent to our use of cookies.