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 131 results Python clear search

This model extends Schelling’s segregation model with mobility sharing. Agents of two groups occupy cells of a 32 × 32 grid and repeatedly choose activity destinations subject to a preference threshold, the minimum share of ingroup neighbours they accept. Trips are matched into shared rides between members of different groups, using one of four matching algorithms on a shareability network (maximal cross-group matching, maximum weight matching on contact time, maximum cardinality matching, or random greedy matching) with a maximum detour constraint. After each trip, an agent’s preference threshold changes with the time spent in contact with outgroup members.

Starting from complete segregation, the model examines under which conditions contact during shared trips leads to integration. Besides the main scenario, in which contact always lowers the threshold, it includes two extensions. In the first, a share of adversarial agents becomes less tolerant with contact, and this share grows or shrinks with the current level of segregation, governed by a branching dissimilarity index and a conversion rate. In the second, each contact raises or lowers the threshold with a probability that depends on the agent’s current attitude relative to a compatibility threshold.

Segregation is measured with the index of dissimilarity and the Gini coefficient. The model file includes BehaviorSpace experiments for each analysis in the associated article. The matching step uses the NetworkX library through the Python extension of NetLogo (requires Python 3 with numpy and networkx 3.x).

This repository contains a Python simulation script for studying network-based linguistic diversity. The model extends the classic Greenberg Diversity Index by introducing diversity measures defined over social ties rather than only over population shares. It also includes two extensions: a competence-conditioned version and a multilayer version.

HOSS(-5) is an exploratory agent-based prototype of a small artificial society, written in Python. Each agent is a “ph” (punto humano, “human point”) that is born, is educated, works, consumes and dies. Its yearly decisions depend on a psychological profile (archetype × character), its economic status and its intentionality. Agents interact indirectly through families, firms in 10 sectors, a labour market with about 200 job categories, and a State that provides public services, employment and a Universal Basic Income, adjusting taxes and UBI each year to seek fiscal balance.

The model simulates a few thousand agents over decades of virtual time and records yearly aggregates (population, GDP, income, Gini index, HDI). A separate analysis script explores the results and fits Gamma distributions to individual incomes, comparing the shape parameter with Gini and HDI.

HOSS does not aim to predict real societies or claim empirical validation. It is a sandbox for comparing scenarios and thinking about the organizational design of society from an engineering perspective. Known limitations: no direct social relations between agents, prices and production follow simple rules rather than supply-demand dynamics, and organizations are black boxes.

…

This model couples a two-asset heterogeneous-agent New Keynesian macroeconomy with a household layer that can be driven in two ways. One is a conventional calibration. The other is a set of large-language-model persona agents built from real survey households in Korea (NaSTaB), the United States (PSID) and Italy (SHIW). Each persona is given its balance sheet, income and prices, and reports consumption, saving and labour supply. A feasibility layer enforces the budget constraint. A conditional-mean surrogate then turns these decisions into a propensity surface. That surface reaches the macroeconomic block through a single channel, the intertemporal marginal propensity to consume matrix. Because of this, a calibrated “twin” can be aligned with the generative layer exactly, and the two can be compared policy by policy.

Both layers are then scored against the held-out consumption of the same households. The model’s role is to serve as a benchmark: it tests whether generative agents add information beyond the balance sheet, and whether that information matches real behaviour.

The deposit contains:

…

Replication package for a network diffusion model of how Protestant belief spreads through a
signed social network, used to compare three versions of balance theory.

An agent-based model in which fourteen European Union member states each carry a cooperation
propensity in [0,1], updated by a logistic link applied to a latent index that combines the unit’s
own previous state, a weighted average of the other units’ states, and four min-max normalised
exogenous indicators (cooperative benefit, opportunistic temptation, systemic exit cost,
intertemporal confidence). The logistic centres are anchored so that the observed 2024
configuration is an exact fixed point of the baseline map, the device that makes such models
…

GFN & Technology Models Library (2025–2035) is a collection of four interrelated computational models focused on global financial networks, cascading default risks, technological development, and technological lag, with particular attention to Russia, the USA, and China. The library combines agent-based modeling, system dynamics, Monte-Carlo simulation, and network analysis. It includes: (1) a Numba-accelerated Monte-Carlo technology index model; (2) a hybrid GFN + cascading defaults (Gai–Kapadia) + Russian system dynamics model; (3) a twin-simulation GFN+SBS framework with selective bailout and Russia’s peripheral position; and (4) an endogenous GFN model with technology centrality, dependence, and tech lag dynamics under sanctions scenarios. GFN & Technology Models Library (2025–2035) is a collection of four interrelated computational models focused on global financial networks, cascading default risks, technological development, and technological lag, with particular attention to Russia, the USA, and China.

The library combines agent-based modeling, system dynamics, Monte-Carlo simulation, and network analysis. It includes:

  1. Technology Index 2035 (Monte-Carlo + Numba) — hybrid SD/ABM model projecting a composite technology index under different scenarios (Russia baseline, China, USA) with aggressive Numba optimization.
  2. RUS-GFN-TSI-2035 CASCADE — hybrid model integrating a Gai–Kapadia-style cascading defaults network, an agent-based Global Financial Network layer, and a system-dynamics module for the Russian economy (TSI, inflation, technology, trust, etc.).
    …

This model implements a bidirectional coupling between micro-level agent decisions and macro-level system dynamics, with an additional diagnostic layer based on Stafford Beer’s Viable System Model.

Key features:
- Six types of agents (Household, Firm, Bank, Government, Foreign, Innovation)
- Continuous SDM core integrated with Runge-Kutta 4
- Robust GDELT data handling with multi-level fallback
…

Agent-based model of cooperation among fourteen EU member states under geopolitical shocks, 2024-2040. States are adaptive agents on the observed intra-EU trade network, updating a cooperation propensity through inertia, network influence, and a repeated-game payoff structure built from verified Eurostat, Eurobarometer and IMF data. An anchoring device makes the observed 2024 configuration exactly stationary absent shocks, so results are read as deviations from an empirical baseline. Five scenarios of increasing severity are simulated with Monte Carlo replication, up to an extreme counterfactual crisis in the Taiwan Strait. Includes six robustness batteries and a full ODD description.

Why do career outcomes in organizations follow highly skewed distributions when the individual traits presumed to drive success — competence, effort, and social skill — are approximately normally distributed in the population? This agent-based model investigates the relative contributions of individual attributes versus random events (“luck”) to career outcomes in hierarchically structured organizations.

The model places 500 agents in a five-level pyramid-shaped organization over 80 six-month evaluation periods (40 simulated years). Each agent is characterized by four attributes drawn from normal distributions at initialization: competence, effort, social skill, and adaptability. In each period, agents may encounter stochastic career events (good or bad projects, supportive or poor managers, market booms or busts), which modify their performance and visibility scores. Promotion decisions are made competitively when vacancies arise at higher levels, using a weighted combination of recent performance, accumulated visibility, network position, and tenure. Social connections form and decay through a proximity-based model influenced by agents’ social skills.

The model extends the talent-versus-luck framework of Pluchino et al. (2018) in four substantive directions: (1) it embeds agents in a hierarchical organization with finite positions at each level, making promotion a zero-sum competition rather than an abstract encounter with random events; (2) it represents individual differences along four independent attribute dimensions rather than a single talent score; (3) it incorporates dynamic social network formation that mediates access to career-relevant opportunities; and (4) it implements the Peter Principle mechanism through which promoted agents must acquire competence appropriate to their new role.

…

Displaying 10 of 131 results Python 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