Review Article | Open Access
Agent-Based Modeling of the Immune System: NetLogo, a Promising Framework
Several components that interact with each other to evolve a complex, and, in some cases, unexpected behavior, represents one of the main and fascinating features of the mammalian immune system. Agent-based modeling and cellular automata belong to a class of discrete mathematical approaches in which entities (agents) sense local information and undertake actions over time according to predefined rules. The strength of this approach is characterized by the appearance of a global behavior that emerges from interactions among agents. This behavior is unpredictable, as it does not follow linear rules. There are a lot of works that investigates the immune system with agent-based modeling and cellular automata. They have shown the ability to see clearly and intuitively into the nature of immunological processes. NetLogo is a multiagent programming language and modeling environment for simulating complex phenomena. It is designed for both research and education and is used across a wide range of disciplines and education levels. In this paper, we summarize NetLogo applications to immunology and, particularly, how this framework can help in the development and formulation of hypotheses that might drive further experimental investigations of disease mechanisms.
Complex biological scenarios have been recently investigated with the synergic union between computational modeling and high-throughput experimental data. This approach has helped the generation of novel insights and hypotheses for further research and development, with a considerable saving in terms of time and costs. Moreover, it allowed experiments and/or measurements that cannot be easily achievable in a laboratory environment .
Once developed and validated, models can be adapted in different ways (e.g., inputs can be altered to mimic different environments) to enable examination of different qualities. These in silico (or dry-laboratory) experiments are of course complementary to traditional wet-laboratory experimental approaches .
During the last decades many mathematical and computational models have been developed to model and describe the immune system processes and features. Nevertheless it is possible to group most models in two large classes according to the modeling approach used: Top-down and bottom-up approaches (see ).
The Top-down approach works by estimating the mean behavior at a macroscopic level, thus modeling populations and not single entities. By using such an approach it is possible to model and represent a large number of entities. The oldest and most famous top-down approach has been represented by the use of ordinary and partial differential equations- based (ODE and PDE) models. Usually ODE models ignore the topology of the problem, whereas PDE can also be used when the space distribution is of importance for the problem. Both techniques neglect individual interactions. Models based on these approaches rely on a strong mathematical theory that allows in some cases analytical study and asymptotic analysis. However complex problems may entitle intractable models, and approximations of the biological scenario become a prerogative. Examples of models based on these approaches are presented in [4–8]. This class of models also includes stochastic differential equations, which add to the classical definition of differential equation some stochastic terms in order to mimic, for example, individual diversity or environmental fluctuations due to statistical noise (see, e.g., ).
The bottom-up approach works at a microscopic level. Entities (agents) and interactions are described and followed individually, and the general behavior of the system arises from the sum of the local behaviors of the involved entities. In this way it is possible to describe local immunological processes with greater accuracy, avoiding rough approximations that are typical of top-down approaches. Furthermore spatial distribution and stochastic behaviors generally are already inside, since they normally represent two intrinsic features of the modeling techniques that are based on a bottom-up approach. Conversely, since entities are followed individually, such modeling techniques require a bigger computational effort and there are no strong mathematical instruments that can permit any analytical study. Cellular automata and (multi-) agent-based methods are the most used bottom-up approaches, also in immunology [10–18].
Cellular automata and multiagent-based models have been initially developed for modeling specific problems by using general purpose programming languages, mainly C (in all of its variants) or Fortran. Soon after that the strength of these modeling techniques became clear to the scientific community; many agent-based languages and frameworks that enabled creating agent-based applications were developed (see  for a review).
Among these NetLogo, a programming language and integrated modeling suite that is totally devoted to ABMs, has reached a good level of maturity and usability. NetLogo development was started in 1999 by Uri Wilensky, which continues to maintain, update, and add new functions ever since [20, 21].
NetLogo is a functional programming language  with “turtles” that represent the agents and “patches” that represent a given point into the simulation space. Both of these may have multiple properties that can be defined by the user such as age, color, and position.
In practice, the fact that NetLogo uses a functional programming language means that many language statements are almost read as sentences, and this enables even unskilled and untrained users to understand and learn it through the examples.
NetLogo can be slower than other tools, but it is very easy to use, it supports the automatic drawing of agents in 2D or 3D, it gives the possibility to simply build user interfaces, and it is supplied with a lot of examples and HOWTOs, making it a suitable platform for beginner programmers. Moreover, NetLogo models can be effortlessly shared as Java applets, and this means that such models can be run in almost all (if not all) computer platforms. It is also possible to perform better statistical analysis of results thanks to a plug-in that allows communication between NetLogo and R , a very well-known statistical software. NetLogo has been released under the GNU General Public License, meaning that it is free and open-source. NetLogo thus represents a good choice to realize multiagents models, networks, and complex dynamical systems.
In this review we will focus on the use of NetLogo to model the immune system processes and features.
2. Application of NetLogo to Immunology
NetLogo framework has been used extensively to further our understanding of systems in several different disciplines, including biology, ecology, economics, and sociology. Here we will show several applications of NetLogo to model, at different extent, immune system dynamics.
2.1. Modeling Innate Immunity
Toll-like receptors (TLRs) represent a class of proteins playing an important function in the innate immune system. They are receptors usually expressed in macrophages and dendritic cells that recognize structurally conserved molecules derived from microbes. They are fundamental in activating the innate immune system response. In , the authors present spatially configured stochastic reaction chambers (SCSRC), that is, an agent-based modeling framework that incorporates an abstracted molecular “event” rule system with a spatially explicit representation of the relationship between signaling and synthetic compounds. They implemented the SCSRC with NetLogo and applied the model to TLR 4 signaling and the inflammatory response.
The model was able to accurately reproduce the dynamics of TLR-4 signaling in response to LPS stimulation. In particular, it was capable of showing that there was a dose dependent proinflammatory response effect and also the establishment of tolerance.
Inflammation is part of the first immune response, typically innate immune response to harmful stimuli, such as pathogens, damaged cells, or irritants. There are two main types of inflammation: acute or chronic. The former is the initial response of the body to dangerous stimuli and is sustained by the increased movement of plasma and leukocytes (especially granulocytes) from the blood into the injured tissues. The former is represented by a protracted inflammation, characterized by both destruction and healing of the tissue involved in the inflammatory process.
Brown et al.  developed a model to study the response of inflammatory cells (macrophages) and cells involved in remodeling (fibroblasts) to particulates exposure. The NetLogo model, even with clear limitations (varied tissue structures in the lung, missing full complement of cells, and other important immune cells that play a role in the inflammatory process), was able to forecast the existence of biologically relevant aspects, that is, healing and return to baseline, localized tissue damage and fibrosis, and extensive damage and fibrosis. It includes interactions among macrophages (that could be considered along with other lymphocytes and neutrophils, the leaders of inflammatory response), fibroblasts (that can lead to fibrosis), proinflammatory cytokine (TNF-a), anti-inflammatory cytokine (TGF-b1), collagen deposition, and tissue damage/dysfunction/DAMPs.
Another example of inflammation modeling is given in . Here the authors develop an ABM of the epithelium using results derived from an in vitro model of gut epithelial permeability. Then, the epithelial ABM was integrated with the endothelial/inflammatory cell ABM to produce an organ model of the gut. This is an interesting example where the model results were then validated against in vivo models of the inflammatory response of the gut to ischemia.
A particular form of inflammation is characterized from the acute inflammatory response that arises initially in response to several biological stressors, including infection, burns, trauma, and invasive surgery. Under normal circumstances this kind of inflammation is strictly supervised by the immune systems and is regulated and self-limited. However when anti-inflammatory processes fail, one can observe an amplified inflammatory state that is depicted by severe, uncontrolled systemic inflammation and multiple organ dysfunction. In , Dong et al. proposed an ABM framework developed to investigate insight on the stochastic interactions of the mediators involved in the propagation of endotoxin signaling at the cellular response level that at the end triggers acute inflammation.
2.2. Modeling Immunity to Pathogens
Human papillomavirus (HPV) is a DNA virus from the papillomavirus family that is capable of infecting humans. The main targets of HPV are the keratinocytes of the skin or mucous membranes. Some types of infections can trigger benign papillomas, while others can lead to cancers of the cervix, vulva, vagina, penis, oropharynx, and anus . NetLogo can interact with other modeling strategies and in  the authors combined cellular automata and agent-based modeling techniques (implemented in NetLogo) to simulate the growth and the HPV life cycle, allowing the observations at different stages.
In the adaptive immune response to a virus of an intracellular bacterium, the presentation of the antigen on the surface of the infected cell is of extreme importance. One way to perform this communication strategy is represented by the displaying of viral antigen on major histocompatibility complex of class I of the infected cell. Recently, another mode of communication has been revealed, namely, the transport of antigen from one cell to another through gap junctions . Gap junctions are small channels that can form between two cells to permit the transfer of small molecules . One of the advantages of NetLogo is to have available a graphical support without worrying about programming it. This permits having one of the main features of ABM ready to use: spatiality. A work that models gap junctions both with ABM and ODE techniques can be found in . Here the authors showed by an ODE model that gap junction-mediated antigen transport is not a good strategy for the immune response in the situation where the infection dynamics can be explained by a well-mixed model (this can apply to organs, e.g., the spleen). In different situations, that is, where target cells are sparse and unmoving (this can represent, e.g., the case of epithelial cells that are targeted by many viruses), gap junction-mediated antigen transport might drive to a phenomenon similar to firebreaks, which impedes virus diffusion and can therefore establish a useful immune response scheme. This was modeled using NetLogo to implement a localized infection of a patch of epithelial tissue containing more than 10000 target cells on a grid of size 101 × 101. It is worth mentioning that in this case spatiality was of main importance.
2.3. Modeling Immune System Dynamics
Developing and using mathematical and simulation strategies cover also an important role in the analysis of the dynamics of infectious diseases in populations. Recently, such models integrate population structure and viewed differences between individuals in traits that impact transmission . In this scenario, there are several cases in which the interaction between trait and infection dynamics plays an important role. Think, for example, about the systems where the heterogeneity between individuals affects implicit trait, that is, “infection history,” and the more explicit trait, that is, “immune status.” Patterns of such systems are mostly host-parasite systems with protozoan parasites or worm parasites. In , the authors use NetLogo to implement a model to analyze the host dynamics of a protozoan parasite infecting chickens, including acquired immunity and repeated infection through a spatially structured environment. The choice to use an individual-based model allowed the authors to investigate stochastically emerging heterogeneity. Main emerging results were the possibility to examine the variation in the immune response, transmission, and movement of individuals.
Understanding the role of leukocyte trafficking through the microcirculation and into tissues is of fundamental importance in vascular-associated pathologies like atherosclerosis, stroke, chronic wounds, and peripheral vascular diseases. In particular, methodologies that explore leukocyte adhesion and its dynamics are central. A computational framework that combines agent-based modeling (ABM) with a network flow analysis to study monocyte homing is presented in . Here the authors show an important feature of NetLogo environment, that is, to import a specific map or network in which the agents are free to move. This can be of any type and can contain constraints (densities, barriers, one way paths, etc.). The paper describes a network blood flow model that computes fluid flow velocities, pressure distributions, and WSS values in a simulated microvascular network, taking the inputs from the ABM drawing program in NetLogo. The computational model was able to capture the multicell tissue-level dynamics of monocyte trafficking within a microvascular network bed. Thanks to the spatial representation ability of ABM, one of the interesting features of the model implemented in this paper is the possibility to follow the cells simulated both in space and time, which is currently not possible in experimental models.
2.4. Modeling Diseases
Multiple sclerosis (MS) is an inflammatory disease that affects the brain and spinal cord. MS is considered a CD4+ Th1-mediated autoimmune disease . A NetLogo framework, that describes the typical scenario observed in relapsing-remitting multiple sclerosis (the most relevant type of MS), is presented in . The main hypothesis of the model is given by the fact that the arising of the pathology is due to a breakdown in the peripheral immune tolerance mechanisms. This breakdown allows the activation of myelin-based protein (MBP) specific CD8 lymphocytes, which cause the disease. Other hypotheses that the model takes into account are represented by a genetic predisposition of the host in developing the pathology, the presence of an external trigger that drives the starting the disease through antigen mimicry, and the effects caused by the malfunction (neural damage due to myelin loss). The model takes into account two populations representing specific CD8 lymphocytes that are the cause of neural damage and specific T regulatory lymphocytes, which may fail to suppress CD8 expansion. The model showed ability to capture the essential dynamics of relapsing-remitting MS by simulating both the absence and presence of malfunctions of the CD8-CD4-Treg crossbalancing mechanisms at a local level. In particular it suggested that the presence of a genetic predisposition is not always a sufficient condition for developing the disease. This model represents, up to now, the sole ABM model which models and reproduces the typical behavior of relapsing-remitting MS.
Several diseases like, for example, human immunodeficiency virus (HIV) or during some kind of medical interventions leave the immune system debilitated and not more able to fight properly against pathogens. Some opportunistic agents could invade the host with a damaged immune system and could lead to dangerous situations, and, in some cases, to the death of the patient. One class of these opportunist pathogens is represented by human pathogenic fungi like the ubiquitous fungus Aspergillus fumigatus that leads to mortality rates of 60–90% . It is of great importance, then, to comprehend the infection dynamics and the response of the immune system to invading fungi: this clearly represents a crucial step on the way to stop the opportunistic pathogens from taking over.
Tokarski et al.  settled an ABM to investigate the influence of different tactics of neutrophils on their phagocytosis efficiency. The work focuses in particular on the question of whether chemical communication and chemotaxis of neutrophils improve the clearing efficiency. The authors used an important feature of NetLogo, that is, its capacity to run different simulations with different parameters settings. This characteristic is referred to as behavior space.
2.5. Tumor Immunology
The immune system is able to protect the host from tumor onset, and immune deficiencies are accompanied by an increased risk of cancer. The immune surveillance of tumors is not 100% effective. Tumors arise in hosts with a severe and stable immune deficiency. The study of tumor immunology has led to the development of approaches to further stimulate antitumor immunity. Immunological strategies for the cure of established tumor masses (immunotherapy) have given poor results suggesting that successful antitumor strategies should be addressed to adequately stimulate immune system before tumor onset (immunoprevention), to protect the organism from specific cancers, and to prevent tumor which is more effective than cure in the tumor immunology field .
In  the authors present a computer simulation model that uses an agent-based system developed with NetLogo to mimic the development and progression of solid tumors. The model includes tumor’s own characteristics, the host immune response, and level of tumor vascularization. Simulations conducted indicate the key importance of the nutrient needs of the tumor cells and of the initial responsiveness of the immune system in the tumor progression.
Table 1 gives a brief overview of the NetLogo applications in immune system modeling.
In the last decades many mathematical and computational models have been developed to model and describe the immune system processes and features. Immune system is a complex biological system and has been recently investigated with the synergic union between computational modeling and high-throughput experimental data. There are several modeling techniques, each of them having both pros and cons. Among these, NetLogo may represent a mature choice for a number of reasons, spanning from its flexibility and its suitability for unskilled researchers and developers.
For multiscale or natural scale simulations the use of a high performance computing infrastructure, including machines and parallel code, is imperative. An evolution on this direction for such kind of tools would be important.
In this paper, we critically reviewed a large collection of works dealing with immune system modeling that successfully used NetLogo framework.
Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper.
Ferdinando Chiacchio did literature search and wrote the paper. Marzio Pennisi, Giulia Russo, Santo Motta, and Francesco Pappalardo revised and wrote the paper. Giulia Russo conceived and realized the summary table. Francesco Pappalardo supervised the whole work and drafted the paper.
- H. Kitano, “Computational systems biology,” Nature, vol. 420, no. 6912, pp. 206–210, 2002.
- H. Kitano, “Systems biology: a brief overview,” Science, vol. 295, no. 5560, pp. 1662–1664, 2002.
- C. Bianca and M. Pennisi, “Immune system modelling by top-down and bottom-up approaches,” International Mathematical Forum, vol. 7, no. 1–4, pp. 109–128, 2012.
- C. Bianca, F. Chiacchio, F. Pappalardo, and M. Pennisi, “Mathematical modeling of the immune system recognition to mammary carcinoma antigen,” BMC Bioinformatics, vol. 13, supplement 17, p. S21, 2012.
- C. Bianca and M. Pennisi, “The triplex vaccine effects in mammary carcinoma: a nonlinear model in tune with SimTriplex,” Nonlinear Analysis: Real World Applications, vol. 13, no. 4, pp. 1913–1940, 2012.
- M. Pennisi, “A mathematical model of immune system-melanoma competition,” Computational and Mathematical Methods in Medicine, vol. 2012, Article ID 850754, 13 pages, 2012.
- C. Bianca, M. Pennisi, S. Motta, and M. A. Ragusa, “Immune system network and cancer vaccine,” in Proceedings of the AIP Numerical Analysis and Applied Mathematics Conference (ICNAAM '11), vol. 1389, pp. 945–948, 2011.
- C. Bianca, F. Pappalardo, M. Pennisi, S. Motta, and M. A. Ragusa, “Persistence analysis in a Kolmogorov-type model for cancer-immune system competition,” in Proceedings of the AIP Numerical Analysis and Applied Mathematics (ICNAAM '13), vol. 1558, pp. 1797–1800, 2013.
- N. Vélez de Mendizábal, J. Carneiro, R. V. Solé et al., “Modeling the effector-regulatory T cell cross-regulation reveals the intrinsic character of relapses in Multiple Sclerosis,” BMC Systems Biology, vol. 5, p. 114, 2011.
- F. Pappalardo, M. Pennisi, F. Chiacchio, S. Musumeci, and S. Motta, “AtheroSim: atherosclerosis process simulator on smart devices,” in Proceedings of the ACM Conference on Bioinformatics, Computational Biology and Biomedical Informatics (ACM-BCB '13), vol. 2013, pp. 815–817, 2013.
- S. Motta and F. Pappalardo, “Mathematical modeling of biological systems,” Briefings in Bioinformatics, vol. 14, no. 4, pp. 411–422, 2013.
- F. Castiglione and F. Pappalardo, “Computational biology modeling across different scales,” in Proceedings of the 3rd International Conference on Simulation and Modeling Methodologies, Technologies and Applications (SIMULTECH '13), pp. 617–625, 2013.
- F. Pappalardo, F. Chiacchio, and S. Motta, “Cancer vaccines: state of the art of the computational modeling approaches,” BioMed Research International, vol. 2013, Article ID 106407, 6 pages, 2013.
- D. Alemani, F. Pappalardo, M. Pennisi, S. Motta, and V. Brusic, “Combining cellular automata and lattice Boltzmann method to model multiscale avascular tumor growth coupled with nutrient diffusion and immune competition,” Journal of Immunological Methods, vol. 376, no. 1-2, pp. 55–68, 2012.
- F. Pappalardo, V. Brusic, and H. Fröhlich, “Immune system modeling and related pathologies,” Computational and Mathematical Methods in Medicine, vol. 2012, Article ID 274702, 2 pages, 2012.
- F. Pappalardo, I. M. Forero, M. Pennisi, A. Palazon, I. Melero, and S. Motta, “Simb16: modeling induced immune system response against B16-melanoma,” PLoS ONE, vol. 6, no. 10, Article ID e26523, 2011.
- M. Pennisi, F. Pappalardo, and S. Motta, Agent Based Modeling of Lung Metastasis-Immune System Competition, vol. 5666 of Lecture Notes in Computer Science, 2009.
- F. Pappalardo, E. Mastriani, P. L. Lollini, and S. Motta, “Genetic algorithm against cancer,” in Lecture Notes in Computer Science, vol. 3849, pp. 223–228, 2006.
- C. Nikolai and G. Madey, “Tools of the trade: a survey of various agent based modeling platforms,” Journal of Artificial Societies and Social Simulation, vol. 12, no. 2, 2008.
- E. Sklar, “Software review: NetLogo, a multi-agent simulation environment,” Artificial Life, vol. 13, no. 3, pp. 303–311, 2007.
- V. Grimm, U. Berger, D. L. DeAngelis, J. G. Polhill, J. Giske, and S. F. Railsback, “The ODD protocol: a review and first update,” Ecological Modelling, vol. 221, no. 23, pp. 2760–2768, 2010.
- R. A. Finkel, Advanced Programming Language Design, Addison-Wesley, Reading, Mass, USA, 1996.
- J. C. Thiele and V. Grimm, “NetLogo meets R: linking agent-based models with a toolbox for their analysis,” Environmental Modelling and Software, vol. 25, no. 8, pp. 972–974, 2010.
- G. An, “A model of TLR4 signaling and tolerance using a qualitative, particle-event-based method: introduction of spatially configured stochastic reaction chambers (SCSRC),” Mathematical Biosciences, vol. 217, no. 1, pp. 43–52, 2009.
- B. N. Brown, I. M. Price, F. R. Toapanta et al., “An agent-based model of inflammation and fibrosis following particulate exposure in the lung,” Mathematical Biosciences, vol. 231, no. 2, pp. 186–196, 2011.
- G. An, “Introduction of an agent-based multi-scale modular architecture for dynamic knowledge representation of acute inflammation,” Theoretical Biology and Medical Modelling, vol. 5, p. 11, 2008.
- X. Dong, P. T. Foteinou, S. E. Calvano, S. F. Lowry, and I. P. Androulakis, “Agent-based modeling of endotoxin-induced acute inflammatory response in human blood leukocytes,” PLoS ONE, vol. 5, no. 2, Article ID e9249, 2010.
- F. X. Bosh, T. R. Broker, D. Forman et al., “Comprehensive control of human papillomavirus infections and related diseases,” Vaccine, vol. 31, supplement 7, pp. H1–H31, 2013.
- M. E. Escobar Ospina and J. G. Perdomo, “A growth model of human papillomavirus type 16 designed from cellular automata and agent-based models,” Artificial Intelligence In Medicine, vol. 57, no. 1, pp. 31–47, 2013.
- J. Neijssen, C. Herberts, J. W. Drijfhout, E. Reits, L. Janssen, and J. Neefjes, “Cross-presentation by intercellular peptide transfer through gap junctions,” Nature, vol. 434, no. 7029, pp. 83–88, 2005.
- W. H. Evans, E. De Vuyst, and L. Leybaert, “The gap junction cellular internet: connexin hemichannels enter the signalling limelight,” Biochemical Journal, vol. 397, no. 1, pp. 1–14, 2006.
- A. Handel, A. Yates, S. S. Pilyugin, and R. Antia, “Sharing the burden: antigen transport and firebreaks in immune responses,” Journal of the Royal Society Interface, vol. 6, no. 34, pp. 447–454, 2009.
- O. Diekmann and J. A. P. Heesterbeek, Mathematical Epidemiology of Infectious Diseases, Wiley, New York, NY, USA, 2000.
- M. Severins, D. Klinkenberg, and H. Heesterbeek, “Effects of heterogeneity in infection-exposure history and immunity on the dynamics of a protozoan parasite,” Journal of the Royal Society Interface, vol. 4, no. 16, pp. 841–849, 2007.
- A. M. Bailey, B. C. Thorne, and S. M. Peirce, “Multi-cell agent-based simulation of the microvasculature to study the dynamics of circulating inflammatory cell trafficking,” Annals of Biomedical Engineering, vol. 35, no. 6, pp. 916–936, 2007.
- M. Sospedra and R. Martin, “Immunology of multiple sclerosis,” Annual Review of Immunology, vol. 23, pp. 683–747, 2005.
- M. Pennisi, A. M. Rajput, L. Toldo, and F. Pappalardo, “Agent based modeling of Treg-Teff cross regulation in relapsing-remitting multiple sclerosis,” BMC Bioinformatics, vol. 14, supplement 16, p. S9, 2013.
- J. Karkowska-Kuleta, M. Rapala-Kozik, and A. Kozik, “Fungi pathogenic to humans: molecular bases of virulence of Candida albicans, Cryptococcus neoformans and Aspergillus fumigatus,” Acta Biochimica Polonica, vol. 56, no. 2, pp. 211–224, 2009.
- C. Tokarski, S. Hummert, F. Mech et al., “Agent-based modeling approach of immune defense against spores of opportunistic human pathogenic fungi,” Frontiers in Microbiology, vol. 3, p. 129, 2012.
- F. Pappalardo, A. Palladini, M. Pennisi, F. Castiglione, and S. Motta, “Mathematical and computational models in tumor immunology,” Mathematical Modelling of Natural Phenomena, vol. 7, no. 3, pp. 186–203, 2012.
- D. Dréau, D. Stanimirov, T. Carmichael, and M. Hadzikadic, An Agent-Based Model of Solid Tumor Progression, vol. 5462 of Lecture Notes in Bioinformatics, 2009.
Copyright © 2014 Ferdinando Chiacchio et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.