Computational Model Library

Our mission is to help computational modelers develop, document, and share their computational models in accordance with community standards and good open science and software engineering practices. Model authors can publish their model source code in the Computational Model Library with narrative documentation as well as metadata that supports open science and emerging norms that facilitate software citation, computational reproducibility / frictionless reuse, and interoperability. Model authors can also request private peer review of their computational models. Models that pass peer review receive a DOI once published.

All users of models published in the library must cite model authors when they use and benefit from their code.

Please check out our model publishing tutorial and feel free to contact us if you have any questions or concerns about publishing your model(s) in the Computational Model Library.

Displaying 10 of 147 results spatial clear search

NearshoreABM simulates whether a region captures the production linkages that nearshoring makes available, or fails to capture them because physical infrastructure and credit supply bind first.

The model runs over the 32 Mexican states at quarterly frequency. Multinational anchor firms decide whether to enter and where to locate, following Melitz selection on heterogeneous productivity under trade-policy uncertainty. Domestic supplier firms decide whether to formalise and whether to invest in quality, and may or may not obtain a contract with an anchor. A banking sector allocates a finite regional credit supply according to observed default risk, serving anchor firms before suppliers.

Electricity and water capacity enter production as non-linear congestion penalties with an engineering-based threshold, so the response of output to demand growth is discontinuous rather than proportional: below the threshold there is no penalty at all, between threshold and capacity the penalty grows quadratically, and above capacity it decays exponentially. Congestion is rivalrous within the quarter, which makes the order of production economically meaningful rather than incidental.

Diversity has become a defining feature of most Western societies, where boundaries of membership extend beyond ethnicity to encompass multiple intersecting categories, increasing the complexity of social integration. The aim of this model is to adapt the classical Schelling model of spatial segregation to this context and to identify mechanisms that may generate the hybrid segregation patterns where individuals are segregated from out-groups along one dimension while remaining integrated along others.

We extend the Schelling model using a discrete choice framework that incorporates dominant and secondary preferences among agents from two ethnic groups. Liberal agents prioritize cross-ethnic shared values over ethnicity, whereas conservative agents prioritize ethnic membership over shared values, although both retain some preference for the secondary dimension. The model is designed to explore how heterogeneous preferences and intersecting group memberships interact under different group compositions and initial distributions.

Peer reviewed LSCs-CF: An agent-based model of public space conditions and the collective formation of local sports communities

Yijia JIANG | Published Thursday, August 13, 2026 | Last modified Thursday, August 20, 2026

An agent-based model of how public space conditions shape the collective formation of local sports communities in high-mobility cities. A small gathering is already exercising in an abstract, systematically configurable public space; the model asks how strangers join them and whether the loose gathering consolidates into a stable community. Three conditions are manipulated, each acting through exactly one channel: spatial legibility governs whether a passer-by notices the activity, routine compatibility governs whether a member attends in a given week, and social anchor availability governs how much one episode of co-presence builds a tie. Ties carry a continuous strength with two thresholds, so that relationships of differing strength cross their thresholds at different condition levels. Because the model does not represent the origin of an activity, dissolution is irreversible and survival is a clean binary outcome. Across 32,790 runs in eight experiments the model yields two well separated thresholds along routine compatibility — one for survival, one for consolidation — with a wide band between them in which a space is used continuously but no community forms. The tie submodel is adapted from Jin, Girvan and Newman (2001) and verified against it by docking. Robustness is established against the seeded gathering, the pre-existing social network, a joint ±20 per cent perturbation of the behavioural parameters, and the parameters of the tie machinery.

This model tests whether local housing supply elasticity governs crash severity inside a single metropolitan housing market. Saiz (2010) established that across US metros, regions constrained by geography and regulation experience deeper boom-bust cycles than flexible ones. That finding is routinely applied downward to neighborhoods and ZIP codes as though the mechanism scaled without qualification.

The empirical record for the Washington DC and Northern Virginia region says it does not. Across 84 ZIP codes, measured supply elasticity ranges from 0.35 to 4.95 with a median of 1.21. The worst single-year price decline between 2007 and 2012 averaged 9.6 percent in constrained ZIP codes and 9.0 percent in flexible ones, a gap that cannot be distinguished from noise. Wide variation in the proposed cause, no meaningful separation in the proposed effect.

The model embeds households, houses and a metro-wide credit condition in the real ZIP geography of the region using three GIS layers and an empirical price panel. Local elasticity governs construction, exactly as theory predicts. Prices are driven by a shared macro drift schedule and, under the credit-amplified mode, by a leverage cycle with a financial accelerator and a deviation penalty. The design question is whether those shared forces are sufficient to override local supply differences at the sub-metropolitan scale.

This paper develops a spatial agent-based model to examine how fertility regime shifts reshape population concentration and wealth distribution in an abstract urban system. Migration decisions combine population preference, cultural homophily, expected net income, and resource endowment through a standardised softmax utility. The design is deliberately stylised: it is not calibrated to a particular country or city system, but is intended to isolate the feedbacks linking migration, fertility, urban scaling, and accumulated wealth.
The simulations reveal robust directional asymmetry. When fertility shifts from low to high, population concentration responds rapidly; when fertility shifts from high to low, concentration declines only after a detectable delay and may temporarily continue in the previous direction. Wealth adds a second layer of hysteresis: cell total-wealth concentration follows population concentration with delay, cell mean-wealth inequality and system-level wealth indicators are slower still, and phase-space trajectories form loops rather than collapsing onto a single population–wealth curve. Robustness experiments indicate that longer fertility cycles, wider mobility neighbourhoods, and smoother resource landscapes change the magnitude of delay and overshoot, but do not remove the qualitative asymmetry. The paper argues that demographic decline should be understood not as the mirror image of demographic expansion, but as a path-dependent transition mediated by fast migration-income feedbacks and slower fertility, cohort, culture, and wealth mechanisms.

ABMIND, the Agent-Based Model of Individual Psychological Distance, is a modeling framework developed to examine how psychological distance influences environmental protection behavior in coastal farming communities in southern China. Using household survey data and empirically estimated behavioral pathways, the model represents how uncertainty shapes four dimensions of psychological distance, namely temporal, spatial, social and hypothetical distance, and how these dimensions guide protection and degradation decisions. Agents include households, government actors and mangrove ecosystem patches, connected through social networks and ecological feedbacks that affect learning, expectations and perceived benefits. Policy interventions such as rewards, penalties and publicity guidance efforts work by modifying uncertainty and psychological distance rather than directly controlling behavior. ABMIND is implemented as a spatially explicit model following the ODD protocol, and a concise user guide is provided. In developing ABMIND we introduce a structured validation workflow that links statistical mediation analysis with simulation-based diagnostics, allowing empirical cognitive mechanisms to be systematically embedded and tested within the ABM. This integrated approach strengthens the credibility of psychological-mechanism models and supports their use in policy evaluation. The framework offers a methodological platform for integrating cognitive mechanisms into agent-based environmental behavior modeling and for evaluating policy strategies that support ecosystem protection.
Model paper:
ABMIND: An empirically informed agent-based model of psychological distance and environmental protection behaviour
Ecological Modelling
https://doi.org/10.1016/j.ecolmodel.2026.111700

An agent-based model of irregular warfare in which civilians adapt their alignment in response to local violence, security presence, and territorial control. The simulation explores how decentralized interactions generate spatial patterns of loyalty, conflict dynamics, and stabilization.

A reproducible NetLogo implementation of a spatial attraction-repulsion opinion model with eviction-driven relocation. Agents interact locally, converge with similar neighbors, diverge from dissimilar neighbors, and may evict the most dissimilar neighbor to a random empty location. Parameter sweeps reveal transitions among extremist, mixed, and consensus regimes, with outputs including phase diagrams, opinion distributions, and Moran’s I. The model is intended to reproduce and extend results on how exclusion frequency changes polarization outcomes.

This model implements a coupled opinion-mobility agent-based framework in NetLogo, extending Attraction-Repulsion Model (ARM) dynamics with endogenous migration in continuous 2D space.

Each agent has an opinion s in [0,1] and a spatial position (x,y). Agents interact locally within an interaction radius, with exposure-controlled interaction probability. Opinion updates follow ARM rules: attraction for small opinion distance and repulsion for large distance (tolerance threshold T). After social interaction, agents move according to a social-force mechanism that balances attraction to similar neighbors and avoidance of dissimilar neighbors, controlled by orientation bias (approaching goods vs leaving bads). The model also includes an optional exposure-mobility coupling setting.

Main outputs include polarization (P), spatial assortativity (Moran’s I), mixed-neighbor fraction (f_mix), and good-component count (N_g). The model is designed to study phase behavior of polarization and segregation under mobility and tolerance heterogeneity.

In his 2003 book, Historical Dynamics (ch. 4), Turchin describes and briefly analyzes a spatial ABM of his metaethnic frontier theory, which is essentially a formalization of a theory by Ibn Khaldun in the 14th century. In the model, polities compete with neighboring polities and can absorb them into an empire. Groups possess “asabiya”, a measure of social solidarity and a sense of shared purpose. Regions that share borders with other groups will have increased asabiya do to salient us vs. them competition. High asabiya enhances the ability to grow, work together, and hence wage war on neighboring groups and assimilate them into an empire. The larger the frontier, the higher the empire’s asabiya.
As an empire expands, (1) increased access to resources drives further growth; (2) internal conflict decreases asabiya among those who live far from the frontier; and (3) expanded size of the frontier decreases ability to wage war along all frontiers. When an empire’s asabiya decreases too much, it collapses.  Another group with more compelling asabiya eventually helps establish a new empire.

Displaying 10 of 147 results spatial clear search

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.
Accept