Abstract
System dynamics and agent based simulation models can both be used to model and understand interactions of entities within a population. Our modeling work presented here is concerned with understanding the suitability of the different types of simulation for the immune system aging problems and comparing their results. We are trying to answer questions such as: How fit is the immune system given a certain age? Would an immune boost be of therapeutic value, e.g. to improve the effectiveness of a simultaneous vaccination? Understanding the processes of immune system aging and degradation may also help in development of therapies that reverse some of the damages caused thus improving life expectancy. Therefore as a first step our research focuses on T cells; major contributors to immune system functionality. One of the main factors influencing immune system aging is the output rate of naive T cells. Of further interest is the number and phenotypical variety of these cells in an individual, which will be the case study focused on in this paper.
Introduction
As the human body ages, the immune system undergoes a process known as immunosenescence, leading to a diminished capacity to respond to new pathogens and vaccines. A central component of this decline is the involution of the thymus, which reduces the production of "naive" T cells—those that have not yet encountered an antigen. To maintain T cell populations, the body increasingly relies on peripheral proliferation. Understanding these dynamics is crucial for developing therapeutic interventions and predicting immune fitness in elderly populations. This paper evaluates two simulation paradigms—System Dynamics (SD) and Agent-Based Simulation (ABS)—to model these complex biological transitions.
Modeling the T Cell Lifecycle
The core of our research is a mathematical model of T cell dynamics, focusing on the transition from thymic output to peripheral maintenance. The biological process involves several states: naive cells produced by the thymus can either die, proliferate, or become active upon encountering an antigen. Active cells may then revert to a memory state or perish.
We implemented this conceptual framework using two distinct methodologies in the AnyLogic environment:
- System Dynamics (SD): A top-down approach representing the immune system as aggregate "stocks" of cells connected by "flows" (rates of birth, death, and transition).
- Agent-Based Simulation (ABS): A bottom-up approach where each T cell is an individual agent governed by a state chart.
Methodology and Validation
The models were validated against clinical data of T cell receptor excision circles (TRECs) from over 500 individuals. TRECs serve as a proxy for thymic output because they do not replicate during cell division; thus, their concentration decreases as peripheral proliferation becomes the dominant source of T cells.
The ABS implementation specifically allows for the observation of individual cell behaviors. Each agent transitions between states based on defined rates, as shown in the state chart below.
Comparative Results
Our analysis revealed significant trade-offs between the two modeling approaches:
- Computational Efficiency: The SD model was remarkably fast, completing a 100-year simulation in under one second (0.7–0.8s) with minimal memory usage (~11 MB). In contrast, the ABS model required 8 to 18 hours to simulate the same period, with memory demands scaling significantly with the number of agents (~50 MB).
- Accuracy and Variability: While both models successfully captured the general trends in the TREC data, the SD model provided a smoother, "idealized" curve with a lower Sum of Square Errors (SSE). The ABS model introduced stochastic "noise," which, while computationally expensive, more accurately reflects the inherent variability found in biological systems.
- The Proliferation Pivot: Both models confirmed that after age 20, peripheral proliferation becomes the primary mechanism for maintaining T cell counts as thymic output declines. Without this homeostatic mechanism, the immune system would degrade much more rapidly.
Conclusion
While System Dynamics offers rapid, systemic insights suitable for high-level population studies, Agent-Based Simulation provides the granularity necessary to model individual heterogeneity and complex cell-to-cell interactions. The extreme computational cost of ABS remains a barrier for large-scale applications. Future work will explore hybrid modeling—using SD for aggregate populations and ABS for localized, high-detail interactions—to create patient-specific "Immune Risk Phenotypes" that can guide personalized clinical therapies.
Summary updated