17.05.2013 Views

Agent-Based Model of Salmonella Typhimurium Infection of the Gut

Agent-Based Model of Salmonella Typhimurium Infection of the Gut

Agent-Based Model of Salmonella Typhimurium Infection of the Gut

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

UNIVERSITY OF ABERDEEN<br />

<strong>Agent</strong>-<strong>Based</strong> <strong>Model</strong> <strong>of</strong><br />

<strong>Salmonella</strong> <strong>Typhimurium</strong><br />

<strong>Infection</strong> <strong>of</strong> <strong>the</strong> <strong>Gut</strong><br />

Report and Manuals<br />

Martin Philip Carrie<br />

50901850<br />

BSc Honours Computer Science Dissertation 2009/2010<br />

Supervisor: George M. Coghill


Declaration<br />

I declare that this document and <strong>the</strong> accompanying code has been composed by myself, and<br />

describes my own work, unless o<strong>the</strong>rwise acknowledged in <strong>the</strong> text. It has not been accepted in any<br />

previous application for a degree. All verbatim extracts have been distinguished by quotation marks,<br />

and all sources <strong>of</strong> information have been specifically acknowledged.<br />

Signed:……………………………………………………………………... Date:…………………………………<br />

1


Abstract<br />

This report shows <strong>the</strong> research, design, implementation <strong>of</strong>, and experimentation with, an agentbased<br />

model <strong>of</strong> a <strong>Salmonella</strong> <strong>Typhimurium</strong> infection <strong>of</strong> <strong>the</strong> human colon. The main goal was to<br />

make <strong>the</strong> model as realistic and versatile as possible in order to investigate <strong>the</strong> dynamics <strong>of</strong> such an<br />

infection under various conditions. To that end, <strong>the</strong> model provides a simulation <strong>of</strong> <strong>the</strong> colon<br />

environment and <strong>the</strong> native bacteria and pathogen cells are represented by individual agents who<br />

move, grow, divide and die in a manner as close to reality as possible, using information obtained<br />

through researching biology and similar agent-based models which already existed. The model was<br />

implemented using <strong>the</strong> NetLogo agent-based modelling environment.<br />

The experimentation phase shows how <strong>the</strong> model performed and how it was refined and amended<br />

in order to correct any issues which arose. The fundamental model elements, such as environment<br />

simulation and bacterial growth proved quite representative <strong>of</strong> <strong>the</strong> biological information obtained.<br />

The membrane invasion dynamics <strong>of</strong> <strong>Salmonella</strong> <strong>Typhimurium</strong> are <strong>of</strong> key interest to this project as<br />

<strong>the</strong> purpose was to investigate how such dynamics behave, due to <strong>the</strong> lack <strong>of</strong> biological facts in this<br />

area. The results <strong>of</strong> this experimentation proved interesting, showing that some kind <strong>of</strong> mutation<br />

dynamic or low probability to invade is required in order to allow persistence <strong>of</strong> <strong>the</strong> <strong>Salmonella</strong><br />

<strong>Typhimurium</strong> phenotype which allows membrane invasion.<br />

2


Acknowledgements<br />

I would like to thank my supervisor, George Coghill, for being enthusiastic and positive during <strong>the</strong><br />

project. Also, my family and friends, specifically my mo<strong>the</strong>r who provided various books and o<strong>the</strong>r<br />

helpful advice and my flatmate, Lars, who is studying in his final year for a Biology degree and was<br />

<strong>the</strong>refore very helpful in explaining certain aspects <strong>of</strong> <strong>the</strong> biology and for discussing ideas. Finally, I<br />

would like to thank Pr<strong>of</strong>essor Neil Gow for meeting with me in <strong>the</strong> early stages <strong>of</strong> <strong>the</strong> project.<br />

3


Contents<br />

1. Introduction ......................................................................................................................... 9<br />

2. Biological Background ......................................................................................................... 10<br />

2.1 Environment ................................................................................................................................ 10<br />

2.2 Native flora composition ............................................................................................................. 11<br />

2.3 <strong>Salmonella</strong> ................................................................................................................................... 12<br />

2.4 Factors affecting bacteria ........................................................................................................... 13<br />

2.5 Cell life cycle ................................................................................................................................ 14<br />

2.6 Immune response ....................................................................................................................... 15<br />

2.7 Environment and bacteria data .................................................................................................. 17<br />

3. Related Work ..................................................................................................................... 19<br />

4. Approach ........................................................................................................................... 22<br />

5. Required Behaviour ............................................................................................................ 24<br />

6. The <strong>Model</strong> .......................................................................................................................... 26<br />

6.1 Interface ...................................................................................................................................... 26<br />

6.2 Program flow ............................................................................................................................... 26<br />

6.3 Environment ................................................................................................................................ 28<br />

6.4 Bacteria ........................................................................................................................................ 31<br />

6.5 Self-destructive cooperation ....................................................................................................... 35<br />

7. Experimenting and Refining ................................................................................................ 38<br />

7.1 Phase 1 – Environment Dynamics ............................................................................................... 38<br />

Experiment 1-1– Nutrients............................................................................................................ 40<br />

Experiment 1-2- pH ....................................................................................................................... 43<br />

7.2 Phase 2 – Bacteria Population Dynamics .................................................................................... 43<br />

Experiment 2-1- Equal maintenance rates ................................................................................... 45<br />

Experiment 2-2- Proportional maintenance rates ........................................................................ 46<br />

Experiment 2-3- Tweaked Bifidobacterium maintenance rate .................................................... 48<br />

Experiment 2-4- Population graph without flushing .................................................................... 49<br />

7.3 Phase 3 – Effect <strong>of</strong> Temperature and Inflammation on Bacteria Populations ........................... 50<br />

7.4 Phase 4 – Experimenting with different sacrificing mechanics .................................................. 53<br />

4


Experiment 4-1- Fur<strong>the</strong>r examination <strong>of</strong> location based sacrificing ............................................. 60<br />

Experiment 4-2- Altering temperature dynamic ........................................................................... 61<br />

Experiment 4-3- Implementing a lag phase .................................................................................. 62<br />

Experiment 4-4- Enabling persistence <strong>of</strong> cooperative agents ...................................................... 64<br />

8. Discussion and Future Work ................................................................................................ 70<br />

9. References ......................................................................................................................... 73<br />

Appendices<br />

A. User Guide ......................................................................................................................... 76<br />

B. Maintenance Manual .......................................................................................................... 87<br />

5


List <strong>of</strong> Figures<br />

Figure Section Page<br />

Figure 2-1: <strong>Gut</strong> structure. 2. Biological Background 10<br />

Figure 2-2: <strong>Salmonella</strong> TTSS-1 injection and<br />

consequential engulfment.<br />

2. Biological Background 12<br />

Figure 2-3: Prokaryote Life Cycle. 2. Biological Background 14<br />

Figure 3-1: Diffusion weights in BacSim. 3. Related Work 21<br />

Figure 6-1: Setup procedure. 6. The <strong>Model</strong> 27<br />

Figure 6-2: Main simulation cycle. 6. The <strong>Model</strong> 27<br />

Figure 6-3: “Update Environment” stages. 6. The <strong>Model</strong> 27<br />

Figure 6-4: “Update agents” stages. 6. The <strong>Model</strong> 27<br />

Figure 6-5: Environment representation. 6. The <strong>Model</strong> 28<br />

Figure 6-6: Neighbouring cell weights for average pH<br />

calculation.<br />

6. The <strong>Model</strong> 29<br />

Figure 6-7: % nutrients distributed from neighbouring<br />

locations to ‘X’.<br />

6. The <strong>Model</strong> 30<br />

Figure 6-8: Graph and best-fit line for average<br />

inflammation against pathogens expressing TTSS-1<br />

phenotype.<br />

6. The <strong>Model</strong> 36<br />

Figure 7-1: Designed system, visualisation output. 7. Experimenting and Refining 39<br />

Figure 7-2: pH levels with no bacteria. 7. Experimenting and Refining 39<br />

Figure 7-3: pH levels with bacteria (bacteria are<br />

hidden)<br />

7. Experimenting and Refining 40<br />

Figure 7-4: New nutrient diffusion percentages. 7. Experimenting and Refining 41<br />

Figure 7-5: Visualisation with new nutrient dynamics 7. Experimenting and Refining 41<br />

Figure 7-6: Average nutrient concentration, with new<br />

nutrient dynamics with flushing enabled.<br />

7. Experimenting and Refining 42<br />

Figure 7-7: pH levels with no bacteria and new<br />

diffusion.<br />

7. Experimenting and Refining 43<br />

Figure 7-8: Population levels over time. 7. Experimenting and Refining 44<br />

Figure 7-9: Bacteria growth phases, sourced from <strong>the</strong><br />

work <strong>of</strong> Laura Daum [50].<br />

7. Experimenting and Refining 45<br />

Figure 7-10: Population levels over time, equal<br />

maintenance rates.<br />

7. Experimenting and Refining 46<br />

Figure 7-11: Bacteroide population distribution. 7. Experimenting and Refining 46<br />

Figure 7-12: Population levels and bacteroide<br />

population proportions over time, using maintenance<br />

rates equal to uptake rates divided by 8.<br />

7. Experimenting and Refining 47<br />

Figure 7-13: Population levels over time, with<br />

modified Bifidobacterium maintenance rate.<br />

7. Experimenting and Refining 48<br />

Figure 7-14: Average nutrient concentration,<br />

population levels and bacteroide population<br />

distributions at 2800 and 5500 cycles.<br />

7. Experimenting and Refining 49<br />

Figure 7-15: Population, Bacteroide population<br />

distribution and inflammation/temperature graphs,<br />

increasing inflammation by 2 every 1200 cycles until a<br />

level <strong>of</strong> 12 is reached, showing <strong>the</strong> effects <strong>of</strong><br />

inflammation and temperature, which is relative to<br />

inflammation, on <strong>the</strong> populations.<br />

7. Experimenting and Refining 51-52<br />

Figure 7-16: Population, Bacteroide population<br />

distribution and inflammation/temperature graphs,<br />

increasing inflammation by 2 every 1200 cycles until a<br />

level <strong>of</strong> 12 is reached, showing <strong>the</strong> effects <strong>of</strong><br />

inflammation and temperature, which is relative to<br />

inflammation, on <strong>the</strong> populations with pathogens.<br />

7. Experimenting and Refining 53<br />

6


Figure 7-17: Influencing sacrifices, inflammation and<br />

temperature levels over time.<br />

7. Experimenting and Refining 60<br />

Figure 7-18: Population graph with new temperature<br />

dynamic.<br />

7. Experimenting and Refining 61<br />

Figure 7-19: Difference in sacrifice timing, with and<br />

without stationary growth phase detection.<br />

7. Experimenting and Refining 64<br />

Figure A-1: Main NetLogo interface with<br />

“<strong>Salmonella</strong>Simulation.nlogo” model loaded.<br />

Appendix B. User Guide 78<br />

Figure A-2: <strong>Model</strong> interface with common controls<br />

separated into highlighted sections.<br />

Appendix B. User Guide 79<br />

Figure A-3: Go button states. Appendix B. User Guide 82<br />

Figure B-1: Main simulation cycle. Appendix C. Maintenance Manual 88<br />

7


1. Introduction<br />

The aim <strong>of</strong> this project was to create a computer based model <strong>of</strong> a pathogenic infection, focussing<br />

on unique behaviours expressed by <strong>the</strong> pathogens mediated by phenotypic noise. Pathogens are<br />

foreign invaders in <strong>the</strong> body, which consume <strong>the</strong> resources native bacteria require and o<strong>the</strong>rwise<br />

interrupt normal bodily functions, normally causing some kind <strong>of</strong> immune reaction. Bacteria can<br />

express varying behaviours based on <strong>the</strong>ir genotype and phenotype. Genotype refers to differences<br />

based on genetic structure, whereas phenotype refers to differences caused by environmental<br />

factors.<br />

For this project I have focussed on modelling <strong>Salmonella</strong> typhimurium infection <strong>of</strong> <strong>the</strong> gut. The main<br />

goals were to make <strong>the</strong> model biologically accurate in its functionality, yet still versatile to allow<br />

users to tweak different properties, so <strong>the</strong> behaviour <strong>of</strong> <strong>the</strong> model can be viewed under different<br />

conditions.<br />

The work <strong>of</strong> Ackermann et al., specifically <strong>the</strong>ir paper “Self-destructive cooperation mediated by<br />

phenotypic noise”[1], provides a model <strong>of</strong> how <strong>the</strong> evolutionary dynamics <strong>of</strong> self-destructive<br />

cooperation could work and also supports <strong>the</strong> model with experimental results, examining a<br />

<strong>Salmonella</strong> typhimurium infection <strong>of</strong> <strong>the</strong> gut.<br />

After investigating o<strong>the</strong>r biological models <strong>of</strong> similar systems and reviewing <strong>the</strong>ir relative successes, I<br />

decided to create <strong>the</strong> model using agent based modelling techniques. I contacted one <strong>of</strong> <strong>the</strong><br />

authors <strong>of</strong> <strong>the</strong> motivating paper [1], Dr Michael Doebeli, who has a ma<strong>the</strong>matical and biological<br />

background and was <strong>the</strong>refore most likely responsible for <strong>the</strong> modelling aspects. I asked if he had<br />

any insights he could provide with regards to similar existing systems or factors that I really should<br />

consider. In his response, he stated that he could not help much “…as our models were <strong>of</strong> a<br />

different, more conceptual and less realistic type.” [2] and also “What I can say is that I don't know<br />

<strong>of</strong> any similar modeling attempts, and I would encourage you to pursue this.” [2]. The fact that one<br />

<strong>of</strong> <strong>the</strong> leading names in terms <strong>of</strong> investigating and modelling phenotypic differences, albeit in terms<br />

<strong>of</strong> evolutionary dynamics, in pathogens knows <strong>of</strong> no similar attempt at such a realistic model<br />

provides good motivation to start trying to create such models, but it is unfortunate he could not<br />

provide fur<strong>the</strong>r insights or ideas.<br />

9


2. Biological Background<br />

In order to achieve <strong>the</strong> goals <strong>of</strong> this project, I created a model which represents <strong>the</strong> gut<br />

environment, host immune response, <strong>the</strong> native bacteria population <strong>of</strong> <strong>the</strong> host and <strong>the</strong> invading<br />

salmonella pathogen population, focussing on how <strong>the</strong> attributes and behaviours <strong>of</strong> <strong>the</strong>se elements<br />

affect those <strong>of</strong> o<strong>the</strong>r elements.<br />

2.1 Environment<br />

The human gut refers to <strong>the</strong> portion <strong>of</strong> <strong>the</strong> gastrointestinal tract (digestive system) running from <strong>the</strong><br />

end <strong>of</strong> <strong>the</strong> stomach to <strong>the</strong> anus, which consists <strong>of</strong> <strong>the</strong> small intestine and <strong>the</strong> large intestine. This<br />

environment has several sub-sections, though <strong>the</strong> structure remains constant throughout. On <strong>the</strong><br />

outside <strong>of</strong> <strong>the</strong> gut, <strong>the</strong>re is <strong>the</strong> serosa tissue layer. This layer is covered with serous fluids (secreted<br />

by <strong>the</strong> tissue), which provides lubrication for <strong>the</strong> organ to reduce friction when <strong>the</strong> body is physically<br />

active. The next layer in from <strong>the</strong> serosa is <strong>the</strong> muscularis externa, which assists in moving digested<br />

material through <strong>the</strong> intestine. There is <strong>the</strong>n <strong>the</strong> sub mucosa layer, which provides some structural<br />

integrity for <strong>the</strong> intestine, preventing rupture when a large amount <strong>of</strong> material is consumed. Moving<br />

fur<strong>the</strong>r in, we find <strong>the</strong> muscularis mucosa, which is second layer <strong>of</strong> muscle, again for aiding<br />

movement <strong>of</strong> digested material. Next is <strong>the</strong> mucosa, which assists in digestion and also provides<br />

defensive mechanisms against noxious dietary substances and bacteria [3]. Finally, we have <strong>the</strong><br />

lumen, where bacteria populations grow and <strong>the</strong> digestive material is contained.<br />

Figure 2-1: <strong>Gut</strong> structure.<br />

From research <strong>of</strong> <strong>Salmonella</strong> <strong>Typhimurium</strong> behaviour [1, 4-5], <strong>the</strong> areas <strong>of</strong> interest are <strong>the</strong> intestinal<br />

lumen, where <strong>the</strong> bacteria populations reside, and what <strong>the</strong> papers refer to as <strong>the</strong> “membrane”,<br />

which I interpret to refer to <strong>the</strong> o<strong>the</strong>r layers.<br />

In <strong>the</strong> large intestine alone <strong>the</strong>re are five sections, <strong>the</strong> ascending, transverse, descending and<br />

sigmoid colons and <strong>the</strong> rectum. The lumen medium in first two sections, known collectively as <strong>the</strong><br />

proximal colon, is liquid and has a pH <strong>of</strong> around 5-7 [6], whereas <strong>the</strong> lumen in <strong>the</strong> distal colon, which<br />

includes <strong>the</strong> descending and sigmoid colons and <strong>the</strong> rectum [7], tends to be more solid and have a<br />

pH <strong>of</strong> 7 or higher [6].<br />

10


<strong>Salmonella</strong> <strong>Typhimurium</strong> uses type three secretion systems (see “Biological Background-<br />

<strong>Salmonella</strong>”) to penetrate <strong>the</strong> “membrane”. As <strong>the</strong> mucosal layer is <strong>the</strong> first barrier round <strong>the</strong><br />

lumen, I assume this is where penetration begins.<br />

The mucosa has various specific and non-specific defences. The specific defences include<br />

immunoglobulin-A, part <strong>of</strong> <strong>the</strong> complement system (see Immune Response) and T cell populations<br />

[3]. The non-specific defences consist <strong>of</strong> o<strong>the</strong>r innate immune system mechanisms such as<br />

macrophages and o<strong>the</strong>r antigen presenting cells [3]. There are also barrier mechanisms; a viscous<br />

mucin barrier and a saliva barrier [3]. These barriers not only provide potentially hostile<br />

environments for some bacteria (<strong>the</strong> saliva barrier is alkaline), but also have very tight cell<br />

structures, which blocks <strong>the</strong> translocation <strong>of</strong> bacteria and <strong>the</strong> quick turnover <strong>of</strong> <strong>the</strong> content <strong>of</strong> <strong>the</strong><br />

mucosal barrier means any bacteria in <strong>the</strong> barrier won’t be in <strong>the</strong> same place for long [3].<br />

When considering <strong>the</strong> defences presented by <strong>the</strong> mucosal layer, it will be assumed that <strong>the</strong><br />

pathogens targeting <strong>the</strong> tissue will have mechanisms to overcome <strong>the</strong>se barriers. The variation in<br />

<strong>the</strong> lumen density is <strong>of</strong> limited importance to <strong>the</strong> model, however it will govern <strong>the</strong> diffusion and<br />

movement <strong>of</strong> nutrients through <strong>the</strong> environment, which is important as bacteria are attracted to<br />

and require <strong>the</strong>se nutrients to survive. The pH <strong>of</strong> <strong>the</strong> environment is one <strong>of</strong> <strong>the</strong> controlling factors<br />

with regards to <strong>the</strong> composition and growth dynamics <strong>of</strong> <strong>the</strong> gut bacterial flora [6] and will <strong>the</strong>refore<br />

need to be considered.<br />

2.2 Native flora composition<br />

The subsections <strong>of</strong> <strong>the</strong> intestines have different population levels <strong>of</strong> different bacteria. The small<br />

intestine contains very little bacteria due to <strong>the</strong> composition <strong>of</strong> <strong>the</strong> lumen medium, which is mostly<br />

acid, bile and pancreatic secretion [8], making it hard for any bacteria to thrive. The large intestine<br />

however has very large populations <strong>of</strong> various bacteria, with some reaching concentrations <strong>of</strong> up to<br />

10 12 cells per gram <strong>of</strong> luminal content [8]. These populations vary as well, with higher populations in<br />

<strong>the</strong> proximal colon [6].<br />

The variation in species <strong>of</strong> bacteria in <strong>the</strong> human body is extensive, with an estimated 400 different<br />

species in <strong>the</strong> colon alone [6]. The main bacteria in <strong>the</strong> colon are Bacteroides, Bifidobacterium<br />

bifidum, Coliforms, Lactobacillus, Escherichia Coli, Clostridium, Streptococci, Staphylococcus aureus,<br />

Spirochetes and Enterococcus faecalis [9-12].<br />

Roughly 99.9% <strong>of</strong> <strong>the</strong> colonic bacteroides, and 30% <strong>of</strong> <strong>the</strong> total gut flora, are anaerboes [6, 13] and<br />

are made up <strong>of</strong> just four species B. <strong>the</strong>taiotaomicron, B. vulgatus, B. distasonis and B. fragilis. It is<br />

suggested that <strong>the</strong>y are <strong>the</strong> key anaerobes in health and disease [11, 13] and <strong>the</strong>re are<br />

approximately 10 11 bacteroides per frame <strong>of</strong> lumen medium in <strong>the</strong> colon [10]. The level <strong>of</strong><br />

bifidobacterium varies between 10 10 and 10 11 per gram <strong>of</strong> luminal medium an adult colon [9-10].<br />

The population densities <strong>of</strong> Lactobacillus, Streptococci, Coliforms, Escherichia Coli and Enterococcus<br />

faecalis vary between 10 6 and 10 8 per gram <strong>of</strong> luminal medium [9-10]. The Clostridium population is<br />

just over 10 3 [10]. Staphylococcus aureus forms approximately 24x10 3 per gram <strong>of</strong> faecal material,<br />

this is a negligible population level when compared to Coliforms, Streptococci and Lactobacillus,<br />

whose populations in <strong>the</strong> same experiments ranged from 24,000x10 3 to 58,000x10 3 [14].<br />

Populations <strong>of</strong> Spirochetes are also low [14].<br />

11


2.3 <strong>Salmonella</strong><br />

<strong>Salmonella</strong> heterogeneously expresses both type three secretion systems (TTSS) and flagella. The<br />

type three secretion systems are what allow <strong>the</strong> salmonella pathogens to penetrate <strong>the</strong> mucosa<br />

layer <strong>of</strong> <strong>the</strong> gut and attack <strong>the</strong> tissue [15]. During experiments [1], <strong>the</strong> TTSS were focused on as <strong>the</strong><br />

trait effected by phenotypic noise and causing self-destructive cooperation. The results <strong>of</strong> <strong>the</strong><br />

experiment showed that 15% <strong>of</strong> <strong>the</strong> final pathogen population in <strong>the</strong> gut lumen were phenotypically<br />

TTSS-1 + (expressed <strong>the</strong> type three secretion systems) and nearly 100% <strong>of</strong> <strong>the</strong> bacteria in <strong>the</strong> gut<br />

tissue were TTSS-1 + , while <strong>the</strong> all or <strong>the</strong> majority <strong>of</strong> <strong>the</strong> bacteria remaining in <strong>the</strong> gut lumen were<br />

found to express TTSS-1 - (did not express <strong>the</strong> type three secretion systems). It was also found that<br />

<strong>the</strong> intensity <strong>of</strong> <strong>the</strong> inflammation increased as <strong>the</strong> number <strong>of</strong> bacteria capable <strong>of</strong> expressing <strong>the</strong><br />

TTSS-1 + phenotype increased. The high concentration <strong>of</strong> bacteria with <strong>the</strong> TTSS-1 + phenotype in <strong>the</strong><br />

gut tissue indicates that it is an important factor for allowing <strong>the</strong> invasion <strong>of</strong> <strong>the</strong> tissue. However,<br />

<strong>the</strong> paper [1] also states that <strong>the</strong>re are likely to be o<strong>the</strong>r factors which are important for tissue<br />

invasion.<br />

Type three secretion systems refer to a dynamic whereby, when a salmonella population infects a<br />

host, some <strong>of</strong> that population inject various effectors into <strong>the</strong> membrane layer, which causes it to<br />

engulf <strong>the</strong> pathogen [4]. Once a pathogen has made host cell contact, it begins injecting <strong>the</strong> effector<br />

pool within a few seconds. As <strong>the</strong> effectors are injected, <strong>the</strong> host begins to ruffle and engulf <strong>the</strong><br />

pathogen and as this happens, <strong>the</strong> injection process accelerates as more TTSS-1 injectors are<br />

activated. <strong>Salmonella</strong> typhimurium pathogens require roughly 80 to 200 seconds to deplete <strong>the</strong>ir<br />

pool <strong>of</strong> effectors [4]. The ruffling begins approximately 20 seconds after a pathogen has docked with<br />

<strong>the</strong> host membrane [16] and halts between 30 and 60 minutes after <strong>the</strong> invasion is complete [4].<br />

Figure 2-2: <strong>Salmonella</strong> TTSS-1 injection and consequential engulfment.<br />

Once <strong>the</strong> salmonella pathogen has been engulfed by <strong>the</strong> host, <strong>the</strong> TTSS-1 process finishes and TTSS-2<br />

process begins. TTSS-2 is <strong>the</strong> process <strong>the</strong> pathogen undergoes after it has been engulfed and it<br />

involves injecting fur<strong>the</strong>r effectors, in order to prevent destruction <strong>of</strong> <strong>the</strong> pathogen in its new<br />

environment. Once <strong>the</strong> pathogen has been engulfed by a host cell, it begins replicating in that cell<br />

[4] and eventually induces apoptosis (see “2.5 Cell Life Cycle”) in <strong>the</strong> cell, which is apparent 2 hours<br />

after infection <strong>of</strong> <strong>the</strong> cell [17]. The survival and ability to thrive <strong>of</strong> salmonella pathogens within a<br />

host cell depends on <strong>the</strong> type <strong>of</strong> cell. The cells are normally macrophages, but <strong>the</strong> ability <strong>of</strong> <strong>the</strong><br />

pathogen to control <strong>the</strong> cell and grow depends on where that macrophage originated [18].<br />

Schlumberger and Hardt [4], also mention that <strong>the</strong>re are many unknowns with regards to this<br />

behaviour <strong>of</strong> salmonella pathogens. The questions noted are: “Are all <strong>the</strong> TTSS-1 effectors injected<br />

at <strong>the</strong> same time or is <strong>the</strong>re a hierarchy <strong>of</strong> injection?”, “How do local effector concentrations change<br />

12


over time?”, “How does this affect local concentrations <strong>of</strong> signalling molecules within <strong>the</strong> host cell?”<br />

and “how do <strong>the</strong>se signalling cascades cooperatively lead to responses such as engulfment?”<br />

<strong>Model</strong>ling possible answers to <strong>the</strong>se questions would be interesting, though, in order to answer <strong>the</strong><br />

protein/molecule level questions, one would need to focus more on a molecular level model (as<br />

opposed to <strong>the</strong> cellular level model I will be creating). However, <strong>the</strong> model will provide various<br />

sacrificing mechanics, so <strong>the</strong> timing <strong>of</strong> sacrifices can be explored.<br />

2.4 Factors affecting bacteria<br />

As previously mentioned, <strong>the</strong> pH <strong>of</strong> <strong>the</strong> environment affects <strong>the</strong> bacteria. There are many o<strong>the</strong>r<br />

factors, falling into <strong>the</strong> categories <strong>of</strong> physiochemical, host-bacteria interactions and microbemicrobe<br />

interactions. The pH level is one <strong>of</strong> <strong>the</strong> four physiochemical factors, <strong>the</strong> o<strong>the</strong>r three being<br />

nutrient supply, oxidation-reduction potential and oxygen tension [6]. In addition to <strong>the</strong>se factors,<br />

<strong>the</strong> temperature <strong>of</strong> <strong>the</strong> environment also has a large influence on bacterial growth and survival [19-<br />

20].<br />

The pH and nutrient levels both have a large effect on <strong>the</strong> population counts <strong>of</strong> bacteria as nutrients<br />

are required for growth and duplication and a suitable pH is required for survival. As previously<br />

mentioned, <strong>the</strong> pH <strong>of</strong> <strong>the</strong> intestine is maintained at 5-7 in <strong>the</strong> proximal colon and at 7 or higher in<br />

<strong>the</strong> latter sections [6], mediated by secretions from o<strong>the</strong>r organs and by bacteria [10]. The level <strong>of</strong><br />

nutrients is dependent on what <strong>the</strong> host consumes and how much <strong>of</strong> <strong>the</strong> nutrients are absorbed in<br />

previous parts <strong>of</strong> <strong>the</strong> digestive system.<br />

Oxygen tension refers to <strong>the</strong> level <strong>of</strong> oxygen in a medium. Salyers AA. states that if oxygen is<br />

present in <strong>the</strong> digestive medium <strong>the</strong>n colonic bacteria will not grow [11], this has been supported by<br />

experimental data [19, 21]. However, <strong>the</strong> reference works do show that some <strong>of</strong> <strong>the</strong> bacteria can<br />

survive some exposure to oxygen. The fact that <strong>the</strong> bacteria does not thrive in oxygen leads me to<br />

believe that it is normally not present and is <strong>the</strong>refore not relevant to <strong>the</strong> model, unless some o<strong>the</strong>r<br />

problem with <strong>the</strong> host exists.<br />

Oxidation-reduction potential is a measure <strong>of</strong> <strong>the</strong> potential <strong>of</strong> a species to acquire additional<br />

electrons. Studies show that growth <strong>of</strong> anaerobic bacteria is only slightly affected by this factor [21].<br />

Although <strong>the</strong> paper only looks at one <strong>of</strong> <strong>the</strong> four specific key types <strong>of</strong> bacteria <strong>of</strong> <strong>the</strong> colon, B.<br />

fragilis, it shows similar results for all three <strong>of</strong> <strong>the</strong> anaerobic bacteria tested. I will assume that <strong>the</strong><br />

o<strong>the</strong>r anaerobic bacteria behave in a similar manner and <strong>the</strong>refore this factor will not be considered<br />

important for this model.<br />

The host-bacteria interactions which control <strong>the</strong> gut bacteria composition are saliva, bile, gastric<br />

secretion, pancreatic secretion and immune systems. Saliva, bile, gastric secretions and pancreatic<br />

secretions all have a large effect on <strong>the</strong> small intestine environment, preventing substantial bacterial<br />

growth [6, 8]. In <strong>the</strong> more intensely populated large intestine, <strong>the</strong>re is only <strong>the</strong> saliva barrier, which<br />

forms part <strong>of</strong> <strong>the</strong> mucosa layer <strong>of</strong> <strong>the</strong> gut. However, <strong>the</strong> environment will still be influenced by <strong>the</strong><br />

elements affecting <strong>the</strong> small intestine lumen medium as it will eventually flow into <strong>the</strong> large<br />

intestine. The immune properties <strong>of</strong> <strong>the</strong> gut mucosal layer have been mentioned and more<br />

information on <strong>the</strong> immune system function follows this section.<br />

13


The microbe-microbe interactions affecting colonic bacteria composition are bacteriophages,<br />

bacteriocines and toxic metabolites. Bacteriophages are viruses which attack bacteria. For <strong>the</strong><br />

purposes <strong>of</strong> <strong>the</strong> model, <strong>the</strong>se will also be omitted from <strong>the</strong> model as <strong>the</strong>y are external influences not<br />

normally found in <strong>the</strong> environment. One definition <strong>of</strong> toxic metabolites is “potentially harmful<br />

chemicals produced through normal function” [22]. As this factor falls under microbe-microbe<br />

interactions, I will assume that it refers to toxic metabolites produced by <strong>the</strong> bacteria. This makes<br />

toxic metabolites very similar to bacteriocines, which are chemicals produced by bacteria to inhibit<br />

<strong>the</strong> growth <strong>of</strong> related or similar bacteria. Bacteriocines and toxic metabolites will be important in<br />

<strong>the</strong> model, if various types <strong>of</strong> native micr<strong>of</strong>lora are to be individually represented.<br />

2.5 Cell life cycle<br />

Organisms can be made up <strong>of</strong> ei<strong>the</strong>r a single cell or multiple cells. Single cell organisms are called<br />

prokaryotes and salmonella and most <strong>of</strong> <strong>the</strong> native micr<strong>of</strong>lora in <strong>the</strong> human gut are prokaryote<br />

organisms. Multiple cell organisms are called eukaryotes, which is what all more complex organisms<br />

are, ranging from yeasts, such as Candida Albicans, to human beings.<br />

All prokaryotic cells (which <strong>the</strong> native bacteria and salmonella pathogen are), follow a very simple<br />

life cycle <strong>of</strong> growth, DNA syn<strong>the</strong>sis and cytokinesis. During <strong>the</strong> growth stage, <strong>the</strong> cell performs its<br />

normal tasks and gains energy. The second stage, syn<strong>the</strong>sis, is when a cell begins to duplicate its<br />

DNA strands and o<strong>the</strong>rwise prepare for cell division. The final stage, cytokinesis is when <strong>the</strong> cell<br />

actually divides, producing a new cell. In microbiology, <strong>the</strong> generation time <strong>of</strong> a cell is <strong>the</strong> period <strong>of</strong><br />

time between two cell divisions, <strong>the</strong> duplication time is how long it takes an entire population to<br />

double. Figure 2-3 shows <strong>the</strong> life cycle and gives an idea <strong>of</strong> <strong>the</strong> time span <strong>of</strong> each stage. It should be<br />

noted that <strong>the</strong> rate <strong>of</strong> division is not constant, with most bacteria moving through a lag phase,<br />

where little division occurs and, if conditions are favourable, enter <strong>the</strong> exponential phase where cell<br />

division increases dramatically.<br />

Division<br />

Syn<strong>the</strong>sis<br />

.<br />

Figure 2-3: Prokaryote Life Cycle.<br />

There are two ways in which a cell can die. The first is necrosis, which occurs when a cell becomes<br />

damaged in some way or cannot get <strong>the</strong> nutrients it requires to survive. The second is apoptosis,<br />

which is also known as programmed cell death and occurs generally for <strong>the</strong> benefit <strong>of</strong> <strong>the</strong> organism<br />

<strong>the</strong> cell is a part <strong>of</strong>. It can be triggered by <strong>the</strong> cell itself, surrounding tissue or an immune system cell<br />

and is normally induced when a cell becomes irreparably damaged (e.g. DNA damage or viral<br />

infection).<br />

In order to move and <strong>the</strong>refore gain <strong>the</strong> nutrients <strong>the</strong>y require, bacteria have string-like flagella.<br />

They can use <strong>the</strong>se to propel <strong>the</strong>mselves forward, by counter-clockwise rotation or, rotate <strong>the</strong>m<br />

clockwise, causing a “tumble” and <strong>the</strong>refore a direction change. As bacteria near chemo-attractants,<br />

.<br />

.<br />

Growth<br />

14


such as its food source, swimming becomes more regular than tumbling and vice-versa. This<br />

variation in swimming/tumbling frequency helps keep bacteria in areas with higher nutrient<br />

concentrations.<br />

2.6 Immune response<br />

The immune system consists <strong>of</strong> various types <strong>of</strong> cells, each acting independently on simple, local<br />

rules [23]. It has a series <strong>of</strong> complementary natures, which are self/non-self recognition,<br />

innate/acquired immunity and cell-mediated/humoral immunity [24].<br />

The higher level defences <strong>of</strong> <strong>the</strong> immune system consist <strong>of</strong> skin, sneezing, acidic compounds<br />

generated by <strong>the</strong> body on skin and hair follicles also provide general ways to expel or destroy<br />

bacteria. The more interesting <strong>of</strong> <strong>the</strong>se higher-level systems, with regards to this project, are <strong>the</strong><br />

sticky mucus in <strong>the</strong> respiratory and gastrointestinal tract, which can trap many micro organisms.<br />

Also, <strong>the</strong> normal floras which inhabit <strong>the</strong> body are <strong>of</strong> interest as <strong>the</strong>y will work to destroy any o<strong>the</strong>r<br />

bacteria which try to occupy <strong>the</strong> same ecological niche in <strong>the</strong> body as <strong>the</strong>y are.<br />

The only cellular agents <strong>of</strong> <strong>the</strong> innate and active immune systems which are important for selfdestructive<br />

cooperation and type three secretion systems are <strong>the</strong> macrophages, which pathogens<br />

occupy after penetrating <strong>the</strong> intestinal membrane. However, this portion <strong>of</strong> a pathogen’s existence<br />

will not be considered for simplicity.<br />

As part <strong>of</strong> <strong>the</strong> innate immune response, macrophages release various inflammatory mediators,<br />

which work to kill <strong>the</strong> cause <strong>of</strong> <strong>the</strong> immune reaction and alert o<strong>the</strong>r immune cells to <strong>the</strong> detection <strong>of</strong><br />

a problem [25]. In <strong>the</strong> early stages, <strong>the</strong> release <strong>of</strong> mediators such as leukotrienes, prostaglandins<br />

and histamine is stimulated by infection or injury. As <strong>the</strong>se mediators bind to receptors on <strong>the</strong><br />

endo<strong>the</strong>rial cells (which line <strong>the</strong> capillaries), <strong>the</strong> cells begin to contract, making it easier for<br />

leukocytes (white blood cells) to perform extraversion (move through <strong>the</strong> capillary “walls”). A full<br />

list <strong>of</strong> inflammatory response functions and chemical mediators can be seen in table 2-1.<br />

15


FUNCTION MEDIATORS<br />

Increased vascular permeability <strong>of</strong> small blood<br />

vessels<br />

Histamine, Serotonin, Bradykinin,<br />

C3a, C5a, PGE2, LTC4, LTD4,<br />

Prostacyclins, Activated Hagerman factor,<br />

High-molecular-weight kininogen fragments,<br />

Fibrinopeptides.<br />

Vasoconstriction TXA2, LTB4, LTC4, LTD4, C5a, N-formyl peptides<br />

Smooth muscle contraction C3a, C5a, Histamine, LTB4, LTC4, LTD4, TXA2,<br />

Serotonin, PAF, Bardykinin<br />

Increased endo<strong>the</strong>lial cell stickiness IL-1, TNF-α , MCP, endotoxin, LTB4<br />

Mast cell degranulation C5a, C3a<br />

Phagocytes<br />

Stem cell proliferation IL-3, G-CSF, GM-CSF, M-CSF<br />

Recruitment from bone marrow CSFs, IL-1<br />

Adherence/aggregation iC3b, IgG, Fibronectine, Lectins<br />

Chemotaxis C5a, LTB4, IL-8 (and o<strong>the</strong>r chemokines), PAF,<br />

Histamine, Laminin, N-formyl peptides, Collagen<br />

fragments, Lymphocyte-derived chemotactic<br />

factor, Fibrinopeptides<br />

Lysosomal granule release C5a, IL-8, PAF, most chemoattractants,<br />

phagocytosis<br />

Production <strong>of</strong> reactive oxygen intermediaries C5a, TNF-α, PAF, IL-8, Phagocytic particles, IFN-γ<br />

increases Fc receptor expression<br />

Granuloma formation IFN-γ, TNF-α, PGE2, IL-6<br />

Pyrogens IL-1, TNF-α, PGE2, IL-6<br />

Pain PGE2, Bradykinin<br />

Table 2-1: Inflammatory response functions and mediators (information from <strong>the</strong> work <strong>of</strong> V Stvrtinova et al.<br />

[26]).<br />

The inflammatory response will continue until <strong>the</strong> invader is destroyed. In <strong>the</strong> case <strong>of</strong> salmonella,<br />

<strong>the</strong> invaders would be <strong>the</strong> cooperative pathogens who are attacking <strong>the</strong> tissue. T-helper cells are<br />

responsible for mediating <strong>the</strong> end <strong>of</strong> <strong>the</strong> immune response. All cells involved in <strong>the</strong> immune process<br />

are “programmed” to die, unless <strong>the</strong>y receive signals from o<strong>the</strong>r cells to stay alive. It is <strong>the</strong> T-helper<br />

cells that emit <strong>the</strong>se “stay alive” signals. This method <strong>of</strong> cell regulation is called apoptosis.<br />

In terms <strong>of</strong> <strong>the</strong> salmonella infection, <strong>the</strong> main point <strong>of</strong> interest is <strong>the</strong> self-cooperative and<br />

destructive behaviour exhibited by some members <strong>of</strong> <strong>the</strong> invading population, which induces an<br />

inflammatory immune response in <strong>the</strong> host [1]. This inflammatory response has been shown to<br />

benefit <strong>the</strong> invading population, due to environmental changes suppressing <strong>the</strong> native microbe<br />

populations [1, 5]. However, as is shown above, <strong>the</strong> inflammatory response alone is a very<br />

complicated process and <strong>the</strong>refore it is likely only a partial or simulated model <strong>of</strong> this response will<br />

be included in <strong>the</strong> model.<br />

16


2.7 Environment and bacteria data<br />

I will now outline <strong>the</strong> test values I will use for <strong>the</strong> biological properties in <strong>the</strong> model. The figures<br />

below are what I am considering <strong>the</strong> biological norm. As you will notice, I am lacking some data for<br />

certain bacteria in <strong>the</strong> colon, which is because I simply could not find <strong>the</strong> data. A lot <strong>of</strong> <strong>the</strong> data<br />

below also don’t refer to <strong>the</strong> bacteria’s behaviour in <strong>the</strong> colon or gastric juices specifically, so I had<br />

to generalise based on <strong>the</strong> information I could find. I am not convinced <strong>the</strong>se values will provide an<br />

accurate simulation <strong>of</strong> <strong>the</strong> infection dynamics, as bacteria behave differently with <strong>the</strong> slightest<br />

environmental change, be it pH, temperature, nutrient level or even what is providing <strong>the</strong> nutrients.<br />

However, <strong>the</strong>se values do provide a good starting point for defining a range <strong>of</strong> native bacteria and<br />

<strong>the</strong> salmonella pathogens.<br />

Normal colon temp: ~36 o C. The reference, [27], actually states <strong>the</strong>se as <strong>the</strong> rectal temperature,<br />

however, from <strong>the</strong> values I found, this is <strong>the</strong> closest body region temperatures I found.<br />

Feverous colon temp: High <strong>of</strong> 39.4 o C [28]<br />

Normal colon pH: 5 - 7+ [6]<br />

Cooperator injection activation: A few seconds [4]<br />

Cooperator effector pool depletion: Between 80 and 200 seconds [4]<br />

Host membrane ruffling: Begins approx 20 seconds after injection starts, ends 30-60 minutes after<br />

invasion is completed.<br />

Infected host cell apoptosis: Less than 2 hours after infection.<br />

<strong>Salmonella</strong> generation time: ~31 minutes (derived from data from [29-30])<br />

<strong>Salmonella</strong> pH: Survives between 3.8 and 9.5. Optimum pH is between 7 and 7.5 [31-32].<br />

<strong>Salmonella</strong> temperature tolerance: Survives between 7 o C and 49.5 o C, but below 15 o C, growth rate is<br />

greatly slowed. Optimum temperature is 35 o C - 37 o C [32].<br />

Bacteroides<br />

B. <strong>the</strong>taiotaomicron generation time: ~52 minutes [33] (average)<br />

B. vulgatus generation time: ~53 minutes [33] (average)<br />

B. distasonis generation time: ~83 minutes [33] (average)<br />

B. fragilis generation time: ~32 minutes [33] (average)<br />

Bacteroide pH: Survives in pH levels above ~6 [33]. The paper, [33], also shows increased growth as<br />

<strong>the</strong> pH increases up to 6.7. As <strong>the</strong> maximum pH <strong>of</strong> <strong>the</strong> colon (as mediated by <strong>the</strong> body) is just over 7<br />

[4], I will assume that <strong>the</strong> native flora will continue to increase in growth rate until around 9 and<br />

above 5.5. The optimal pH will be considered to be 6.7.<br />

Bacteroide temperature tolerance: The work <strong>of</strong> H<strong>of</strong>fmann and Justesen [19] indicate that in certain<br />

substances, <strong>the</strong> bacteroides seem to survive longer in low temperature conditions, decreasing as <strong>the</strong><br />

temperature rises. However, Hagen et al. [34], show that in o<strong>the</strong>r substances, <strong>the</strong> survival rate at<br />

certain temperatures can vary greatly. As <strong>the</strong>re is a tremendous amount <strong>of</strong> variation and I am unure<br />

<strong>of</strong> <strong>the</strong> relation <strong>of</strong> any <strong>of</strong> <strong>the</strong> substances used in <strong>the</strong> experiments to <strong>the</strong> colon lumen medium, I will<br />

assume a survival between 3 o C and 41 o C. Also, as bacteroides thrive in <strong>the</strong> colon environment, I will<br />

assume an optimal growth temperature <strong>of</strong> 36 o C.<br />

Bifidobacterium bifidum generation time: ~98 minutes (derived from [35])<br />

Bifidobacterium bifidum pH: Optimal ~6.75 [36]. Survives between 2 and 9 [36].<br />

Bifidobacterium bifidum temperature tolerance: Optimum ~39 o C and Survives between 20 o C and<br />

45 o C [36].<br />

17


Escherichia Coli generation time: ~29 minutes (average value from data in [30])<br />

Escherichia Coli pH: Optimal 6-7 [37].<br />

Escherichia Coli temperature tolerance: Survives between 7-8 o C and 46 o C. Optimal 37 o C [37].<br />

Clostridium perfringens generation time: ~20 minutes (from data in [38-39]).<br />

Clostridium perfringens pH: Optimal is between 6.0 and 7.0 [39].<br />

Clostridium perfringens temperature tolerance: Survives between 12 o C – 50 o C, optimum<br />

temperature is between 43 o C and 47 o C [39].<br />

18


3. Related Work<br />

I have taken some time to examine some existing biological systems models and simulators. The<br />

purpose <strong>of</strong> looking at <strong>the</strong>se existing related systems is to see how o<strong>the</strong>rs have approached modelling<br />

biological systems and cell interactions, with <strong>the</strong> goal <strong>of</strong> implementing some <strong>of</strong> <strong>the</strong> features <strong>of</strong> my<br />

own model in a similar fashion and also providing insights into o<strong>the</strong>r features which I may not have<br />

o<strong>the</strong>rwise considered.<br />

The existing systems I found tend to focus on immune system simulation. Though my project is<br />

focussed more on bacteria population dynamics, <strong>the</strong> cell interaction processes and how actions are<br />

determined will still be applicable. Additionally, some <strong>of</strong> <strong>the</strong> systems focussed on simulating<br />

immune responses to specific pathogens, which could also provide some useful information on<br />

pathogen simulation.<br />

CAFISS<br />

CAFISS (complex adaptive framework for immune system simulation) is a Java program, developed<br />

by Joc Cing Tay and Atul Jhavar, which uses complex adaptive systems (CAS), developed by John<br />

Holland, and some features <strong>of</strong> cellular automata, genetic algorithms and Holland classifier systems.<br />

It has been implemented in an event driven and distributed manner, with each agent having its own<br />

processing thread [23]. The implementation described in this paper, [23], is designed specifically to<br />

simulate <strong>the</strong> immune response to HIV.<br />

One <strong>of</strong> <strong>the</strong> main motivating factors <strong>of</strong> this system appears to be to observe <strong>the</strong> feasibility and<br />

effectiveness <strong>of</strong> using complex adaptive systems, specifically Holland classifier model, to model<br />

biological systems, instead <strong>of</strong> just ordinary differential equations or cellular automata. A classifier is<br />

a simple if-<strong>the</strong>n rule and <strong>the</strong> classifier system is designed to learn <strong>the</strong>se rules over time, guiding its<br />

performance. The agents <strong>of</strong> <strong>the</strong> system receive environment information, process it using a rule<br />

base, <strong>the</strong>n act. The rules are weighted using algorithms, based on performance. The rules and <strong>the</strong>ir<br />

strengths are not global, but specific to each agent in <strong>the</strong> system.<br />

CAFISS uses a grid structure to represent <strong>the</strong> body, with each grid location containing a number <strong>of</strong><br />

cells. These cells can be different and all express autonomous behaviours. Then, over time, viral<br />

cells are added to grid locations at random and <strong>the</strong> two cell types <strong>the</strong>n compete to destroy one<br />

ano<strong>the</strong>r. The specifics <strong>of</strong> <strong>the</strong> interactions and dynamics <strong>of</strong> this competition are unknown, though<br />

<strong>the</strong>y probably emulate <strong>the</strong> active immune system behaviours.<br />

The distributed nature <strong>of</strong> <strong>the</strong> system is interesting as it gives each agent <strong>the</strong> ability to process its<br />

behaviours independently and maintains <strong>the</strong> immune system property <strong>of</strong> no central control and also<br />

eliminates global times steps. Ano<strong>the</strong>r point <strong>of</strong> interest is <strong>the</strong> apparent disregard for simulating <strong>the</strong><br />

environment. The grid like structure gives some boundaries for cell locations, but is not<br />

representative <strong>of</strong> any particular environment, suggesting that <strong>the</strong> focus <strong>of</strong> <strong>the</strong> model is solely on <strong>the</strong><br />

immune system – pathogen interactions, almost completely ignoring o<strong>the</strong>r body functions and<br />

native agents who may influence <strong>the</strong> model. However, even with <strong>the</strong>se omissions, which I would<br />

assume would greatly affect <strong>the</strong> behaviour <strong>of</strong> <strong>the</strong> system, when <strong>the</strong> results <strong>of</strong> testing were<br />

compared to actual biological data, <strong>the</strong>y were found to be reasonably accurate and <strong>the</strong> authors state<br />

that <strong>the</strong> system shows promise for CAS biological systems models [23].<br />

19


IMMSIM and Variants<br />

The original IMMSIM program was written in ALP2, by Philip E. Seiden, which meant <strong>the</strong>re is no<br />

scope for dynamic memory allocation and limited <strong>the</strong> simulation to small scales [23]. The system<br />

was re-implemented in C by F. Castiglione and had parallel computing features added. The parallel<br />

nature indicates that C-IMMSIM also adheres to <strong>the</strong> decentralised nature <strong>of</strong> <strong>the</strong> immune system. As<br />

mentioned before, IMMSIM focuses on <strong>the</strong> active immune response and more specifically, <strong>the</strong><br />

humoral response, though <strong>the</strong> system is designed in such a way that <strong>the</strong> immune reactions to<br />

different pathogens can be simulated.<br />

One <strong>of</strong> <strong>the</strong> most interesting features <strong>of</strong> IMMSIM, is <strong>the</strong> bit string representation <strong>of</strong> receptors. A B<br />

cell, for example, would have its receptor represented by a bit string and a MHC II molecule,<br />

represented in <strong>the</strong> same way [40]. The receptor would match <strong>the</strong> pathogen whose presenting<br />

molecule is <strong>the</strong> complement <strong>of</strong> <strong>the</strong> receptor bit string, or close to it using some affinity metric. This<br />

bit string representation <strong>of</strong> receptors and molecules was first applied by Seiden and Celada [23] in<br />

<strong>the</strong> original IMMSIM and provides an accurate simulation <strong>of</strong> self/non-self discrimination. The<br />

technique has been used by many o<strong>the</strong>r systems [23, 40].<br />

The method used to determine <strong>the</strong> actions <strong>of</strong> agents is also interesting. Instead <strong>of</strong> rules being<br />

chosen based strictly upon states, a set <strong>of</strong> possible actions for each agent is generated each cycle<br />

and <strong>the</strong>n a single action chosen using probabilities. This provides a more random, though still rule<br />

based, expression <strong>of</strong> behaviours.<br />

The system also uses a grid structure for <strong>the</strong> environment, though <strong>the</strong> grid is hexagonal, which<br />

allows agents to move to 6 possible locations instead <strong>of</strong> 4, as it would be for a square grid.<br />

Increasing <strong>the</strong> degrees <strong>of</strong> movements gives a more accurate representation <strong>of</strong> <strong>the</strong> infinite degrees <strong>of</strong><br />

movement available to <strong>the</strong> cells in reality. The environment, as with CAFISS, does not seem to<br />

adhere to any specific body region, with <strong>the</strong> various cells being “injected” into cells, as opposed to<br />

realistic simulation <strong>of</strong> cell movement e.g. immune system agents moving from capillaries to tissue<br />

etc, but again has very positive testing results and has been used to investigate various biological<br />

interactions [40].<br />

SIMMUNE and CyCells<br />

These two systems are very similar in that <strong>the</strong>y attempt to create more general models <strong>of</strong> cell and<br />

molecule interactions [40], allowing users to define behaviours at both levels. Both models are<br />

implemented on a 3 dimensional grid, though SIMMUNE also allows <strong>the</strong> user to define<br />

compartments <strong>of</strong> <strong>the</strong> grid to represent different parts <strong>of</strong> <strong>the</strong> environment and which cells can move<br />

between <strong>the</strong> compartments and at what rate. This flexibility <strong>of</strong> defining <strong>the</strong> molecule and cell<br />

interactions means that <strong>the</strong> systems can be used for more than just immune system simulation [41].<br />

I am unsure how much CyCells allows user customisation <strong>of</strong> <strong>the</strong> environment, but due to its<br />

generalised nature and <strong>the</strong> possibility <strong>of</strong> it being used to model more than immune system<br />

responses [40, 42], it is very likely that some kind <strong>of</strong> customisation <strong>of</strong> <strong>the</strong> environment is possible.<br />

The actions <strong>of</strong> cells in SIMMUNE are determined using what <strong>the</strong>y call “cellular stimulus response<br />

mechanisms” [41]. These are effectively series <strong>of</strong> if-<strong>the</strong>n statements, with cells performing actions<br />

when certain conditions needed to trigger that action are met. The conditions part <strong>of</strong> <strong>the</strong><br />

action/decision process consists <strong>of</strong> one or more conditions linked with logical AND or AND NOT and<br />

<strong>the</strong> action part consists <strong>of</strong> one or more actions [41]. Cell actions in CyCells operate in a fairly similar<br />

20


way, using a “sense-process-act” model for cell behaviours [40, 42]. This model for cell actions is<br />

made possible by CyCells approach to <strong>the</strong> immune system modelling, continuously representing<br />

molecular concentrations and having cells react to and modify those concentrations [42].<br />

The interesting feature <strong>of</strong> <strong>the</strong>se models is <strong>the</strong> method <strong>of</strong> decision making for cells, which seems to<br />

work on <strong>the</strong> sense-process-act model in both systems. Although this behaviour model is not ideal<br />

for all cell behaviours, such as apoptosis, it will be useful to implement a similar system for<br />

determining agent movement, effecter secretion by salmonella agents and o<strong>the</strong>r similar processes.<br />

Innate Immune Response (NetLogo simulation)<br />

This model <strong>of</strong> <strong>the</strong> innate response was created by Gary An and simulates <strong>the</strong> interface between <strong>the</strong><br />

endo<strong>the</strong>lial cells that line capillaries, and blood-borne inflammatory cells and mediators <strong>of</strong> <strong>the</strong><br />

immune response. The model is freely available online from <strong>the</strong> NetLogo website.<br />

NetLogo restricts <strong>the</strong> simulation to a 2 dimensional grid. The model has a series <strong>of</strong> variables<br />

assigned to each patch, each representing one <strong>of</strong> <strong>the</strong> immune system mediators, however, <strong>the</strong><br />

author admits that <strong>the</strong> actions <strong>of</strong> <strong>the</strong>se mediators is incomplete. To simulate infections and injuries,<br />

<strong>the</strong> model uses patch variables and cellular automata techniques.<br />

The agents in <strong>the</strong> model consist <strong>of</strong> endo<strong>the</strong>rial cells, neutrophils, monocytes and macrophages.<br />

These all react to <strong>the</strong> mediator concentrations on <strong>the</strong> patches. This is similar to <strong>the</strong> sense-processact<br />

model used in o<strong>the</strong>r biological systems models, though it appears <strong>the</strong>re is no separation <strong>of</strong> sense<br />

and act behaviours, i.e. a single cell will sense <strong>the</strong>n act, <strong>the</strong>n next cell etc.<br />

BacSim<br />

BacSim is an agent based model <strong>of</strong> bacterial population growth. It models <strong>the</strong> growth dynamics at<br />

<strong>the</strong> cellular level, with each <strong>of</strong> <strong>the</strong> cells being an individual agent and operating on a 2D plane, which<br />

is coated in some kind <strong>of</strong> nutrient source for <strong>the</strong> bacteria agents [43].<br />

Some <strong>of</strong> <strong>the</strong> most interesting aspects <strong>of</strong> <strong>the</strong> BacSim model are <strong>the</strong> details on how <strong>the</strong>y handled<br />

certain biological functions. For example, <strong>the</strong> rate at which a cell consumes <strong>the</strong> nutrients it uptakes,<br />

is constant, with <strong>the</strong> growth rate, being a function <strong>of</strong> that consumption rate, <strong>the</strong> rate <strong>of</strong> nutrient<br />

uptake (which is proportional to cell surface area) and some maximum growth rate. Also, <strong>the</strong><br />

diffusion mechanism for nutrient spread through <strong>the</strong> environment is <strong>of</strong> interest. A second-order<br />

approximation is used with weighting applied to <strong>the</strong> nine cells, based on nutrient concentration,<br />

involved in <strong>the</strong> diffusion shown in figure 3-1. [43]<br />

1 4 1<br />

4 -20 4<br />

1 4 1<br />

Figure 3-1: Diffusion weights in BacSim.<br />

Kreft et al. [43] also cite <strong>the</strong> work <strong>of</strong> Donachie, which states that <strong>the</strong> triggering <strong>of</strong> DNA replication<br />

(DNA syn<strong>the</strong>sis) in a cell occurs at masses which are multiples on one mass [44]. As <strong>the</strong> mass <strong>of</strong> a<br />

cell is relative to <strong>the</strong> resources it consumes, this makes it clear that <strong>the</strong>re is a direct correlation<br />

between nutrient level and cell division.<br />

21


4. Approach<br />

Biologists and ma<strong>the</strong>maticians normally use ordinary differential equations are used to model<br />

biological systems, which give empirical data describing a host-pathogen interaction and outcomes<br />

<strong>of</strong> <strong>the</strong> interactions. The use <strong>of</strong> ordinary differential equations is useful for this purpose as a lot is<br />

known about <strong>the</strong>m and how <strong>the</strong>y behave and <strong>the</strong>y require few parameters [45].<br />

However, ordinary differential equations do not account for spatial information, which means <strong>the</strong>y<br />

assume that populations are homogenous and distributed equally across <strong>the</strong> simulation space, an<br />

assumption which could heavily influence <strong>the</strong> outcome <strong>of</strong> <strong>the</strong> simulation [45]. To account for this<br />

weakness, partial differential equations can be used. However, as <strong>the</strong> equations get more<br />

complicated, this and o<strong>the</strong>r advantages <strong>of</strong> partial differential equations quickly become<br />

overshadowed by <strong>the</strong> disadvantage <strong>of</strong> <strong>the</strong> complexity.<br />

The main problem with <strong>the</strong>se approaches is that <strong>the</strong>y only provide data for a generalised, average<br />

situation. This is because <strong>the</strong>y don’t take into account <strong>the</strong> individuality <strong>of</strong> <strong>the</strong> agents involved in <strong>the</strong><br />

system (pathogens, native floras, immune system agents etc) or <strong>the</strong> spatial information.<br />

In an attempt to address <strong>the</strong>se issues, John Von Neumann and Stanislaw Ulam introduced agent<br />

based modelling as an approach to simulating biological systems [45]. As <strong>the</strong>y were specifically<br />

designed for implementing biological systems, many successful systems, for teaching and research<br />

purposes, have been completed in <strong>the</strong> past using agent based modelling techniques [23, 41, 45-48].<br />

<strong>Agent</strong> based models are stochastic models which can be used to describe populations <strong>of</strong> interacting<br />

agents using simple rules, which dictate <strong>the</strong> behaviour <strong>of</strong> those agents. As each agent responds<br />

individually to changes in <strong>the</strong> environment (or o<strong>the</strong>r cues), allowing emergent behaviours to<br />

develop, so <strong>the</strong> simulations become more valuable for studying autonomous systems. Additionally,<br />

<strong>the</strong> rules <strong>of</strong> agent based models tend to relate to <strong>the</strong> language used to describe <strong>the</strong> model, so it is<br />

easier to relate agent based models with <strong>the</strong> real world than it is ma<strong>the</strong>matical models.<br />

The weakness <strong>of</strong> agent based modelling lies in translating <strong>the</strong> results into natural language. When<br />

using differential equations, <strong>the</strong> worst case scenario would be a large set <strong>of</strong> complicated equations,<br />

but <strong>the</strong> equations could be reorganised into a more meaningful manner. With agent based<br />

modelling, many <strong>of</strong> <strong>the</strong> intricacies <strong>of</strong> <strong>the</strong> system lie in <strong>the</strong> code and implementation strategy, which<br />

could be overlooked when translating <strong>the</strong> results into words or trying to explain any emergent<br />

behaviours [45].<br />

In order to create an agent based model, an object oriented approach would be required in order to<br />

create separate classes for each agent and <strong>the</strong>refore define individual behaviours, properties and<br />

variables (for flags e.g. if an invading agent has been marked by <strong>the</strong> immune system). There are<br />

many object oriented languages available, but I already have considerable knowledge <strong>of</strong> Java and I<br />

don’t believe learning o<strong>the</strong>r languages would provide any benefits which would outweigh <strong>the</strong> time<br />

spent doing so.<br />

In addition to <strong>the</strong> option <strong>of</strong> using Java to program <strong>the</strong> model from scratch, <strong>the</strong>re are tools designed<br />

specifically for creating agent based models such as NetLogo and SeSAm. These tools provide an<br />

interface for creating agents and environments. This means that instead <strong>of</strong> writing a complete class<br />

for each agent, it would be done automatically when a new type <strong>of</strong> agent is defined, although <strong>the</strong>re<br />

22


are libraries, such as SWARM, which provide frameworks for agent based modelling in object-C and<br />

Java, <strong>the</strong> modelling tools also provide built in visualisation functionality. These visualisation<br />

functionalities are <strong>the</strong> main reason I am considering using NetLogo or SeSAm as I have limited<br />

knowledge <strong>of</strong> graphics programming, even in Java, though my experience is sufficient to know that<br />

creating a suitable visualisation <strong>of</strong> <strong>the</strong> model would be a time consuming process. As this project is<br />

not an exercise in graphics programming, I wish to limit <strong>the</strong> time spent on such periphery coding,<br />

especially when sufficient systems already exist.<br />

I have used NetLogo before, so if an agent based modelling tool was to be used, I would probably<br />

opt for it. I have taken a look at SeSAm and it provides some good interface tools for creating<br />

agents, with states and rules represented in a UML style diagram, as opposed to <strong>the</strong> code-based<br />

approach <strong>of</strong> NetLogo. Although this is probably a very useful feature for <strong>the</strong> less computer-oriented<br />

individual, I have a good programming background so it doesn’t present that much <strong>of</strong> an advantage.<br />

The use <strong>of</strong> SeSAm is fur<strong>the</strong>r disadvantaged by <strong>the</strong> fact that I would need to learn <strong>the</strong> rest <strong>of</strong> <strong>the</strong><br />

interface too, such as programming <strong>the</strong> environment and agent reactions.<br />

An unfortunate result <strong>of</strong> using one <strong>of</strong> <strong>the</strong>se agent based modelling tools is that my control over <strong>the</strong><br />

basic interactions and data processing will be limited. For example, when looking into existing<br />

biological systems models, it appears that <strong>the</strong> developers attempted to perform <strong>the</strong> decision making<br />

for cells and once all agents had decided on an action, perform those actions stochastically. I know<br />

NetLogo provides stochastic mechanisms when iterating through agents, though separating decision<br />

making and action performing may be complex and could lead to messy code. This is made more<br />

likely by <strong>the</strong> fact that NetLogo code is created in one file. Careful planning and thorough<br />

commenting will be needed to maintain readability.<br />

Should Java or some o<strong>the</strong>r object oriented be used, multi threaded programming techniques could<br />

be implemented to provide stochastic action performing. The separating decision making from<br />

action performing would still require <strong>the</strong> code to be written in a specific way, so <strong>the</strong>re would be no<br />

difference in work required to implement that feature. Using Java would also allow <strong>the</strong> creation <strong>of</strong><br />

separate classes and <strong>the</strong> implementing <strong>of</strong> certain processes in those classes, making clear code<br />

maintenance easier. Portability <strong>of</strong> <strong>the</strong> code is equal as NetLogo is Java implemented and allows <strong>the</strong><br />

model to be exported as a Java applet.<br />

When all <strong>of</strong> <strong>the</strong> above is considered, I believe a NetLogo implementation <strong>of</strong> <strong>the</strong> model would be <strong>the</strong><br />

best option.<br />

23


5. Required Behaviour<br />

Table 5-1 shows a list <strong>of</strong> requirements and <strong>the</strong> priorities I have assigned to <strong>the</strong>m. Although this is a<br />

requirements list, some design decisions were made so I have also included notes explaining how<br />

<strong>the</strong> decisions I made lead to <strong>the</strong> priorities some requirements have been assigned or how <strong>the</strong><br />

decisions lead to <strong>the</strong> existence <strong>of</strong> <strong>the</strong> requirement.<br />

Ref. Description Priority Notes<br />

1 Environment<br />

1.1 Proportional representation <strong>of</strong> lumen<br />

and membrane.<br />

HIGH<br />

1.2 <strong>Gut</strong> lumen<br />

1.2.1 Nutrient level HIGH<br />

1.2.2 pH level HIGH<br />

1.2.3 Influence on pH from previous areas <strong>of</strong> HIGH<br />

digestive system<br />

1.2.4 Nutrient diffusion MED<br />

1.2.5 pH diffusion MED<br />

1.2.6 Flushing<br />

1.2.6.1 Remove percentage <strong>of</strong> bacteria<br />

population in lumen per flush<br />

MED<br />

1.2.6.2 Diffuse nutrients MED<br />

These requirements would provide a<br />

basic simulation <strong>of</strong> a flush.<br />

1.2.6.3 Diffuse pH MED<br />

1.3 Membrane Layer<br />

1.3.1 Ability to block bacteria HIGH<br />

1.3.2 pH Level MED Although <strong>the</strong> pH level in <strong>the</strong> mucosa<br />

barrier provides a hostile environment<br />

for bacteria, none <strong>of</strong> <strong>the</strong> bacteria will<br />

enter <strong>the</strong> area in <strong>the</strong> model. The pH <strong>of</strong><br />

<strong>the</strong> membrane layer will be used solely<br />

to influence <strong>the</strong> pH <strong>of</strong> <strong>the</strong> lumen.<br />

2 Bacteria<br />

2.1 General Behaviours<br />

2.1.1 Movement towards high nutrient<br />

HIGH<br />

2.1.2<br />

concentrations<br />

pH control (through secretions) MED<br />

2.2 Individual Cell Growth Dynamics<br />

2.2.1 Growth rate (cell size) relative to<br />

nutrient uptake rate<br />

HIGH<br />

2.2.2 Nutrient uptake rate HIGH<br />

2.2.3 Temperature affect on growth and<br />

survival<br />

HIGH<br />

2.2.4 pH affect on growth and survival HIGH<br />

2.3 Population Dynamics<br />

2.3.1 Division mediated by cell size (growth) HIGH<br />

2.3.2 Death by necrosis HIGH<br />

2.3.3 Death by apoptosis HIGH<br />

24


2.3.4 Cell death creates additional nutrients<br />

for o<strong>the</strong>r cells<br />

2.4 Native Micr<strong>of</strong>lora<br />

2.4.1 Representation <strong>of</strong> generic native flora,<br />

with varying properties.<br />

2.4.2 Inflammation affect on growth and<br />

survival<br />

2.5 <strong>Salmonella</strong> <strong>Typhimurium</strong><br />

2.5.1 Representation <strong>of</strong> pathogens with type<br />

three secretion systems<br />

2.5.2 Representation <strong>of</strong> pathogens without<br />

type three secretion systems<br />

2.5.3 Dynamics for pathogens with TTSS<br />

penetrating <strong>the</strong> membrane<br />

2.5.4 Time scale dynamics <strong>of</strong> TTSS pathogen<br />

mucosa invasion<br />

2.5.5 Inflammatory response triggered when<br />

TTSS pathogens interact with<br />

membrane<br />

2.5.6 Removal <strong>of</strong> salmonella TTSS-1<br />

pathogens once invasion <strong>of</strong> membrane<br />

is complete<br />

3 Immune system<br />

3.1 Inflammatory response affect on<br />

environment temperature<br />

3.2 Specific modelling <strong>of</strong> inflammatory<br />

response dynamics<br />

4 Visualisation<br />

MED<br />

HIGH It would be ideal to vary <strong>the</strong> properties<br />

and numbers <strong>of</strong> native micr<strong>of</strong>lora in a<br />

way that accurately represents <strong>the</strong><br />

average populations <strong>of</strong> certain<br />

bacteria in <strong>the</strong> gut lumen; however,<br />

due to lack <strong>of</strong> data, this is not possible.<br />

HIGH<br />

HIGH<br />

HIGH<br />

HIGH<br />

HIGH<br />

HIGH<br />

HIGH<br />

HIGH<br />

LOW<br />

4.1 Visualisation <strong>of</strong> lumen and membrane HIGH<br />

4.2 Visualisation <strong>of</strong> native micr<strong>of</strong>lora and<br />

pathogens<br />

HIGH<br />

4.3 Visual indication <strong>of</strong> inflammation HIGH<br />

4.4 Visualisation <strong>of</strong> nutrient levels in lumen MED<br />

4.5 Visualisation <strong>of</strong> pH levels in lumen MED<br />

4.6 Visual engulfment <strong>of</strong> pathogens when<br />

TTSS-1 effectors are injected<br />

LOW<br />

Table 5-1: Required model behaviours and <strong>the</strong>ir priorities.<br />

25


6. The <strong>Model</strong><br />

The following section outlines <strong>the</strong> basic program flow and <strong>the</strong> equations and representations that<br />

will be used to model and provide visualisation <strong>of</strong> a salmonella typhimurium infection. Also included<br />

are some base values, based on my research, which will provide initial parameters for <strong>the</strong> behaviour<br />

<strong>of</strong> <strong>the</strong> model.<br />

6.1 Interface<br />

The interface has been designed with NetLogo in mind as <strong>the</strong> implementation method. The reason<br />

NetLogo has to be considered is because it only allows one interface screen, no tabs or o<strong>the</strong>r forms<br />

<strong>of</strong> separating interface components are available. In addition, many interface components cannot<br />

be resized to take up less space and if <strong>the</strong>y were, <strong>the</strong> labels indicating <strong>the</strong> function <strong>of</strong> <strong>the</strong> component<br />

would be illegible.<br />

In light <strong>of</strong> <strong>the</strong>se facts, <strong>the</strong> interface will undoubtedly take up more space than most displays will be<br />

able to show at one time. So, I decided <strong>the</strong> best approach would be to group toge<strong>the</strong>r input and<br />

output regions, attempting to allow easy viewing <strong>of</strong> <strong>the</strong> visualisation, alongside any graphs and<br />

empirical data outputs and basic model controls (stop/start etc). This will make controlling and<br />

observing <strong>the</strong> results <strong>of</strong> <strong>the</strong> model easier. The fact that most <strong>of</strong> <strong>the</strong> parameters will be out <strong>of</strong> view<br />

while <strong>the</strong> visualisation is in view is justified as it is unlikely <strong>the</strong>y will need to be changed while <strong>the</strong><br />

model is running.<br />

6.2 Program flow<br />

The flow <strong>of</strong> <strong>the</strong> program is not especially important due to <strong>the</strong> way I intend to enable <strong>the</strong> adding <strong>of</strong><br />

bacteria and pathogens. That is, no bacteria agents will be present at <strong>the</strong> beginning <strong>of</strong> <strong>the</strong><br />

simulation, which will allow <strong>the</strong> nutrient and pH concentrations in <strong>the</strong> environment to settle, based<br />

on <strong>the</strong> rules I specify. This means that <strong>the</strong> whe<strong>the</strong>r <strong>the</strong> environment and agents are updated first<br />

should not have a large affect on <strong>the</strong> model as it would only be <strong>of</strong> significance on <strong>the</strong> first cycle <strong>of</strong><br />

<strong>the</strong> simulation, should <strong>the</strong> bacteria be present on that cycle.<br />

A single simulation cycle will represent 6 seconds. This value was chosen as it provides nice intervals<br />

for minutes (10 cycles = 1 minute) and hours (600 cycles = 1 hour) and still maintains a reasonable<br />

speed in terms <strong>of</strong> actions <strong>of</strong> <strong>the</strong> model (bacterial movement etc). Figures 6-1 to 6-4 show <strong>the</strong> flow <strong>of</strong><br />

<strong>the</strong> program and what <strong>the</strong> stages will involve.<br />

26


Pause<br />

simulation<br />

Update pH<br />

levels<br />

Initialise global<br />

variables<br />

Figure 6-1: Setup procedure.<br />

Interruptible Region<br />

Check halting<br />

conditions<br />

Resume<br />

Figure 6-2: Main simulation cycle.<br />

Update nutrient<br />

concentrations<br />

Figure 6-3: “Update Environment” stages.<br />

Move agents Consume<br />

nutrients<br />

Check for and initiate new<br />

sacrifices among pathogens<br />

Figure 6-4: “Update agents” stages.<br />

Draw<br />

environment<br />

Update data<br />

outputs<br />

Initial<br />

Entry<br />

Update<br />

environment<br />

Update sacrifice<br />

processes<br />

Initialise<br />

environment<br />

Update<br />

visualisation<br />

Update inflammation<br />

and temperature<br />

Check for<br />

deaths<br />

Update agents<br />

Check for<br />

divisions<br />

Check for and<br />

perform flushing<br />

27


6.3 Environment<br />

Lumen and membrane<br />

The requirements state that a representation <strong>of</strong> <strong>the</strong> lumen and membrane is needed to provide<br />

areas for <strong>the</strong> bacteria to perform <strong>the</strong> actions required for <strong>the</strong> simulation. The environment is to be<br />

represented in a 2D grid structure. The 2D nature is inaccurate in terms <strong>of</strong> reality; however, time<br />

scale limitations mean that a 3D implementation is simply not feasible and many o<strong>the</strong>r systems have<br />

implemented biological models on 2D grids with a high level <strong>of</strong> success. Each location in <strong>the</strong><br />

environment grid will contain agents and have “type”, “ph level” and “nutrient level” properties.<br />

The “type” property will state whe<strong>the</strong>r <strong>the</strong> cell is part <strong>of</strong> <strong>the</strong> lumen or membrane, allowing detection<br />

<strong>of</strong> borders for controlling agent behaviour. The “ph level” and “nutrient level” properties will allow<br />

controlling <strong>of</strong> those environment factors.<br />

In order to prevent all agents moving to and occupying a single grid location, which would be<br />

unrealistic, each grid location will be restricted to containing 2 bacterial agents. This means a certain<br />

grid size is needed in order to accommodate <strong>the</strong> agents in <strong>the</strong> model, however, <strong>the</strong> number <strong>of</strong><br />

agents cannot be controlled as <strong>the</strong>y divide and die based on behaviour and environment properties.<br />

The size <strong>of</strong> <strong>the</strong> grid will be approximately 150x80 cells, giving a rectangular grid area which provides<br />

a large number <strong>of</strong> cells for bacteria to occupy.<br />

It will be necessary to represent <strong>the</strong> layers so that sufficient space is available to allow <strong>the</strong> agents to<br />

function. To that end, <strong>the</strong> majority <strong>of</strong> <strong>the</strong> environment space will be devoted to <strong>the</strong> lumen area.<br />

The membrane layer will be represented as a layer surrounding <strong>the</strong> lumen, sufficiently large to allow<br />

visualisation <strong>of</strong> salmonella pathogen’s type three secretions and invasion process and <strong>the</strong> pathogen<br />

growth dynamics in <strong>the</strong> area. I have decided not to implement any representation <strong>of</strong> <strong>the</strong> tissue layer<br />

as it would only be required for specific modelling <strong>of</strong> inflammatory response agents. The<br />

inflammatory response will instead be modelled in a more arbitrary fashion, according to data given<br />

in <strong>the</strong> paper by Ackermann et al. [1]. The exact method <strong>of</strong> implementing this dynamic will be<br />

explained later.<br />

Membrane (Mucosa)<br />

Lumen<br />

Figure 6-5: Environment representation.<br />

Flow<br />

28


Grid locations just <strong>of</strong>f <strong>the</strong> in-flow end <strong>of</strong> <strong>the</strong> environment will be assigned random nutrient<br />

concentrations between <strong>the</strong> maximum and minimum values used to initialise <strong>the</strong> environment.<br />

This will help ensure a replenishment <strong>of</strong> <strong>the</strong> nutrient levels in <strong>the</strong> model.<br />

As every grid location is affected by and affects its neighbouring locations in terms <strong>of</strong> pH and<br />

nutrient level, I have decided that <strong>the</strong> new levels for each grid location on each simulation cycle will<br />

all be calculated based on <strong>the</strong> existing values. Once all new levels have been calculated, <strong>the</strong> entire<br />

grid will be updated with <strong>the</strong> new values.<br />

When <strong>the</strong> model is initialised, <strong>the</strong> nutrient level <strong>of</strong> patches will be 0. As <strong>the</strong> model runs, nutrients<br />

will be diffused into <strong>the</strong> environment. Because <strong>of</strong> this, <strong>the</strong> model will have to run a few cycles<br />

before bacteria can be added to give <strong>the</strong> environment time to settle. The pH levels <strong>of</strong> patches will<br />

be initialised to random values between 6 and 8.<br />

As both nutrients and pH levels are going to be grid location variables, creating a visual<br />

representation for both simultaneously would be difficult. Instead, I intend to implement colour<br />

scaling, which will allow visualisation <strong>of</strong> one <strong>of</strong> pH or nutrient level at any one time. Interface<br />

options will allow <strong>the</strong> user to change which property is being visualised.<br />

Flushing<br />

Flushing dynamics will imitate <strong>the</strong> effects <strong>of</strong> <strong>the</strong> host excreting waste and will occur at regular<br />

intervals. The intervals will be determined by two user defined values, specifying <strong>the</strong> minimum and<br />

maximum time between flushes. The exact values to be used for my experiments will be obtained<br />

through testing; though will likely begin at around 2 hour intervals (1200 cycles).<br />

When a flush occurs, a proportion <strong>of</strong> <strong>the</strong> bacteria in <strong>the</strong> simulation will be removed at random. The<br />

size <strong>of</strong> this proportion will be a simulation parameter, adjusted during trial and error testing once<br />

implementation is complete to find a suitable value.<br />

In addition to removing some <strong>the</strong> agents, several pH and nutrient diffusion operations will be run, in<br />

order to alter nutrient distribution and simulate <strong>the</strong> lumen medium being moved through <strong>the</strong><br />

digestive tract. Again, <strong>the</strong> number <strong>of</strong> diffusions to be performed will be determined through trial<br />

and error testing, though <strong>the</strong> initial value will be such that <strong>the</strong> number <strong>of</strong> diffusions is equal to <strong>the</strong><br />

number <strong>of</strong> columns in <strong>the</strong> environment grid, <strong>the</strong>refore diffusing across <strong>the</strong> entire environment.<br />

6.4 Bacteria<br />

Movement<br />

In order to grow and survive, <strong>the</strong> bacteria in <strong>the</strong> model will need to find and consume nutrients. In<br />

reality, cells are attracted to certain chemo-attractants, which for bacteria are energy sources.<br />

Bacteria movement consists <strong>of</strong> ei<strong>the</strong>r moving <strong>the</strong>ir flagella to swim in <strong>the</strong> direction <strong>the</strong>y are facing or<br />

rotate and change direction, both actions requiring one “stroke” <strong>of</strong> <strong>the</strong> flagella. These two actions<br />

will be considered to be <strong>the</strong> possible “move” actions. <strong>Based</strong> on this information, for every<br />

simulation cycle, <strong>the</strong> code will find <strong>the</strong> neighbouring patch to each bacteria agent, which has <strong>the</strong><br />

highest nutrient concentration. The bacteria will <strong>the</strong>n rotate to face or move to this patch.<br />

31


without major performance issues. So, I decided to proportionately represent <strong>the</strong> bacterial agents,<br />

but in lower numbers. However, this means that it will not be possible to represent Escherichia Coli<br />

or Clostridium perfringens due to <strong>the</strong> proportional populations being so low. In order to still provide<br />

a good range <strong>of</strong> native micr<strong>of</strong>lora, I will implement <strong>the</strong> capacity for 5 types <strong>of</strong> natives, which will<br />

represent <strong>the</strong> four main bacteroide strains and Bifidobacterium Bifidum.<br />

The invasion <strong>of</strong> <strong>Salmonella</strong> <strong>Typhimurium</strong> will be initiated using an interface control, so <strong>the</strong> pathogens<br />

will not be present from <strong>the</strong> start <strong>of</strong> <strong>the</strong> simulation. The reason for this is to give <strong>the</strong> native<br />

population levels a chance to settle to <strong>the</strong> environment capacity, which will change from <strong>the</strong> given<br />

default numbers depending on <strong>the</strong> model parameters that affect <strong>the</strong> growth <strong>of</strong> <strong>the</strong> bacteria. The<br />

number <strong>of</strong> pathogens to be created when invasion is initiated will be a model variable specified by<br />

<strong>the</strong> user and <strong>the</strong> percentage <strong>of</strong> that population expressing TTSS will be a percentage specified by <strong>the</strong><br />

user, though initial values I will use will be between 20% and 40%, based on research by<br />

Schlumberger and Hardt [4].<br />

6.5 Self-destructive cooperation<br />

Pathogen Behaviour<br />

The self-destructive nature <strong>of</strong> <strong>the</strong> pathogens is a result <strong>of</strong> <strong>the</strong> salmonella pathogens, which express<br />

type three secretions systems, penetrating <strong>the</strong> mucosa layer. As it is uncertain what triggers <strong>the</strong><br />

invasion action [4], I will implement several methods which could be <strong>the</strong> case.<br />

The first two methods are suggested by Schlumberger and Hardt [4] and <strong>the</strong>y are that <strong>the</strong> pathogens<br />

sacrifice simultaneously or by some kind <strong>of</strong> hierarchy structure, however, whe<strong>the</strong>r this is a one-byone<br />

hierarchy or if many pathogens sacrifice at <strong>the</strong> same level <strong>of</strong> <strong>the</strong> hierarchy is unclear, so I will<br />

implement solutions for both approaches, creating a model parameter for limiting <strong>the</strong> maximum<br />

number <strong>of</strong> sacrifices for each stage <strong>of</strong> <strong>the</strong> hierarchy.<br />

The third <strong>of</strong> <strong>the</strong> methods, suggested by Ackermann et al. [1], is to have <strong>the</strong> sacrifices based on<br />

probability, with each pathogen having a different floating point number, which will be generated<br />

when <strong>the</strong> pathogen is created between 0.001 and a maximum value, specified as a model<br />

parameter. Random thresholds will be generated on each cycle (between 0 and 100) <strong>of</strong> <strong>the</strong><br />

simulation for each pathogen. If <strong>the</strong> generated number is less than <strong>the</strong> pathogen’s value, that<br />

pathogen will begin sacrificing.<br />

The method <strong>of</strong> my own is to have sacrifices based on <strong>the</strong> pathogen’s location, so that when <strong>the</strong>y<br />

happen to move past <strong>the</strong> membrane layer, <strong>the</strong>y will attach and begin invasion.<br />

Once a pathogen is triggered to begin invasion <strong>of</strong> <strong>the</strong> membrane, it will take <strong>the</strong> most direct route to<br />

<strong>the</strong> closest mucosa layer area. This behaviour is based on an assumed chemo-attractant which<br />

draws <strong>the</strong> pathogen to <strong>the</strong> area. Once it reaches <strong>the</strong> mucosa area, it will wait a single cycle before<br />

initiating injection <strong>of</strong> effectors. The injection process, as I have already mentioned, takes between<br />

80 and 200 seconds, in terms <strong>of</strong> <strong>the</strong> model, this is approximately between 13 and 33 simulation<br />

cycles. The actual time taken by each individual pathogen will be a random value between <strong>the</strong>se<br />

limits.<br />

The membrane invasion behaviour reduces <strong>the</strong> pathogen population in <strong>the</strong> gut environment, as <strong>the</strong><br />

pathogens are ei<strong>the</strong>r destroyed by <strong>the</strong> immune response in <strong>the</strong> membrane once <strong>the</strong>y invade (if <strong>the</strong>y<br />

35


concentration <strong>of</strong> 0. Finally, as <strong>the</strong> nutrient depletion rate <strong>of</strong> <strong>the</strong> bacteria are all to be kept <strong>the</strong> same<br />

and no death dynamics are needed, this factor was also excluded.<br />

The initial populations were obtained by selecting a bacteroide population which, when proportional<br />

levels <strong>of</strong> bifidobacterium and salmonella pathogens were added, lead to a total agent count <strong>of</strong><br />

around 5000.<br />

Results<br />

Figure 7-1: Designed system, visualisation output.<br />

As can be seen in figure 7-1, <strong>the</strong> bacteria move towards <strong>the</strong> edges <strong>of</strong> <strong>the</strong> simulation, which has a<br />

detrimental effect on <strong>the</strong> population dynamics.<br />

The pH diffusion almost works as intended, although, as can be seen in figure 7-2, <strong>the</strong> alkaline<br />

influence from <strong>the</strong> membrane gives a curve at <strong>the</strong> top end <strong>of</strong> <strong>the</strong> lumen (see highlighted area). This<br />

is caused by <strong>the</strong> fact that <strong>the</strong> top-left grid location is influenced by <strong>the</strong> random lumen pH, meaning<br />

<strong>the</strong> pH level is more acidic, which has occurred due to coding error. As we move fur<strong>the</strong>r to <strong>the</strong> right<br />

<strong>of</strong> <strong>the</strong> model, <strong>the</strong> grid locations get a diffused value <strong>of</strong> <strong>the</strong> initial, more acidic pH, but an alkaline<br />

value (from <strong>the</strong> membrane) between <strong>the</strong> same random values as was applied to <strong>the</strong> top-left grid<br />

location, allowing it a greater influence.<br />

Figure 7-2: pH levels with no bacteria.<br />

39


Figure 7-3: pH levels with bacteria (bacteria are hidden)<br />

Figure 7-3 shows <strong>the</strong> pH concentrations <strong>of</strong> <strong>the</strong> grid locations with bacteria present. In order to make<br />

<strong>the</strong> difference clearer, I disabled visualisation <strong>of</strong> <strong>the</strong> bacteria agents. As can be seen, <strong>the</strong> agents<br />

have an influence on <strong>the</strong> environment pH, with <strong>the</strong> average pH <strong>of</strong> <strong>the</strong> environment falling from<br />

around 7 with no bacteria to around 6.7 with <strong>the</strong> bacteria present. The bacterial influence on <strong>the</strong><br />

environment pH seems to lower <strong>the</strong> average pH to almost exactly <strong>the</strong>ir optimum pH levels. The<br />

research I conducted did show that <strong>the</strong> average pH <strong>of</strong> <strong>the</strong> colon is in <strong>the</strong> region <strong>of</strong> 6-8, making 6.7 an<br />

acceptable level.<br />

Experiment 1-1– Nutrients<br />

In order to solve <strong>the</strong> nutrient problem, I initially tried different diffusion methods, removing<br />

backwash or simply moving all <strong>the</strong> nutrient concentrations along <strong>the</strong> environment, with no diffusion,<br />

just simulating flow. None <strong>of</strong> <strong>the</strong>se amendments helped and <strong>the</strong> reason for this occurred to me<br />

while performing various experiments. The bacteria are attracted to high nutrient concentrations,<br />

but after a certain number <strong>of</strong> cycles, <strong>the</strong>y will have consumed <strong>the</strong> nutrients in <strong>the</strong> centre <strong>of</strong> <strong>the</strong><br />

model and <strong>the</strong> bacteria closer to <strong>the</strong> left hand side will be absorbing <strong>the</strong> new nutrients as <strong>the</strong>y enter<br />

<strong>the</strong> model. This means that concentrations in <strong>the</strong> middle area <strong>of</strong> <strong>the</strong> model will decrease rapidly and<br />

only be replenished by low concentrations <strong>of</strong> nutrients, which are not consumed by <strong>the</strong> bacteria to<br />

<strong>the</strong> left. Eventually, <strong>the</strong> bacteria will all clump as close to <strong>the</strong> left <strong>of</strong> <strong>the</strong> model as <strong>the</strong>y can, where<br />

<strong>the</strong> high nutrient concentrations are and consume all <strong>the</strong> nutrients before <strong>the</strong>y diffuse past <strong>the</strong> mass<br />

<strong>of</strong> bacteria.<br />

As <strong>the</strong> issue is related to <strong>the</strong> flow dynamic I implemented, it seems <strong>the</strong> only way to avoid this issue<br />

will be to assign random nutrient values across <strong>the</strong> model and replenish those values at regular<br />

intervals, thus removing <strong>the</strong> flow. Nutrient concentrations will now be initialised at random values<br />

between a minimum and maximum, set as model parameters and replenished at regular cycle<br />

intervals, by taking a random value between <strong>the</strong> minimum and maximum concentration and <strong>the</strong>n<br />

reducing that value to a percentage <strong>of</strong> it. This percentage factor will also be available as a model<br />

parameter, which can be adjusted for best effect.<br />

40


In addition, diffusion will need to be un-weighted, that is, each grid location will have to diffuse<br />

equally to all <strong>of</strong> its neighbours. The new diffusion grid is shown in experiment figure 7-4 and shows<br />

a simple diffusion, whereby each grid location maintains 20% <strong>of</strong> its current nutrients and disperses<br />

<strong>the</strong> remaining 80% between <strong>the</strong> 8 neighbouring grid locations. The values in <strong>the</strong> grid are again<br />

percentages <strong>of</strong> <strong>the</strong> nutrients in <strong>the</strong> centre grid location.<br />

10 10 10<br />

10 20 10<br />

10 10 10<br />

Figure 7-4: New nutrient diffusion percentages.<br />

This new treatment <strong>of</strong> nutrients also means that flushing has to be changed. It used to use <strong>the</strong><br />

diffusion function, which relied on nutrients being introduced at <strong>the</strong> borders <strong>of</strong> <strong>the</strong> model. As<br />

nutrients are no longer introduced in this manner, flushing will now constitute <strong>of</strong> assigning new<br />

random nutrient concentrations across <strong>the</strong> environment and running <strong>the</strong> basic diffusion outlined<br />

above.<br />

For this experiment, <strong>the</strong> same parameters as outline above were used. Two new parameters were<br />

added to control <strong>the</strong> new nutrient system. Those are “Replenish-Nutrients-Every-N-Ticks”, which<br />

was set to 100 and “Replenish-Nutrient-Percentage-Factor”, set to 10%. The reason for setting <strong>the</strong><br />

replenish interval to 100 is simply that replenishing <strong>the</strong> nutrients by a small amount every 10<br />

minutes seems reasonable. Due to <strong>the</strong> way flush cycles are detected, a flush always occurs on <strong>the</strong><br />

first cycle <strong>of</strong> <strong>the</strong> simulation, meaning that nutrient levels are initialised and diffused. Because <strong>of</strong> this,<br />

I allowed one cycle to run before adding <strong>the</strong> agents to <strong>the</strong> simulation.<br />

Figure 7-5: Visualisation with new nutrient dynamics<br />

41


Figure 7-6: Average nutrient concentration, with new<br />

nutrient dynamics with flushing enabled.<br />

Figure 7-5 shows that <strong>the</strong> new nutrient dynamics solves <strong>the</strong> problem <strong>of</strong> <strong>the</strong> bacteria bunching<br />

toge<strong>the</strong>r at one side <strong>of</strong> <strong>the</strong> environment. However, due to <strong>the</strong> lack <strong>of</strong> information found on nutrient<br />

distribution, it is hard to determine whe<strong>the</strong>r or not <strong>the</strong> new dynamic is accurate. <strong>Based</strong> on my own<br />

assumptions, <strong>the</strong>re are two possibilities. It could be considered reasonably accurate, if we assume<br />

that <strong>the</strong> model is focussed on a single environmental niche, where separate groups <strong>of</strong> <strong>the</strong> bacteria<br />

would not develop, a behaviour which is observed in most experiments relating to bacterial growth,<br />

though those experiments were not analysed at a level where each individual bacteria cell could be<br />

seen. However, if we assume that we are at <strong>the</strong> level where groups <strong>of</strong> bacteria would form, <strong>the</strong>n <strong>the</strong><br />

nutrients are too evenly distributed in <strong>the</strong> model, preventing <strong>the</strong> simulation <strong>of</strong> environmental<br />

niches. It makes sense to assume state that <strong>the</strong> model represents only a single ecological niche as<br />

we can see individual cells, however it was not designed with that in mind.<br />

Figure 7-6, <strong>the</strong> average nutrient concentration in <strong>the</strong> lumen medium over time, shows a steady<br />

decrease in <strong>the</strong> nutrients as <strong>the</strong> bacteria consume <strong>the</strong>m. The graph also shows that <strong>the</strong> new flushing<br />

mechanic completely resets <strong>the</strong> nutrient concentration <strong>of</strong> <strong>the</strong> environment. This resetting <strong>of</strong><br />

nutrient levels appears unrealistic, but when we consider what flushing is simulating, <strong>the</strong> movement<br />

<strong>of</strong> digestive medium through <strong>the</strong> environment, it may be considered fairly accurate because,<br />

although nutrients are removed during this process, <strong>the</strong> host will consume more nutrients and those<br />

will eventually be passed to <strong>the</strong> colon. Also, <strong>the</strong> nutrient values introduced are random, so different<br />

nutrient levels are introduced on each flush. Therefore, if <strong>the</strong> initial nutrient concentration <strong>of</strong> <strong>the</strong><br />

environment is considered to be that just after new nutrients are introduced, <strong>the</strong> mechanic seems<br />

quite reasonable.<br />

The new nutrient diffusion and replenishment values, although biologically debateable, provide a<br />

stable situation for bacterial agents to operate and will <strong>the</strong>refore be used for <strong>the</strong> experiments later.<br />

42


Experiment 1-2- pH<br />

In order to solve <strong>the</strong> pH issue, I created a special case check for <strong>the</strong> top left <strong>of</strong> <strong>the</strong> model, whereby if<br />

<strong>the</strong> current column is 0 and <strong>the</strong> lumen row is row 4 or lower, <strong>the</strong> random pH influence uses <strong>the</strong><br />

membrane range instead <strong>of</strong> <strong>the</strong> lumen range to determine a random value. For this experiment, <strong>the</strong><br />

model parameters specified at <strong>the</strong> beginning <strong>of</strong> this section and <strong>the</strong> modifications for experiment 1-<br />

1 have been used.<br />

Figure 7-7: pH levels with no bacteria and new diffusion.<br />

Figure 7-7 shows <strong>the</strong> pH levels <strong>of</strong> <strong>the</strong> model with no bacterial agents present. As can be seen, <strong>the</strong><br />

pH gradient from top to bottom appears more accurate, with <strong>the</strong> alkaline membrane influence<br />

forming no curve from left-to right. This indicates that <strong>the</strong> random influence values for <strong>the</strong> top 5<br />

rows (rows 0 – 4) <strong>of</strong> <strong>the</strong> model adhere more to what <strong>the</strong> rest <strong>of</strong> <strong>the</strong> model predicts and <strong>the</strong>refore<br />

seem more accurate and will be used for <strong>the</strong> experiment phase.<br />

7.2 Phase 2 – Bacteria Population Dynamics<br />

This phase is to ensure that bacteria population proportions do not fluctuate too much when <strong>the</strong>re is<br />

no inflammation to assist <strong>the</strong> pathogens. Also, <strong>the</strong> experiments will ensure that <strong>the</strong> bacteria growth<br />

patterns follow known patterns. This will involve trial and error testing, adjusting <strong>the</strong> maintenance<br />

rates for <strong>the</strong> bacterium. For <strong>the</strong>se experiments, all varieties <strong>of</strong> bacterial agents will be added and<br />

<strong>the</strong>ir population monitored for <strong>the</strong> duration <strong>of</strong> <strong>the</strong> model is running. In order to get accurate<br />

population counts over time, sacrificing <strong>of</strong> pathogens and inflammation are disabled.<br />

Inputs<br />

<strong>Model</strong> runtime: 5500 cycles (approx 9.1 hours)<br />

Visualisation Parameters<br />

Env-Visualistion-Mode – Nutrient Concentration<br />

showPathogens – On<br />

showBacteroides – On<br />

showBifidobacterium – On<br />

Environment Parameters<br />

Env-Base-Temperature – 36<br />

Initial-Env-Nutrient-Concentration-Min – 0<br />

Native Parameters<br />

Initial-Bacteroide-Pop – 3000<br />

Initial-Bifidobacterium-Pop – 1948<br />

Initial-Native-Nutrient-Concentration-Min – 40<br />

Initial-Native-Nutrient-Concentration-Max – 100<br />

BFragilis-Base-Uptake – 0.87<br />

BDistasonis-Base-Uptake – 0.335<br />

BThetaiotaomicron-Base-Uptake – 0.534<br />

BVulgatus-Base-Uptake – 0.525<br />

43


Initial-Env-Nutrient-Concentration-Max – 100<br />

Replenish-Nutrients-Every-N-Ticks – 100<br />

Replenish-Nutrient-Percentage-Factor – 10%<br />

Flushing Parameters<br />

Enable-Flushing – On<br />

Min-Cycles-Before-Flush – 1050<br />

Max-Cycles-Before-Flush – 1500<br />

Percentage-Bacteria-Removed-On-Flush – 20%<br />

Diffusions-On-Flush – 80<br />

Shared Bacteria Parameters<br />

Leave-Percent-Nutrients-On-Death – 10%<br />

Run-Apoptosis-Every-N-Ticks – 600<br />

Apoptosis-Probability – 1%<br />

Bacteria-Effect-On-pH – 0.10<br />

Bifidobacterium-Base-Uptake – 0.2835<br />

BFragilis-Maintenance – 0.225<br />

BDistasonis- Maintenance – 0.075<br />

BThetaiotaomicron- Maintenance – 0.125<br />

BVulgatus- Maintenance – 0.125<br />

Bifidobacterium- Maintenance – 0.05<br />

Pathogen Parameters<br />

Initial-Pathogen-Pop – 83<br />

Percentage-Expressing-TTSS1 – 30%<br />

Initial-Pathogen-Nutrient-Concentration-Min –<br />

40<br />

Initial-Pathogen-Nutrient-Concentration-Max –<br />

100<br />

Pathogen-Base-Uptake – 0.9<br />

Pathogen-Maintenance – 0.225<br />

Sacrifice-Method – Probability <strong>Based</strong><br />

Sacrifice-Probability – 1%<br />

Maximum-Pathogens-In-Hierarchy-Level – 1<br />

The initial maintenance rates being used are not based on any biological fact. They exist solely to<br />

ensure that when no more nutrients are available, <strong>the</strong> bacterial agents will eventually perish, so I<br />

tried to make <strong>the</strong> maintenance rates proportional to <strong>the</strong> base nutrient uptake rate <strong>of</strong> each agent.<br />

Results<br />

Figure 7-8: Population levels over time.<br />

Figure 7-8 shows <strong>the</strong> population levels over <strong>the</strong> 5500 cycle period and also shows that <strong>the</strong>re are<br />

some definite issues with <strong>the</strong> way <strong>the</strong> model works. The first and most obvious indication <strong>of</strong> this is<br />

<strong>the</strong> shape <strong>of</strong> <strong>the</strong> lines. Some kind <strong>of</strong> “up-and-down” dynamic in <strong>the</strong> populations is to be expected as<br />

<strong>the</strong>y exceed numbers which <strong>the</strong> environment can support. However, it is a fact that bacteria tend<br />

towards a common growth pattern, which is divided into four phases. The first is a “lag phase”, <strong>the</strong>n<br />

<strong>the</strong> “exponential growth” phase occurs. Then <strong>the</strong> exponential growth slows as <strong>the</strong> population<br />

reaches maximum capacity in its environment, creating a “stationary phase”. Finally, <strong>the</strong> bacteria<br />

enter a “logarithmic decline” phase, when <strong>the</strong> death rate exceeds growth rate. Figure 7-9 shows this<br />

dynamic. Unfortunately, this dynamic is clearly not <strong>the</strong> case in <strong>the</strong> model.<br />

44


Figure 7-9: Bacteria growth phases, sourced from <strong>the</strong> work<br />

<strong>of</strong> Laura Daum [50].<br />

Ano<strong>the</strong>r issue is that <strong>the</strong> bifidobacterium population vastly outnumbers <strong>the</strong> o<strong>the</strong>rs. This is accurate<br />

in comparison to <strong>the</strong> pathogen population, but <strong>the</strong> bacteroide population should stay above <strong>the</strong><br />

bifidobacterium population. I believe this issue is related to <strong>the</strong> varying maintenance rates assigned<br />

to <strong>the</strong> bacteria. As <strong>the</strong> bacteroides have larger maintenance rates, when <strong>the</strong> nutrient level drops too<br />

low, <strong>the</strong>y lose nutrients a lot faster than bifidobacterium.<br />

The final problem is that <strong>the</strong> entire pathogen population died at around 1000 cycles, equating to<br />

approximately 1 hour 40 minutes. Without any external influences (such as immune response) this<br />

should not occur. I think this is a combination <strong>of</strong> <strong>the</strong> high maintenance rate and low initial<br />

population level <strong>of</strong> <strong>the</strong> pathogens.<br />

Experiment 2-1- Equal maintenance rates<br />

This first experiment iteration is designed to see whe<strong>the</strong>r giving all <strong>the</strong> bacterial agents equal<br />

maintenance rates will help keep <strong>the</strong> population levels more equal. The following changes to <strong>the</strong><br />

inputs were made for this experiment:<br />

Native Parameters<br />

BFragilis-Maintenance – 0.05<br />

BDistasonis- Maintenance – 0.05<br />

BThetaiotaomicron- Maintenance – 0. 05<br />

BVulgatus- Maintenance – 0. 05<br />

Bifidobacterium- Maintenance – 0.05<br />

Pathogen Parameters<br />

Pathogen-Maintenance – 0. 05<br />

The new maintenance rate chosen was based on <strong>the</strong> lowest uptake rate, that <strong>of</strong> bifidobacterium, to<br />

ensure that it does not exceed that uptake rate and prevent <strong>the</strong> bifidobacterium population from<br />

growing at all.<br />

45


Figure 7-10: Population levels over time, equal<br />

maintenance rates.<br />

Figure 7-10 shows that <strong>the</strong> equal maintenance rates seem to serve <strong>the</strong> bacteroide and pathogen<br />

populations well. This is most likely because <strong>the</strong> maintenance rate is so much lower than <strong>the</strong> uptake<br />

rate and I suspect that <strong>the</strong> majority <strong>of</strong> <strong>the</strong> bacteroide population is that <strong>of</strong> B.Fragilis, whose uptake<br />

rate is <strong>the</strong> highest. In order to verify this suspicion, I added a new plot to <strong>the</strong> model and ran <strong>the</strong><br />

same experiment again.<br />

Figure 7-11: Bacteroide population distribution.<br />

Figure 7-11 confirms my suspicions and <strong>the</strong> results shown in both figures 7-10 and 7-11 indicate <strong>the</strong><br />

need for a proportional maintenance rate.<br />

Experiment 2-2- Proportional maintenance rates<br />

Figure 7-12 (below) shows population levels and bacteroide population proportions, using<br />

proportional maintenance rates. The maintenance rates used were obtained by dividing <strong>the</strong> uptake<br />

rates by a common factor <strong>of</strong> 8. The experiment was run three times to account for any random<br />

effects caused by chance which drastically affect <strong>the</strong> population levels. For example a flush could<br />

eliminate <strong>the</strong> bacteria with <strong>the</strong> highest nutrient counts, or closest to dividing, causing a large dip in<br />

<strong>the</strong> population level. The new maintenance rates are as follows:<br />

46


A<br />

B<br />

C<br />

Native Parameters<br />

BFragilis-Maintenance – 0.10875<br />

BDistasonis- Maintenance – 0.041875<br />

BThetaiotaomicron- Maintenance – 0.06675<br />

BVulgatus- Maintenance – 0.065625<br />

Bifidobacterium- Maintenance – 0.0354375<br />

Pathogen Parameters<br />

Pathogen-Maintenance – 0.1125<br />

Figure 7-12: Population levels and bacteroide population proportions over time, using maintenance rates equal<br />

to uptake rates divided by 8.<br />

The results <strong>of</strong> this experiment show that, for <strong>the</strong> most part, <strong>the</strong> population levels behave as<br />

expected. The exception is experiment A, where <strong>the</strong> Bifidobacterium population completely died <strong>of</strong>f<br />

and, somehow, <strong>the</strong> B.Vulgatus population gained <strong>the</strong> majority proportion <strong>of</strong> <strong>the</strong> bacteroide<br />

population. Besides that <strong>the</strong> results look good, <strong>the</strong> pathogens survive, but cannot thrive due to <strong>the</strong><br />

competition and <strong>the</strong> different bacteroides obtain proportional population levels, which relate to<br />

47


<strong>the</strong>ir generation times. The only concern I have is that in all three experiments, <strong>the</strong> bifidobacterium<br />

population falls and will presumably, eventually reach 0. This suggests that <strong>the</strong> bifidobacterium in<br />

<strong>the</strong> model require a slightly tweaked maintenance rate in order to have a chance <strong>of</strong> survival.<br />

It should also be noted that <strong>the</strong> growth curves <strong>of</strong> <strong>the</strong> bacteria still do not entirely follow that which is<br />

expected. There is evidence <strong>of</strong> lag, exponential growth and stationary phases, but <strong>the</strong> flushing<br />

dynamic removes proportions <strong>of</strong> <strong>the</strong> population before <strong>the</strong> logarithmic decline can occur, if it will at<br />

all. Experiment 2-4 will observe <strong>the</strong> effects <strong>of</strong> removing <strong>the</strong> flushing dynamic from <strong>the</strong> model so that<br />

it can be better determined if <strong>the</strong> growth dynamics <strong>of</strong> <strong>the</strong> model follow that which is expected.<br />

Experiment 2-3- Tweaked Bifidobacterium maintenance rate<br />

The following three sets <strong>of</strong> results were performed using <strong>the</strong> exact same values as above, but with<br />

<strong>the</strong> bifidobacterium maintenance rate tweaked slightly in order to better match it to <strong>the</strong> bacteria<br />

growth curve which is expected. A maintenance rate <strong>of</strong> 0.03 was obtained after trial-and-error<br />

testing, for which I gradually reduced <strong>the</strong> maintenance rate until <strong>the</strong> bifidobacterium population<br />

grew, but not so much that it dominated <strong>the</strong> environment completely.<br />

A B<br />

Figure 7-13: Population levels over time, with modified Bifidobacterium maintenance rate.<br />

The three experiment outputs in figure 7-13 show that <strong>the</strong> modified maintenance rate <strong>of</strong> 0.3 for<br />

Bifidobacterium allows <strong>the</strong> population to maintain itself at a reasonable level, without heavily<br />

affecting population distribution between <strong>the</strong> three types <strong>of</strong> bacteria in <strong>the</strong> model.<br />

C<br />

48


2800<br />

Cycles<br />

- 4hrs<br />

40min<br />

(aprx)<br />

5500<br />

Cycles<br />

– 9hrs<br />

7min<br />

(aprx)<br />

Experiment 2-4- Population graph without flushing<br />

The purpose <strong>of</strong> this experiment is to see how closely <strong>the</strong> model follows <strong>the</strong> expected bacterial<br />

growth curve. In order to achieve this, flushing was disabled. Apart from flushing being disabled,<br />

<strong>the</strong> experiment inputs are <strong>the</strong> same as <strong>the</strong> experiment above. It should be noted that because<br />

flushing no longer diffuses <strong>the</strong> nutrient concentrations on <strong>the</strong> first cycle <strong>of</strong> <strong>the</strong> simulation, I ran <strong>the</strong><br />

simulation for 10 cycles before adding bacterial agents. This means that <strong>the</strong> first replenishment<br />

cycle will be <strong>of</strong>fset by 9 (normally, it is <strong>of</strong>fset by 1 as <strong>the</strong> first cycle runs).<br />

Figure 7-14: Average nutrient concentration, population levels and bacteroide population distributions at 2800<br />

and 5500 cycles.<br />

Figure 7-14, showing various graphs at 2800 and 5500 cycles, indicates that <strong>the</strong> bacteria do follow<br />

<strong>the</strong> population curve as expected, but only when one observes <strong>the</strong> general population level graph.<br />

The Bacteroides form an almost exact replica <strong>of</strong> <strong>the</strong> graph until around 2000 cycles, when <strong>the</strong><br />

population starts to fall very slowly. I predict this population level will eventually settle. The<br />

Bifidobacterium population seems to reach <strong>the</strong> settlement phase and <strong>the</strong>n, very slowly reduce in<br />

numbers. However, if we look at <strong>the</strong> population levels graph at 5500 cycles, we can see <strong>the</strong><br />

population <strong>of</strong> bacteroides is beginning to rise, probably due to <strong>the</strong> falling number <strong>of</strong> bacteroides and<br />

pathogens. The pathogens did not perform well in this experiment, in terms <strong>of</strong> survivability.<br />

However, <strong>the</strong> first section <strong>of</strong> <strong>the</strong> population levels graph shows <strong>the</strong>y make a small exponential<br />

growth, settle and <strong>the</strong>n logarithmically die to <strong>the</strong> point where <strong>the</strong> population is wiped out.<br />

In conclusion for this experiment, I am confident in saying that all but <strong>the</strong> Bifidobacterium<br />

performed exactly as expected, though even <strong>the</strong> Bifidobacterium are only lacking in <strong>the</strong> logarithmic<br />

decline phase, which I believe can be explained by <strong>the</strong> reduced maintenance rate I applied in order<br />

to allow <strong>the</strong> population to function properly with flushing enabled. This indicates that perhaps <strong>the</strong><br />

maintenance rate should be raised slightly, however, if we take a look at <strong>the</strong> Bacteroide population<br />

distribution, we see that B.Fragilis is <strong>the</strong> only bacteroide to follow <strong>the</strong> bacterial growth graph in full.<br />

As all bacteroides maintenance rates follow <strong>the</strong> “1/8 th <strong>of</strong> uptake rate” formula, I cannot conclude<br />

that <strong>the</strong> amended maintenance rate <strong>of</strong> <strong>the</strong> Bifidobacterium is <strong>the</strong> problem, but perhaps <strong>the</strong> lower<br />

maintenance rates provide better long-term survival when <strong>the</strong> nutrient level drops.<br />

49


7.3 Phase 3 – Effect <strong>of</strong> Temperature and Inflammation on Bacteria<br />

Populations<br />

This experiment phase is designed to observe how much <strong>of</strong> an effect each <strong>of</strong> temperature, pH and<br />

inflammation has on <strong>the</strong> bacteria populations in <strong>the</strong> model. While performing <strong>the</strong>se experiments,<br />

flushing will not be enabled, though normal nutrient dynamics will be preserved. In addition, <strong>the</strong><br />

temperature, pH and inflammation values will be artificially modified and <strong>the</strong>re will be no recovery<br />

mechanism.<br />

As all bacterial agents in <strong>the</strong> model follow <strong>the</strong> same equations for temperature and pH influence on<br />

nutrient uptake and pathogens are unaffected by inflammation, <strong>the</strong> experiments will be performed<br />

with only <strong>the</strong> native micr<strong>of</strong>lora.<br />

When analysing <strong>the</strong> results <strong>of</strong> <strong>the</strong> following experiments, <strong>the</strong> population graphs in figure 7-13<br />

(Experiment phase 2, Experiment 2-3) will be used as a control.<br />

Inputs<br />

<strong>Model</strong> runtime: 1800 cycles (3 hours) to allow bacteria levels to settle<br />

1200 cycle intervals (2 hours) increasing temperature, pH or inflammation gradually.<br />

Visualisation Parameters<br />

Env-Visualistion-Mode – Nutrient Concentration<br />

showPathogens – On<br />

showBacteroides – On<br />

showBifidobacterium – On<br />

Environment Parameters<br />

Env-Base-Temperature – 36<br />

Initial-Env-Nutrient-Concentration-Min – 0<br />

Initial-Env-Nutrient-Concentration-Max – 100<br />

Replenish-Nutrients-Every-N-Ticks – 100<br />

Replenish-Nutrient-Percentage-Factor – 10%<br />

Flushing Parameters<br />

Enable-Flushing – On<br />

Min-Cycles-Before-Flush – 1050<br />

Max-Cycles-Before-Flush – 1500<br />

Percentage-Bacteria-Removed-On-Flush – 20%<br />

Diffusions-On-Flush – 80<br />

Shared Bacteria Parameters<br />

Leave-Percent-Nutrients-On-Death – 10%<br />

Run-Apoptosis-Every-N-Ticks – 600<br />

Apoptosis-Probability – 1%<br />

Bacteria-Effect-On-pH – 0.10<br />

Native Parameters<br />

Initial-Bacteroide-Pop – 3000<br />

Initial-Bifidobacterium-Pop – 1948<br />

Initial-Native-Nutrient-Concentration-Min – 40<br />

Initial-Native-Nutrient-Concentration-Max – 100<br />

BFragilis-Base-Uptake – 0.87<br />

BDistasonis-Base-Uptake – 0.335<br />

BThetaiotaomicron-Base-Uptake – 0.534<br />

BVulgatus-Base-Uptake – 0.525<br />

Bifidobacterium-Base-Uptake – 0.2835<br />

BFragilis-Maintenance – 0.10875<br />

BDistasonis- Maintenance – 0.041875<br />

BThetaiotaomicron- Maintenance – 0.06675<br />

BVulgatus- Maintenance – 0.065625<br />

Bifidobacterium- Maintenance – 0.03<br />

Pathogen Parameters<br />

Initial-Pathogen-Pop – 83<br />

Percentage-Expressing-TTSS1 – 30%<br />

Initial-Pathogen-Nutrient-Concentration-Min –<br />

40<br />

Initial-Pathogen-Nutrient-Concentration-Max –<br />

100<br />

Pathogen-Base-Uptake – 0.9<br />

Pathogen-Maintenance – 0.1125<br />

Sacrifice-Method – Probability <strong>Based</strong><br />

Sacrifice-Probability – 1%<br />

Maximum-Pathogens-In-Hierarchy-Level – 1<br />

50


1800<br />

Cycles<br />

3000<br />

Cycles<br />

4200<br />

Cycles<br />

5400<br />

Cycles<br />

6600<br />

Cycles<br />

Results<br />

Max Bacteroide Population: 6210, Max Bifidobacterium Population: 3110,<br />

Inflammation: 0, Temperature: 36<br />

Max Bacteroide Population: 5740, Max Bifidobacterium Population: 3020,<br />

Inflammation: 2, Temperature: 36.524<br />

Max Bacteroide Population: 5270, Max Bifidobacterium Population: 3320,<br />

Inflammation: 4, Temperature: 37.048<br />

Max Bacteroide Population: 3970, Max Bifidobacterium Population: 3610,<br />

Inflammation: 6, Temperature: 37.572<br />

Max Bacteroide Population: 2960, Max Bifidobacterium Population: 4980,<br />

Inflammation: 8, Temperature: 38.096<br />

51


7800<br />

Cycles<br />

9000<br />

Cycles<br />

Max Bacteroide Population: 1300, Max Bifidobacterium Population: 6070,<br />

Inflammation: 10, Temperature: 38.62<br />

Max Bacteroide Population: 650, Max Bifidobacterium Population: 5530,<br />

Inflammation: 12, Temperature: 39.144<br />

Figure 7-15: Population, Bacteroide population distribution and inflammation/temperature graphs, increasing<br />

inflammation by 2 every 1200 cycles until a level <strong>of</strong> 12 is reached, showing <strong>the</strong> effects <strong>of</strong> inflammation and<br />

temperature, which is relative to inflammation, on <strong>the</strong> populations.<br />

The graphs in figure 7-15 show some positive results in terms <strong>of</strong> <strong>the</strong> model behaving as it was<br />

designed. Firstly, <strong>the</strong> temperature <strong>of</strong> <strong>the</strong> environment is clearly relative to inflammation, as <strong>the</strong><br />

inflammation level was artificially increased, <strong>the</strong> temperature rose in equal amounts at <strong>the</strong> same<br />

time. Secondly, <strong>the</strong> increase in inflammation and temperature reduced <strong>the</strong> overall bacteria<br />

population from around 9320 (after 1800 cycles with no inflammation) to a level <strong>of</strong> 6180 (after 9000<br />

cycles with a final inflammation score <strong>of</strong> 12). As pathogens are not affected by inflammation in <strong>the</strong><br />

model, should <strong>the</strong>y be added, I would assume that <strong>the</strong>y would consume more <strong>of</strong> <strong>the</strong> free nutrients<br />

as <strong>the</strong> bacteroides die, than <strong>the</strong> Bifidobacterium, who seem to have thrived during inflammation<br />

without <strong>the</strong> presence <strong>of</strong> pathogens. I believe <strong>the</strong> Bifidobacterium faired a lot better because <strong>the</strong>ir<br />

maximum temperature tolerance is higher (45 o C) than that <strong>of</strong> bacteroides (41 o C) and <strong>the</strong>ir optimum<br />

temperature is 39 o C, which is approximately <strong>the</strong> maximum fever temperature.<br />

52


1800<br />

Cycles<br />

9000<br />

Cycles<br />

Max Bacteroide Population: 6280, Max Bifidobacterium Population: 3090,<br />

Max Pathogen Population: 0 (160 added this cycle), Inflammation: 0, Temperature: 36<br />

Min Bacteroide Population: 0, Min Bifidobacterium Population: 450,<br />

Max Pathogen Population: 5130, Inflammation: 12, Temperature: 39.144<br />

Figure 7-16: Population, Bacteroide population distribution and inflammation/temperature graphs, increasing<br />

inflammation by 2 every 1200 cycles until a level <strong>of</strong> 12 is reached, showing <strong>the</strong> effects <strong>of</strong> inflammation and<br />

temperature, which is relative to inflammation, on <strong>the</strong> populations with pathogens.<br />

Figure 7-16 shows <strong>the</strong> same set <strong>of</strong> graphs given in <strong>the</strong> above experiment, but with pathogens<br />

included. I decided only to include <strong>the</strong> graphs after 1800 cycles and at <strong>the</strong> end <strong>of</strong> <strong>the</strong> experiment<br />

(9000 cycles, with inflammation increases at <strong>the</strong> same intervals). The purpose <strong>of</strong> performing this<br />

additional experiment was to confirm that <strong>the</strong> pathogen population will benefit from <strong>the</strong> effects <strong>of</strong><br />

inflammation. 160 pathogen agents were added to <strong>the</strong> simulation after <strong>the</strong> initial 1800 cycles, which<br />

should have given <strong>the</strong> native bacteria population time to settle and <strong>the</strong> number also represents a<br />

proportional level, as <strong>the</strong> o<strong>the</strong>r populations approximately doubled in number.<br />

As can be seen, <strong>the</strong> pathogen population benefits from inflammation. The fact that bacteroide and<br />

bifidobacterium populations are ei<strong>the</strong>r declining rapidly or completely dead is possibly an indication<br />

that <strong>the</strong> effects <strong>of</strong> inflammation are too extreme. However, as <strong>the</strong> key dynamic <strong>of</strong> inflammation<br />

providing benefit to <strong>the</strong> pathogen is evident, <strong>the</strong> model will be left as-is for fur<strong>the</strong>r experiments.<br />

To add fur<strong>the</strong>r user control over <strong>the</strong> model, I have decided to add settings for controlling <strong>the</strong> time<br />

until recovery from inflammation.<br />

7.4 Phase 4 – Experimenting with different sacrificing mechanics<br />

Throughout all <strong>of</strong> <strong>the</strong> o<strong>the</strong>r experiment phases, I have been trying to refine <strong>the</strong> model and ensure it<br />

runs in a stable and expected manner. For this final experiment phase, I will use <strong>the</strong> different<br />

sacrificing mechanics I have implemented and see what effect each has on <strong>the</strong> bacteria populations<br />

in <strong>the</strong> model, examining rate <strong>of</strong> inflammation and growth/decline <strong>of</strong> <strong>the</strong> bacteria populations.<br />

For <strong>the</strong>se experiments, <strong>the</strong> model will have all behaviours enabled and <strong>the</strong> simulation will be run for<br />

1800 cycles (3 hours) to allow <strong>the</strong> native bacteria populations to settle, <strong>the</strong>n <strong>the</strong> pathogens will be<br />

added. The model will <strong>the</strong>n be run for a fur<strong>the</strong>r 57600 cycles (4 days). The population pathogen<br />

53


population level will be checked every 14400 cycles (24 hours), comparing proportional increase to<br />

experimental data produced by Stecher et al. [5].<br />

Although exact figures cannot be read from <strong>the</strong> results in <strong>the</strong> paper, it is clear <strong>the</strong>re is, on average, a<br />

reduction in <strong>the</strong> population between days one and two, with <strong>the</strong> initial population being between<br />

approximately 9.2 and 9.7 log cfu/gram (colony forming units per gram) and <strong>the</strong> population at day<br />

two ranging between 9 and 9.7 log cfu/gram. From day two to three, <strong>the</strong> population sees a slight<br />

increase in range, though averages <strong>the</strong> same as day two (day three population ranges between 8.8<br />

and 9.8 log cfu/gram) and at day four <strong>the</strong>re is, on average, an increase in <strong>the</strong> pathogen population,<br />

with <strong>the</strong> range being between 9.4 and 10.3 log cfu/gram. The values I have given are rough<br />

estimates based on <strong>the</strong> intestinal content box plot (see figure 3) in <strong>the</strong> paper by Stecher et al.<br />

Ano<strong>the</strong>r factor obtained through <strong>the</strong> experiments by Stecher et al. is that after 4 days somewhere<br />

between 88 and 100 percent <strong>of</strong> <strong>the</strong> total bacteria were salmonella pathogens (see figure 2-A in <strong>the</strong><br />

work <strong>of</strong> Stecher et al.) [5], so 57600 cycles after <strong>the</strong> infection has been initiated, I will see if <strong>the</strong><br />

pathogen population level in <strong>the</strong> model reflects this.<br />

Inputs<br />

<strong>Model</strong> runtime: 1800 cycles (3 hours) to allow bacteria levels to settle<br />

57600 cycles (4 days)<br />

Visualisation Parameters<br />

Env-Visualistion-Mode – Nutrient Concentration<br />

showPathogens – On<br />

showBacteroides – On<br />

showBifidobacterium – On<br />

Environment Parameters<br />

Env-Base-Temperature – 36<br />

Initial-Env-Nutrient-Concentration-Min – 0<br />

Initial-Env-Nutrient-Concentration-Max – 100<br />

Replenish-Nutrients-Every-N-Ticks – 100<br />

Replenish-Nutrient-Percentage-Factor – 10%<br />

Min-Cycles-Before-Inflammation-Recovery – 300<br />

Min-Cycles-Before-Inflammation-Recovery – 600<br />

Flushing Parameters<br />

Enable-Flushing – On<br />

Min-Cycles-Before-Flush – 1050<br />

Max-Cycles-Before-Flush – 1500<br />

Percentage-Bacteria-Removed-On-Flush – 20%<br />

Diffusions-On-Flush – 80<br />

Shared Bacteria Parameters<br />

Leave-Percent-Nutrients-On-Death – 10%<br />

Run-Apoptosis-Every-N-Ticks – 600<br />

Apoptosis-Probability – 1%<br />

Bacteria-Effect-On-pH – 0.10<br />

Native Parameters<br />

Initial-Bacteroide-Pop – 3000<br />

Initial-Bifidobacterium-Pop – 1948<br />

Initial-Native-Nutrient-Concentration-Min – 40<br />

Initial-Native-Nutrient-Concentration-Max – 100<br />

BFragilis-Base-Uptake – 0.87<br />

BDistasonis-Base-Uptake – 0.335<br />

BThetaiotaomicron-Base-Uptake – 0.534<br />

BVulgatus-Base-Uptake – 0.525<br />

Bifidobacterium-Base-Uptake – 0.2835<br />

BFragilis-Maintenance – 0.10875<br />

BDistasonis- Maintenance – 0.041875<br />

BThetaiotaomicron- Maintenance – 0.06675<br />

BVulgatus- Maintenance – 0.065625<br />

Bifidobacterium- Maintenance – 0.03<br />

Pathogen Parameters<br />

Initial-Pathogen-Pop – 83*<br />

Percentage-Expressing-TTSS1 – 30%<br />

Initial-Pathogen-Nutrient-Concentration-Min –<br />

40<br />

Initial-Pathogen-Nutrient-Concentration-Max –<br />

100<br />

Pathogen-Base-Uptake – 0.9<br />

Pathogen-Maintenance – 0.1125<br />

Sacrifice-Method – VARIABLE**<br />

Sacrifice-Probability – VARIABLE**<br />

Maximum-Pathogens-In-Hierarchy-Level –<br />

VARIABLE**<br />

54


*will be adjusted, from 83, to a number relative to <strong>the</strong> population levels <strong>of</strong> native bacteria after 1800<br />

cycles (<strong>the</strong> time when <strong>the</strong> pathogens will be added). This number will be calculated by taking <strong>the</strong><br />

average percentage increase <strong>of</strong> bacteroide and bifidobacterium populations and applying that<br />

percentage increase to <strong>the</strong> original, proportional value <strong>of</strong> 83.<br />

**These inputs will vary depending on <strong>the</strong> experiment. The values used will be specified under each<br />

experiment heading.<br />

Results<br />

Simultaneous Sacrificing<br />

A<br />

B<br />

C<br />

Sacrifice-Method – Simultaneous, Sacrifice-Probability – N/A, Maximum-Pathogens-In-Hierarchy-Level – N/A<br />

Bacteroide<br />

Population<br />

Bifidobacterium<br />

Population<br />

Pathogen<br />

Population<br />

Cooperative<br />

Pathogen<br />

Population<br />

Start <strong>of</strong><br />

<strong>Infection</strong><br />

(1800 cycles)<br />

1 Day Post<br />

<strong>Infection</strong><br />

(16200 cycles)<br />

2 Days Post<br />

<strong>Infection</strong><br />

(30600 cycles)<br />

3 Days Post<br />

<strong>Infection</strong><br />

(45000 cycles)<br />

4879 15 0 0 0<br />

2407 2523 748 287 111<br />

4 Days Post<br />

<strong>Infection</strong><br />

(59400 cycles)<br />

116 3751 ˄ 4160 ˄ 4409 ˄ 5347 ˄ (98%)<br />

34 0 0 0 0<br />

Sacrifice-Method – Simultaneous, Sacrifice-Probability – N/A, Maximum-Pathogens-In-Hierarchy-Level – N/A<br />

Bacteroide<br />

Population<br />

Bifidobacterium<br />

Population<br />

Pathogen<br />

Population<br />

Cooperative<br />

Pathogen<br />

Population<br />

Start <strong>of</strong><br />

<strong>Infection</strong><br />

(1800 cycles)<br />

1 Day Post<br />

<strong>Infection</strong><br />

(16200 cycles)<br />

2 Days Post<br />

<strong>Infection</strong><br />

(30600 cycles)<br />

3 Days Post<br />

<strong>Infection</strong><br />

(45000 cycles)<br />

5452 9 0 0 0<br />

2370 3891 800 323 106<br />

4 Days Post<br />

<strong>Infection</strong><br />

(59400 cycles)<br />

127 4655 ˄ 4920 ˄ 5428 ˄ 4912 ˅ (98%)<br />

38 0 0 0 0<br />

Sacrifice-Method – Simultaneous, Sacrifice-Probability – N/A, Maximum-Pathogens-In-Hierarchy-Level – N/A<br />

Bacteroide<br />

Population<br />

Bifidobacterium<br />

Population<br />

Pathogen<br />

Population<br />

Cooperative<br />

Pathogen<br />

Population<br />

Start <strong>of</strong><br />

<strong>Infection</strong><br />

(1800 cycles)<br />

1 Day Post<br />

<strong>Infection</strong><br />

(16200 cycles)<br />

Table 7-1: Simultaneous sacrificing experiment population figures.<br />

2 Days Post<br />

<strong>Infection</strong><br />

(30600 cycles)<br />

3 Days Post<br />

<strong>Infection</strong><br />

(45000 cycles)<br />

5800 0 0 0 0<br />

2599 3092 840 342 90<br />

4 Days Post<br />

<strong>Infection</strong><br />

(59400 cycles)<br />

135 4417 ˄ 5456 ˄ 4679 ˅ 5216 ˄ (98.3%)<br />

40 0 0 0 0<br />

55


Location <strong>Based</strong> Sacrificing<br />

A<br />

B<br />

C<br />

Sacrifice-Method – Location <strong>Based</strong>, Sacrifice-Probability – N/A, Maximum-Pathogens-In-Hierarchy-Level – N/A<br />

Bacteroide<br />

Population<br />

Bifidobacterium<br />

Population<br />

Pathogen<br />

Population<br />

Cooperative<br />

Pathogen<br />

Population<br />

Start <strong>of</strong><br />

<strong>Infection</strong><br />

(1800 cycles)<br />

1 Day Post<br />

<strong>Infection</strong><br />

(16200 cycles)<br />

2 Days Post<br />

<strong>Infection</strong><br />

(30600 cycles)<br />

3 Days Post<br />

<strong>Infection</strong><br />

(45000 cycles)<br />

6113 0 0 0 0<br />

2719 2539 810 273 107<br />

4 Days Post<br />

<strong>Infection</strong><br />

(59400 cycles)<br />

142 4649 ˄ 4036 ˅ 4222 ˄ 4220 ˉ (97.5%)<br />

42 886 598 428 436 (10.3%)<br />

Sacrifice-Method – Location <strong>Based</strong>, Sacrifice-Probability – N/A, Maximum-Pathogens-In-Hierarchy-Level – N/A<br />

Bacteroide<br />

Population<br />

Bifidobacterium<br />

Population<br />

Pathogen<br />

Population<br />

Cooperative<br />

Pathogen<br />

Population<br />

Start <strong>of</strong><br />

<strong>Infection</strong><br />

(1800 cycles)<br />

1 Day Post<br />

<strong>Infection</strong><br />

(16200 cycles)<br />

2 Days Post<br />

<strong>Infection</strong><br />

(30600 cycles)<br />

3 Days Post<br />

<strong>Infection</strong><br />

(45000 cycles)<br />

4901 0 0 0 0<br />

2351 2351 753 253 49<br />

4 Days Post<br />

<strong>Infection</strong><br />

(59400 cycles)<br />

117 3899 ˄ 4659 ˄ 6071 ˄ 3488 ˅ (98.6%)<br />

35 859 681 813 433 (12.4%)<br />

Sacrifice-Method – Location <strong>Based</strong>, Sacrifice-Probability – N/A, Maximum-Pathogens-In-Hierarchy-Level – N/A<br />

Bacteroide<br />

Population<br />

Bifidobacterium<br />

Population<br />

Pathogen<br />

Population<br />

Cooperative<br />

Pathogen<br />

Population<br />

Start <strong>of</strong><br />

<strong>Infection</strong><br />

(1800 cycles)<br />

1 Day Post<br />

<strong>Infection</strong><br />

(16200 cycles)<br />

Table 7-2: Location based sacrificing experiment population figures.<br />

2 Days Post<br />

<strong>Infection</strong><br />

(30600 cycles)<br />

3 Days Post<br />

<strong>Infection</strong><br />

(45000 cycles)<br />

5387 0 0 0 0<br />

2364 2213 571 205 71<br />

4 Days Post<br />

<strong>Infection</strong><br />

(59400 cycles)<br />

123 3891 ˄ 3864 ˉ 4789 ˄ 4775 ˉ (98.5%)<br />

37 841 655 713 590 (12.2%)<br />

56


Hierarchy <strong>Based</strong> Sacrificing<br />

A<br />

B<br />

C<br />

Sacrifice-Method – Hierarchy <strong>Based</strong>, Sacrifice-Probability – N/A, Maximum-Pathogens-In-Hierarchy-Level – 1<br />

Bacteroide<br />

Population<br />

Bifidobacterium<br />

Population<br />

Pathogen<br />

Population<br />

Cooperative<br />

Pathogen<br />

Population<br />

Start <strong>of</strong><br />

<strong>Infection</strong><br />

(1800 cycles)<br />

1 Day Post<br />

<strong>Infection</strong><br />

(16200 cycles)<br />

2 Days Post<br />

<strong>Infection</strong><br />

(30600 cycles)<br />

3 Days Post<br />

<strong>Infection</strong><br />

(45000 cycles)<br />

5868 6 0 0 0<br />

2611 2845 828 318 116<br />

4 Days Post<br />

<strong>Infection</strong><br />

(59400 cycles)<br />

135 3430 ˄ 3479 ˉ 4720 ˄ 3602 ˅ (97%)<br />

41 0 0 0 0<br />

Sacrifice-Method – Hierarchy <strong>Based</strong>, Sacrifice-Probability – N/A, Maximum-Pathogens-In-Hierarchy-Level – 5<br />

Bacteroide<br />

Population<br />

Bifidobacterium<br />

Population<br />

Pathogen<br />

Population<br />

Cooperative<br />

Pathogen<br />

Population<br />

Start <strong>of</strong><br />

<strong>Infection</strong><br />

(1800 cycles)<br />

1 Day Post<br />

<strong>Infection</strong><br />

(16200 cycles)<br />

2 Days Post<br />

<strong>Infection</strong><br />

(30600 cycles)<br />

3 Days Post<br />

<strong>Infection</strong><br />

(45000 cycles)<br />

5398 12 0 0 0<br />

2463 2255 894 332 114<br />

4 Days Post<br />

<strong>Infection</strong><br />

(59400 cycles)<br />

125 3674 ˄ 5237 ˄ 4377 ˅ 5593 ˄ (98%)<br />

36 0 0 0 0<br />

Sacrifice-Method – Hierarchy <strong>Based</strong>, Sacrifice-Probability – N/A, Maximum-Pathogens-In-Hierarchy-Level – 10<br />

Bacteroide<br />

Population<br />

Bifidobacterium<br />

Population<br />

PATHOGEN<br />

POPULATION<br />

Cooperative<br />

Pathogen<br />

Population<br />

Start <strong>of</strong><br />

<strong>Infection</strong><br />

(1800 cycles)<br />

1 Day Post<br />

<strong>Infection</strong><br />

(16200 cycles)<br />

2 Days Post<br />

<strong>Infection</strong><br />

(30600 cycles)<br />

3 Days Post<br />

<strong>Infection</strong><br />

(45000 cycles)<br />

5714 0 0 0 0<br />

2648 2311 789 413 97<br />

4 Days Post<br />

<strong>Infection</strong><br />

(59400 cycles)<br />

135 3278 ˄ 4250 ˄ 5249 ˄ 4201 ˅ (97.7%)<br />

41 0 0 0 0<br />

Table 7-3: Hierarchy based sacrificing experiment population figures.<br />

57


Probability <strong>Based</strong> Sacrificing<br />

A<br />

B<br />

C<br />

Sacrifice-Method – Probability <strong>Based</strong>, Sacrifice-Probability – 1, Maximum-Pathogens-In-Hierarchy-Level – N/A<br />

Bacteroide<br />

Population<br />

Bifidobacterium<br />

Population<br />

Pathogen<br />

Population<br />

Cooperative<br />

Pathogen<br />

Population<br />

Start <strong>of</strong><br />

<strong>Infection</strong><br />

(1800 cycles)<br />

1 Day Post<br />

<strong>Infection</strong><br />

(16200 cycles)<br />

2 Days Post<br />

<strong>Infection</strong><br />

(30600 cycles)<br />

3 Days Post<br />

<strong>Infection</strong><br />

(45000 cycles)<br />

5153 7 0 0 0<br />

2411 2756 990 308 135<br />

4 Days Post<br />

<strong>Infection</strong><br />

(59400 cycles)<br />

122 3616 ˄ 4710 ˄ 4795 ˉ 5015 ˄ (97.4%)<br />

37 0 0 0 0<br />

Sacrifice-Method – Probability <strong>Based</strong>, Sacrifice-Probability – 0.5, Maximum-Pathogens-In-Hierarchy-Level – N/A<br />

Bacteroide<br />

Population<br />

Bifidobacterium<br />

Population<br />

Pathogen<br />

Population<br />

Cooperative<br />

Pathogen<br />

Population<br />

Start <strong>of</strong><br />

<strong>Infection</strong><br />

(1800 cycles)<br />

1 Day Post<br />

<strong>Infection</strong><br />

(16200 cycles)<br />

2 Days Post<br />

<strong>Infection</strong><br />

(30600 cycles)<br />

3 Days Post<br />

<strong>Infection</strong><br />

(45000 cycles)<br />

4855 6 0 0 0<br />

2381 2637 978 339 114<br />

4 Days Post<br />

<strong>Infection</strong><br />

(59400 cycles)<br />

116 3286 ˄ 5332 ˄ 4806 v 6508 ˄ (98.3%)<br />

35 0 0 0 0<br />

Sacrifice-Method – Probability <strong>Based</strong>, Sacrifice-Probability – 0.005, Maximum-Pathogens-In-Hierarchy-Level –<br />

N/A<br />

Start <strong>of</strong> 1 Day Post 2 Days Post 3 Days Post 4 Days Post<br />

<strong>Infection</strong> <strong>Infection</strong> <strong>Infection</strong> <strong>Infection</strong> <strong>Infection</strong><br />

(1800 cycles) (16200 cycles) (30600 cycles) (45000 cycles) (59400 cycles)<br />

Bacteroide<br />

Population<br />

6273 0 0 0 0<br />

Bifidobacterium<br />

Population<br />

2705 2610 978 373 96<br />

Pathogen<br />

Population<br />

142 3938 ˄ 4673 ˄ 5018 ˄ 4947 ˅ (98.1%)<br />

Cooperative<br />

Pathogen<br />

Population<br />

41 778 705 606 455 (9%)<br />

Table 7-4: Probability based sacrificing experiment population figures.<br />

58


The results for simultaneous sacrificing (table 7-1) show that <strong>the</strong> mechanic does not adhere to <strong>the</strong><br />

experimental results obtained by Stecher et al. None <strong>of</strong> <strong>the</strong> three tests show <strong>the</strong> same population<br />

dynamics expressed by <strong>the</strong> pathogen population in reality and although <strong>the</strong> final percentage <strong>of</strong><br />

pathogens in <strong>the</strong> total bacteria population does fall within <strong>the</strong> expected range, <strong>the</strong> percentages are<br />

all around 98%, <strong>the</strong> upper end <strong>of</strong> <strong>the</strong> average percentage population.<br />

Additionally, <strong>the</strong> results show that all <strong>of</strong> <strong>the</strong> cooperative pathogens sacrifice <strong>the</strong>mselves within <strong>the</strong><br />

first 24 hours <strong>of</strong> infection. This means <strong>the</strong> pathogens gain a quick, but brief advantage over <strong>the</strong><br />

native bacteria, allowing <strong>the</strong>m to quickly grow in number and suppress <strong>the</strong> native micr<strong>of</strong>lora.<br />

However, it also means that this sacrificing mechanic does not allow survival <strong>of</strong> <strong>the</strong> cooperative<br />

phenotype, making <strong>the</strong> mechanic unsustainable from an evolutionary standpoint. Having said that,<br />

<strong>the</strong> cooperative phenotype could survive if some <strong>of</strong> <strong>the</strong> cooperative pathogens are flushed before<br />

<strong>the</strong>y sacrifice, allowing <strong>the</strong>m to re-coup in numbers before infecting ano<strong>the</strong>r host.<br />

The results <strong>of</strong> location based sacrificing (table 7-2) again show <strong>the</strong> final proportion <strong>of</strong> pathogens to<br />

be on <strong>the</strong> upper end <strong>of</strong> <strong>the</strong> average percentage observed in <strong>the</strong> biological experiments, ranging<br />

between 97.5% and 98.6%. Also, <strong>the</strong> population dynamics <strong>of</strong> <strong>the</strong> pathogens are still not an exact<br />

match to <strong>the</strong> results found in biological experiments and though experiment A is <strong>the</strong> only time <strong>the</strong><br />

pathogen population showed a decrease between days 1 and 2, <strong>the</strong> population seems to average<br />

out after that, with no significant rise or fall occurring.<br />

Despite <strong>the</strong> shortcomings in terms <strong>of</strong> population dynamics, location based sacrificing does provide<br />

<strong>the</strong> cooperative pathogens a chance persist in <strong>the</strong> host environment, which is due to <strong>the</strong> low chance<br />

<strong>of</strong> coming into <strong>the</strong> contact with <strong>the</strong> membrane. The percentage <strong>of</strong> <strong>the</strong> population <strong>the</strong> pathogens<br />

occupy is in line with experiments conducted by Ackermann et al. [1], who stated final co-operators<br />

in <strong>the</strong> lumen to be around 15%. Although this in-vitro result was obtained after only 12 hours <strong>the</strong><br />

percentage <strong>of</strong> pathogens in <strong>the</strong> population is still between 12% and 14% after 24 hours in <strong>the</strong> model.<br />

The results <strong>of</strong> hierarchy based sacrificing (table 7-3) are similar to those obtained using simultaneous<br />

sacrificing in terms <strong>of</strong> a comparison to actual experiments by Stecher et al. in that <strong>the</strong>y do not follow<br />

<strong>the</strong> population dynamics, <strong>the</strong> final percentage <strong>of</strong> pathogens in <strong>the</strong> final population is high (between<br />

97% and 98%) and <strong>the</strong> co-operators all sacrifice <strong>the</strong>mselves within <strong>the</strong> first 24 hours. Varying <strong>the</strong><br />

number <strong>of</strong> pathogens in each hierarchy level and <strong>the</strong>refore how many can begin sacrificing at any<br />

one time, does not seem to affect <strong>the</strong> outcome over 24 hours periods.<br />

The final sacrificing mechanic is that <strong>of</strong> probability based on numbers, effectively producing purely<br />

stochastic sacrifices. The results in table 7-4 show this method gives similar population dynamics to<br />

simultaneous and hierarchy based sacrificing, however, test C shows that if a low enough probability<br />

is used, <strong>the</strong> co-operators can maintain <strong>the</strong>ir population and <strong>the</strong> results are more similar to those<br />

produced by location based sacrificing. This is due to <strong>the</strong> fact that both location based and low value<br />

probability based sacrifice methods have a very low chance <strong>of</strong> producing a sacrifice and <strong>the</strong>refore<br />

give <strong>the</strong> populations time to grow.<br />

59


Experiment 4-1- Fur<strong>the</strong>r examination <strong>of</strong> location based sacrificing<br />

When all <strong>the</strong> results <strong>of</strong> <strong>the</strong> initial sacrifice method experiments are considered, <strong>the</strong> outcome is not<br />

very encouraging in terms <strong>of</strong> <strong>the</strong> validity <strong>of</strong> <strong>the</strong> model. In order to fur<strong>the</strong>r investigate what is<br />

actually occurring when <strong>the</strong> model is running, I will perform ano<strong>the</strong>r simulation run, monitoring<br />

more than just <strong>the</strong> population dynamics over time, allowing me to see what effect inflammation is<br />

having, how <strong>the</strong> level changes and how it affects temperature.<br />

Sacrifice-Method – Location <strong>Based</strong>, Sacrifice-Probability – N/A, Maximum-Pathogens-In-Hierarchy-Level – N/A<br />

Start <strong>of</strong><br />

<strong>Infection</strong><br />

(1800 cycles)<br />

1 Day Post<br />

<strong>Infection</strong><br />

(16200 cycles)<br />

2 Days Post<br />

<strong>Infection</strong><br />

(30600 cycles)<br />

3 Days Post<br />

<strong>Infection</strong><br />

(45000 cycles)<br />

4 Days Post<br />

<strong>Infection</strong><br />

(59400 cycles)<br />

Bacteroide<br />

Population<br />

5465 0 0 0 0<br />

Bifidobacterium<br />

Population<br />

2471 1870 435 143 50<br />

Pathogen<br />

Population<br />

129 4869 4695 5417 3694<br />

Cooperative<br />

Pathogen<br />

Population<br />

39 1130 858 743 414<br />

Influencing<br />

Sacrifices<br />

0 26 16 12 10<br />

Inflammation 1.986 3.011 2.565 2.406 2.331<br />

Temperature 36.520 36.789 36.672 36.630 36.611<br />

Table 7-5: Location based sacrificing experiment raw data<br />

Figure 7-17: Influencing sacrifices, inflammation and temperature levels over time.<br />

The results shown in table 7-5 and <strong>the</strong> graphs in figure 7-17 provide fur<strong>the</strong>r insight into <strong>the</strong> dynamics<br />

<strong>of</strong> <strong>the</strong> model. The low probability <strong>of</strong> coming in contact with <strong>the</strong> lumen limits <strong>the</strong> number <strong>of</strong><br />

pathogens whose sacrifice can influence <strong>the</strong> environment at any one time. This means that<br />

inflammation is always at a low level and as temperature has been programmed to be relative to<br />

inflammation, a fever temperature is never reached.<br />

This leads me to believe that some <strong>of</strong> <strong>the</strong> assumptions I made when designed <strong>the</strong> model have cause<br />

some fundamental flaws. I assumed that <strong>the</strong> inflammation against number <strong>of</strong> TTSS-1 + pathogens<br />

plot (figure 2-D) in <strong>the</strong> paper by Ackermann et al [1] showed <strong>the</strong> number <strong>of</strong> sacrifices which were<br />

required to cause a given level on inflammation, whereas it seems it could be more accurate to<br />

assume that, given a certain number <strong>of</strong> TTSS-1 + pathogens in <strong>the</strong> lumen, a number <strong>of</strong> sacrifices occur<br />

60


which causes a given level <strong>of</strong> inflammation, not necessarily requiring all <strong>of</strong> those pathogens to<br />

sacrifice.<br />

Ano<strong>the</strong>r problem highlighted by <strong>the</strong> results <strong>of</strong> this experiment is that a constant, low level <strong>of</strong><br />

inflammation over a prolonged period <strong>of</strong> time causes <strong>the</strong> death <strong>of</strong> all native bacteria (although <strong>the</strong><br />

Bifidobacterium population never completely dies in any <strong>of</strong> <strong>the</strong> experiments, it shows a continuous<br />

decline in most). This shows that although <strong>the</strong> effect <strong>of</strong> inflammation on nutrient uptake was based<br />

on <strong>the</strong> assumption that at an inflammation level <strong>of</strong> 13 on <strong>the</strong> scale given by Ackermann et al. means<br />

that native bacteria cannot survive, this, in combination with temperature, pH, maintenance rates<br />

and competition for nutrients, means that even <strong>the</strong> small modifier, e.g. an inflammation level <strong>of</strong> 3 or<br />

lower, prevents <strong>the</strong> native bacteria from persisting in <strong>the</strong> environment.<br />

Experiment 4-2- Altering temperature dynamic<br />

As mentioned in <strong>the</strong> discussion <strong>of</strong> experiment 4-1, <strong>the</strong> assumption that temperature is linked to<br />

inflammation is clearly wrong. To rectify this, I will alter <strong>the</strong> model so a fever temperature is<br />

imposed as soon as pathogens are present in <strong>the</strong> model and remains until <strong>the</strong>y are eliminated. The<br />

fever temperature will be a parameter <strong>the</strong> user can set, as I have assumed <strong>the</strong> high fever<br />

temperature is proportional to <strong>the</strong> initial environment temperature, which is also a model<br />

parameter.<br />

In order to observe <strong>the</strong> effects <strong>of</strong> this change, I will run <strong>the</strong> model for 1800 cycles, to allow <strong>the</strong><br />

native populations to settle, <strong>the</strong>n add pathogens and run <strong>the</strong> model for a fur<strong>the</strong>r 3700 cycles, giving<br />

a total run time <strong>of</strong> 5500 cycles or 9.1 hours, as with <strong>the</strong> short-time experiments above. Additionally,<br />

sacrificing will be disabled as I wish to look at <strong>the</strong> effect <strong>of</strong> temperature alone. With <strong>the</strong> exception <strong>of</strong><br />

<strong>the</strong> “Sacrifice-Method” parameter being set to “None” and <strong>the</strong> new parameter “Env-Fever-<br />

Temperature” being set to “39.4”, <strong>the</strong> inputs will remain <strong>the</strong> same as previous experiments in this<br />

section.<br />

Results<br />

Figure 7-18: Population graph with new<br />

temperature dynamic.<br />

Figure 7-18 shows that <strong>the</strong> new temperature method has a severe effect on <strong>the</strong> Bacteroide<br />

population. This is because <strong>the</strong> Bacteroides have <strong>the</strong> lowest, high-end temperature tolerance at<br />

41 o C, compared to Bifidobacterium tolerance <strong>of</strong> 45 o C and <strong>the</strong> <strong>Salmonella</strong> tolerance <strong>of</strong> 49.5 o C.<br />

61


The black line running vertically in <strong>the</strong> graph shows <strong>the</strong> point at which <strong>the</strong> pathogens were added.<br />

As can be seen, <strong>the</strong> Bacteroides take a while to begin <strong>the</strong> massive decrease in population and it<br />

appears to occur after a flush event. This indicates that <strong>the</strong> decline in Bacteroide population is not<br />

only due to <strong>the</strong> effect on <strong>the</strong> uptake <strong>of</strong> <strong>the</strong> Bacteroides, but also due to <strong>the</strong> o<strong>the</strong>r agents consuming<br />

<strong>the</strong> majority <strong>of</strong> <strong>the</strong> nutrients, as <strong>the</strong>ir uptake rates are not so adversely affected by <strong>the</strong> temperature<br />

increase.<br />

The population dynamics without sacrificing are, as was to be expected, very different from those<br />

obtained in experiment 2-3 (under section 7.2) with <strong>the</strong> alteration to handling fever temperature.<br />

As for realism <strong>of</strong> <strong>the</strong> model in this state, I cannot say. It is entirely possible that a portion <strong>of</strong> <strong>the</strong><br />

native population is completely wiped out during infection and later replenished, from previous<br />

areas in <strong>the</strong> digestive tract, once <strong>the</strong> infection has been defeated. However, as I said I cannot be<br />

certain <strong>of</strong> this fact and time does not allow me to investigate <strong>the</strong> matter fur<strong>the</strong>r.<br />

Experiment 4-3- Implementing a lag phase<br />

I will now investigate <strong>the</strong> possibility <strong>of</strong> adding a lag phase to <strong>the</strong> sacrificing dynamic <strong>of</strong> <strong>the</strong><br />

<strong>Salmonella</strong> pathogens. The motivation for doing this is <strong>the</strong> work <strong>of</strong> Ackermann et al. [1], which<br />

states that a population with members who exhibit self-destructive cooperative behaviour, will first<br />

grow to <strong>the</strong> capacity <strong>of</strong> <strong>the</strong> host, before <strong>the</strong> cooperative members begin to sacrifice. Additionally,<br />

<strong>the</strong> experimental data produced by Stecher et al. [5], shows that on average, <strong>the</strong>re is a drop in <strong>the</strong><br />

level <strong>of</strong> pathogens over <strong>the</strong> first day <strong>of</strong> <strong>the</strong>ir experiments. This in-vitro drop in pathogen population<br />

could be explained by <strong>the</strong> initial pathogen population added, along with <strong>the</strong> pre-existing native<br />

bacteria, being unsustainable by <strong>the</strong> host, though it could also be attributed to <strong>the</strong> pathogen<br />

population adjusting to <strong>the</strong>ir new environment.<br />

For <strong>the</strong> purposes <strong>of</strong> this model, I will follow <strong>the</strong> information provided be Ackermann et al. and<br />

prevent sacrificing until <strong>the</strong> pathogens reach a steady capacity. This will be achieved by dynamically<br />

detecting a prolonged stationary phase (low population level fluctuation) during runtime. <strong>Model</strong><br />

parameters will include <strong>the</strong> period <strong>of</strong> time for a certain population to be sustained and <strong>the</strong><br />

maximum variation in population count over that period.<br />

In order to determine suitable parameters for <strong>the</strong> model inputs that will be used, I will run <strong>the</strong><br />

model for several 7200 cycle (12 hour) periods with pathogens, recording <strong>the</strong> exact pathogen<br />

population on every cycle. Then, using <strong>the</strong> population graph output, I will look at <strong>the</strong> length <strong>of</strong> <strong>the</strong><br />

stationary phases and <strong>the</strong> fluctuation in population during those phases. The inputs for this will be<br />

as <strong>the</strong>y were in experiment 4-2.<br />

62


Population Variation (+/-) Period (cycles)<br />

0 569<br />

3 547<br />

10 769<br />

11 965<br />

13 858<br />

15 722<br />

18 1088<br />

19 1035<br />

20 736<br />

29 721<br />

37 586<br />

37 807<br />

41 1211<br />

44 1101<br />

Table 7-6: Population variation during and total duration <strong>of</strong><br />

stationary periods, over 4 runs and sorted by variation.<br />

Table 7-6 shows <strong>the</strong> duration <strong>of</strong> stationary periods and <strong>the</strong> population variations during those<br />

periods from <strong>the</strong> simulation runs conducted for this experiment. For <strong>the</strong> duration parameter, <strong>the</strong><br />

average duration is 837 cycles. This value is clearly too high, a point illustrated by <strong>the</strong> fact that if it<br />

was applied in each <strong>of</strong> <strong>the</strong> above cases, sacrificing would only commence in 6 <strong>of</strong> <strong>the</strong> 14 cases. Using<br />

<strong>the</strong> data in table 7-6, a duration <strong>of</strong> 700 cycles would be suitable, allowing sacrificing to begin in 11 <strong>of</strong><br />

<strong>the</strong> 14 cases.<br />

For <strong>the</strong> population variation, we can see <strong>the</strong> highest variation is 44 members. In <strong>the</strong> code, I will<br />

need to allow for rise and fall in population count by this value, however a variation <strong>of</strong> 44 is not too<br />

high as, after <strong>the</strong> initial growth phase, <strong>the</strong> pathogen population is usually around 700-1000.<br />

In order to test <strong>the</strong> effects <strong>of</strong> <strong>the</strong> lag phase, I will run <strong>the</strong> model twice using simultaneous sacrificing.<br />

For one run, I will disable <strong>the</strong> feature and for <strong>the</strong> second, I will enable it with <strong>the</strong> inputs discussed<br />

above. The o<strong>the</strong>r model inputs will remain as <strong>the</strong>y are for o<strong>the</strong>r tests in this section (7.4), with <strong>the</strong><br />

“Sacrifice-Method” set to “Simultaneous”.<br />

63


Figure 7-19: Difference in sacrifice timing, with<br />

and without stationary growth phase detection.<br />

The top graph in figure 7-19 shows <strong>the</strong> sacrifices over time without <strong>the</strong> new stationary growth<br />

detection, while <strong>the</strong> lower graph has <strong>the</strong> new dynamics enabled. As can be seen, <strong>the</strong> new dynamic<br />

delays sacrificing by a significant period <strong>of</strong> time and although it does not delay it to a level that<br />

would create a dip in pathogen population over a period <strong>of</strong> 24 hours, it is effective in creating lag<br />

period.<br />

Experiment 4-4- Enabling persistence <strong>of</strong> cooperative agents<br />

The intention <strong>of</strong> <strong>the</strong>se experiments is to add probability <strong>of</strong> mutation among <strong>the</strong> pathogen<br />

population. The justification for doing this is that, in <strong>the</strong> paper by Ackermann et al. [1], mutation<br />

dynamics are indicated to be possible through ma<strong>the</strong>matical pro<strong>of</strong>. They state that each pathogen<br />

has a probability to sacrifice and depending on where that probability lies on scale <strong>of</strong> 0 to 1 and<br />

where specific boundaries exist on that same scale, defectors (pathogens who do not express <strong>the</strong><br />

TTSS-1 phenotype) can produce co-operators, both defectors produce co-operators and cooperators<br />

produce defectors or nei<strong>the</strong>r. While probability to sacrifice, q, is less than q1, defectors<br />

mutate into co-operators. While q lies between q1 and q2, both co-operators and defectors mutate.<br />

While q is less than q2, <strong>the</strong> cooperative population enters “fixation”, which means it begins to<br />

dominate <strong>the</strong> population. Finally, when q equal to q3, we have an evolutionary stable state where<br />

little mutation occurs. The boundary equations are shown below (equations 9-11).<br />

64


The value for N was found by averaging <strong>the</strong> total number <strong>of</strong> pathogens at <strong>the</strong> stationary phase <strong>of</strong> <strong>the</strong><br />

growth curve, when no sacrificing took place. It was found to be 1230. M, <strong>the</strong> initial number <strong>of</strong><br />

pathogens varies in <strong>the</strong> model, but generally falls within <strong>the</strong> range <strong>of</strong> 125 – 140 when <strong>the</strong> model is<br />

run for 1800 cycles (as was done when finding <strong>the</strong> N value) before adding pathogens, so a value <strong>of</strong><br />

around 132 could be assigned. w, as mentioned before, was taken to be <strong>the</strong> base inflammation<br />

caused by infection, so, 1.5.<br />

Applying <strong>the</strong>se values to <strong>the</strong> equations by Ackermann et al. [1] resulted in negative probability<br />

boundaries. The reason for this is that <strong>the</strong> b value being used is lower than <strong>the</strong> w value. This<br />

indicates that fur<strong>the</strong>r investigation into interpreting where <strong>the</strong> equation parameters would come<br />

from is needed, as, although I did my best based on information provided by <strong>the</strong> information in <strong>the</strong><br />

paper by Ackermann et al. I could not replicate <strong>the</strong> math in my model.<br />

Despite <strong>the</strong>se issues, I still think that mutation <strong>of</strong> pathogenic agents is a good way to proceed. So,<br />

<strong>the</strong> approach I will take will be to allow <strong>the</strong> user to select what mutations can occur (defector to cooperator,<br />

both defector to co-operator and co-operator to defector, or none) and <strong>the</strong> probability <strong>of</strong><br />

mutation occurring. These options will allow <strong>the</strong> user to alter <strong>the</strong> mutation dynamics on <strong>the</strong> fly as<br />

<strong>the</strong> model can be paused, <strong>the</strong> settings altered and <strong>the</strong> model resumed. This is far from ideal, but it<br />

will allow mutation and also give <strong>the</strong> user <strong>the</strong> ability to control <strong>the</strong> mutation.<br />

66


Inputs<br />

There are a couple <strong>of</strong> things to note with regards to <strong>the</strong> inputs for <strong>the</strong> mutation parameters. First,<br />

<strong>the</strong> type <strong>of</strong> mutation allowed will be restricted to two way mutation, that is co-operators and<br />

defectors can mutate into each o<strong>the</strong>r. This is to keep maintain fairness during <strong>the</strong> simulation and<br />

can be fur<strong>the</strong>r justified due to <strong>the</strong> one way mutation (defectors to co-operators only) only exists for<br />

a small range <strong>of</strong> probabilities [1]. Second, <strong>the</strong> probability to mutate will be kept at a low value as<br />

mutation, although possible, is still rare [2].<br />

<strong>Model</strong> runtime: 1800 cycles (3 hours) to allow bacteria levels to settle<br />

57600 cycles (4 days)<br />

Visualisation Parameters<br />

Env-Visualistion-Mode – Nutrient Concentration<br />

showPathogens – On<br />

showBacteroides – On<br />

showBifidobacterium – On<br />

Environment Parameters<br />

Env-Base-Temperature – 36<br />

Initial-Env-Nutrient-Concentration-Min – 0<br />

Initial-Env-Nutrient-Concentration-Max – 100<br />

Replenish-Nutrients-Every-N-Ticks – 100<br />

Replenish-Nutrient-Percentage-Factor – 10%<br />

Min-Cycles-Before-Inflammation-Recovery – 300<br />

Min-Cycles-Before-Inflammation-Recovery – 600<br />

Flushing Parameters<br />

Enable-Flushing – On<br />

Min-Cycles-Before-Flush – 1050<br />

Max-Cycles-Before-Flush – 1500<br />

Percentage-Bacteria-Removed-On-Flush – 20%<br />

Diffusions-On-Flush – 80<br />

Shared Bacteria Parameters<br />

Leave-Percent-Nutrients-On-Death – 10%<br />

Run-Apoptosis-Every-N-Ticks – 600<br />

Apoptosis-Probability – 1%<br />

Bacteria-Effect-On-pH – 0.10<br />

Native Parameters<br />

Initial-Bacteroide-Pop – 3000<br />

Initial-Bifidobacterium-Pop – 1948<br />

Initial-Native-Nutrient-Concentration-Min – 40<br />

Initial-Native-Nutrient-Concentration-Max – 100<br />

BFragilis-Base-Uptake – 0.87<br />

BDistasonis-Base-Uptake – 0.335<br />

BThetaiotaomicron-Base-Uptake – 0.534<br />

BVulgatus-Base-Uptake – 0.525<br />

Bifidobacterium-Base-Uptake – 0.2835<br />

BFragilis-Maintenance – 0.10875<br />

BDistasonis- Maintenance – 0.041875<br />

BThetaiotaomicron- Maintenance – 0.06675<br />

BVulgatus- Maintenance – 0.065625<br />

Bifidobacterium- Maintenance – 0.03<br />

Pathogen Parameters<br />

Initial-Pathogen-Pop – 83*<br />

Percentage-Expressing-TTSS1 – 30%<br />

Initial-Pathogen-Nutrient-Concentration-Min –<br />

40<br />

Initial-Pathogen-Nutrient-Concentration-Max –<br />

100<br />

Pathogen-Base-Uptake – 0.9<br />

Pathogen-Maintenance – 0.1125<br />

Sacrifice-Method – Simultaneous<br />

Sacrifice-Probability – N/A<br />

Maximum-Pathogens-In-Hierarchy-Level – N/A<br />

Mutations-Allowed – Defector Cooperator<br />

Mutation-Probability – VARIABLE**<br />

*will be adjusted, from 83, to a number relative to <strong>the</strong> population levels <strong>of</strong> native bacteria after 1800<br />

cycles (<strong>the</strong> time when <strong>the</strong> pathogens will be added). This number will be calculated by taking <strong>the</strong><br />

average percentage increase <strong>of</strong> bacteroide and bifidobacterium populations and applying that<br />

percentage increase to <strong>the</strong> original, proportional value <strong>of</strong> 83.<br />

**These inputs will vary depending on <strong>the</strong> experiment. The values used will be specified under each<br />

experiment heading.<br />

67


Results<br />

Simultaneous Sacrificing<br />

A<br />

B<br />

C<br />

Sacrifice-Method – Simultaneous, Sacrifice-Probability – N/A, Maximum-Pathogens-In-Hierarchy-Level – N/A,<br />

Mutation-Probability – 1<br />

Start <strong>of</strong><br />

<strong>Infection</strong><br />

(1800 cycles)<br />

Bacteroide<br />

Population<br />

Bifidobacterium<br />

Population<br />

Pathogen<br />

Population<br />

Cooperative<br />

Pathogen<br />

Population<br />

Influencing<br />

Sacrifices<br />

1 Day Post<br />

<strong>Infection</strong><br />

(16200 cycles)<br />

2 Days Post<br />

<strong>Infection</strong><br />

(30600 cycles)<br />

3 Days Post<br />

<strong>Infection</strong><br />

(45000 cycles)<br />

5496 0 0 0 0<br />

2372 0 0 0 0<br />

4 Days Post<br />

<strong>Infection</strong><br />

(59400 cycles)<br />

121 4360 ˄ 4260 ˉ 4304 ˉ 4760 ˄ (100%)<br />

36 0 0 0 11<br />

0 0 0 0 11<br />

Inflammation 1.986 1.986 1.986 1.986 2.368<br />

Sacrifice-Method – Simultaneous, Sacrifice-Probability – N/A, Maximum-Pathogens-In-Hierarchy-Level – N/A,<br />

Mutation-Probability – 5<br />

Start <strong>of</strong><br />

<strong>Infection</strong><br />

(1800 cycles)<br />

Bacteroide<br />

Population<br />

Bifidobacterium<br />

Population<br />

Pathogen<br />

Population<br />

Cooperative<br />

Pathogen<br />

Population<br />

Influencing<br />

Sacrifices<br />

1 Day Post<br />

<strong>Infection</strong><br />

(16200 cycles)<br />

2 Days Post<br />

<strong>Infection</strong><br />

(30600 cycles)<br />

3 Days Post<br />

<strong>Infection</strong><br />

(45000 cycles)<br />

5972 0 0 0 0<br />

2688 0 0 0 0<br />

4 Days Post<br />

<strong>Infection</strong><br />

(59400 cycles)<br />

139 4599 ˄ 5142 ˄ 4352 ˅ 3544 ˅ (100%)<br />

42 26 0 0 2<br />

0 24 0 0 0<br />

Inflammation 1.986 2.916 1.986 1.986 1.986<br />

Sacrifice-Method – Simultaneous, Sacrifice-Probability – N/A, Maximum-Pathogens-In-Hierarchy-Level – N/A,<br />

Mutation-Probability – 10<br />

Start <strong>of</strong><br />

<strong>Infection</strong><br />

(1800 cycles)<br />

Bacteroide<br />

Population<br />

Bifidobacterium<br />

Population<br />

Pathogen<br />

Population<br />

Cooperative<br />

Pathogen<br />

Population<br />

Influencing<br />

Sacrifices<br />

1 Day Post<br />

<strong>Infection</strong><br />

(16200 cycles)<br />

2 Days Post<br />

<strong>Infection</strong><br />

(30600 cycles)<br />

3 Days Post<br />

<strong>Infection</strong><br />

(45000 cycles)<br />

5746 0 0 0 0<br />

2635 0 0 0 0<br />

4 Days Post<br />

<strong>Infection</strong><br />

(59400 cycles)<br />

135 5332 ˄ 4268 ˅ 4409 ˉ 5433 ˄ (100%)<br />

41 14 6 100 174<br />

0 14 1 49 169<br />

Inflammation 1.986 2.485 2.018 4.281 29.67<br />

Table 7-7: Raw data results <strong>of</strong> simultaneous sacrificing with various mutation probabilities.<br />

68


Hours Bacteroide Bifidobacterium Pathogen Cooperative Pathogen Influencing Inflammation<br />

Population Population Population Population Sacrifices<br />

0 4889 2446 120 36 0 0<br />

1 5152 2803 117 34 0 1.986<br />

2 2675 3060 225 62 0 1.986<br />

3 1796 5802 674 208 0 1.986<br />

4 542 6852 1192 382 0 1.986<br />

5 62 11360 1175 375 0 1.986<br />

6 0 9174 998 316 0 1.986<br />

7 0 10876 982 310 5 2.084<br />

8 0 0 1558 122 96 9.227<br />

9 0 0 5001 302 280 175.234<br />

10 0 0 6655 237 230 78.234<br />

11 0 0 6300 0 0 1.986<br />

12 0 0 2852 0 0 1.986<br />

Table 7-8: Hourly data outputs with simultaneous sacrificing and a mutation probability <strong>of</strong> 10, over 12<br />

hours after infection.<br />

Table 7-7 shows <strong>the</strong> results <strong>of</strong> applying two-way mutation to simultaneous sacrificing over a period<br />

<strong>of</strong> 4 days. From <strong>the</strong> results, it appears that with mutation operating on co-operators and defectors,<br />

a ra<strong>the</strong>r high rate <strong>of</strong> mutation is required (somewhere between 1 in 20 and 1 in 10). Tough <strong>the</strong><br />

definition <strong>of</strong> “rare” is not specified by Ackermann et al., probabilities in this range seem slightly too<br />

frequent.<br />

The mutation dynamic has produced a sequence <strong>of</strong> pathogen population levels which match <strong>the</strong><br />

experimental data obtained by Stecher et al., with day 1-2 showing a decrease, day 2->3 showing a<br />

near-equal level and day 3->4 showing an increase, illustrated by <strong>the</strong> results <strong>of</strong> experiment C, using a<br />

mutation rate <strong>of</strong> 1 in 10. However, <strong>the</strong>se could be chance values as <strong>the</strong> results do not observe <strong>the</strong><br />

dynamics continuously, just taking <strong>the</strong> population levels at 24 hour intervals. Additionally,<br />

experiment C shows a final inflammation <strong>of</strong> 29.67, which is way <strong>of</strong>f <strong>the</strong> scale suggested by Ackerman<br />

et al. and suggests that a cap is needed to restrict inflammation to a maximum level <strong>of</strong> 13.<br />

Ano<strong>the</strong>r factor <strong>the</strong>se experiments show is <strong>the</strong> complete destruction <strong>of</strong> all native bacteria after <strong>the</strong><br />

first 24 hour period. The destruction <strong>of</strong> <strong>the</strong> bacteroide population can be attributed to <strong>the</strong> base<br />

inflammation and fever temperature, as was observed in experiment 4-2. The desctruction <strong>of</strong> <strong>the</strong><br />

bifidobacterium is made apparent by <strong>the</strong> data in table 7-8, which shows <strong>the</strong> same information given<br />

in table 7-7, but over a single 12 hour period at 1 hour intervals. From this data we can see that as<br />

soon as <strong>the</strong> inflammation level reached a high level, <strong>the</strong> bifidobacterium were quickly eliminated.<br />

Additionally, <strong>the</strong> results in table 7-8 again highlight <strong>the</strong> need for an inflammation limit.<br />

One possible cause <strong>of</strong> this destruction <strong>of</strong> natives is that <strong>the</strong> effects <strong>of</strong> temperature and inflammation<br />

are too great, giving pathogens to much <strong>of</strong> an advantage. This flaw would be caused by my<br />

assumptions based on <strong>the</strong> biological data, specifically, that <strong>the</strong> maximum temperature tolerance<br />

means that <strong>the</strong> bacteria cannot survive at all (as opposed to just being disadvantaged). A second<br />

possibility is that <strong>the</strong> time scale is not accurate in terms <strong>of</strong> <strong>the</strong> rate <strong>of</strong> temperature and inflammation<br />

increasing.<br />

This complete destruction <strong>of</strong> natives is inaccurate, a claim based on <strong>the</strong> experimental data produced<br />

by Stecher et al. (Figure 2-A) [5], which shows that approximately 6% <strong>of</strong> <strong>the</strong> bacteria population after<br />

5 days was made up <strong>of</strong> native agents. A possible solution would be to act on <strong>the</strong> first cause<br />

69


suggested above and reduce <strong>the</strong> effects <strong>of</strong> each individual factor affecting nutrient uptake rate <strong>of</strong><br />

bacteria. A second approach could be to add more native bacteria during flush cycles, simulating <strong>the</strong><br />

flow <strong>of</strong> bacteria with <strong>the</strong> lumen medium as it enters <strong>the</strong> model environment, though based on what<br />

I have observed during previous experiments, I am fairly sure <strong>the</strong> added bacteria would die <strong>of</strong>f<br />

quickly due to <strong>the</strong> large number <strong>of</strong> competitors <strong>the</strong>re is likely to be at <strong>the</strong> time <strong>the</strong>y are introduced.<br />

Hours Bacteroide Bifidobacterium Pathogen Cooperative Pathogen Influencing Inflammation<br />

Population Population Population Population Sacrifices<br />

0 5776 2670 136 41 0 0<br />

1 4462 2171 115 33 0 1.986<br />

2 3039 3988 443 134 0 1.986<br />

3 1147 5192 590 186 0 1.986<br />

4 427 6533 1265 398 0 1.986<br />

5 17 11011 1235 389 0 1.986<br />

6 0 8578 1064 190 163 13<br />

7 0 8386 4270 281 248 13<br />

8 0 6536 6279 261 190 13<br />

9 0 1069 6311 17 17 2.607<br />

10 0 834 4933 0 0 1.986<br />

11 0 819 4820 0 0 1.986<br />

12 0 639 3648 0 0 1.986<br />

Table 7-9: Hourly data outputs with simultaneous sacrificing, a mutation probability <strong>of</strong> 10 and<br />

inflammation cap <strong>of</strong> 13. Period covers 12 hours after infection.<br />

Table 7-9 shows <strong>the</strong> results <strong>of</strong> <strong>the</strong> same experiment performed to obtain <strong>the</strong> results in table 7-8, but<br />

with <strong>the</strong> inflammation cap <strong>of</strong> 13 in place. The cap has vastly improved <strong>the</strong> results in terms <strong>of</strong> native<br />

survival and also shows that inflammation still provides a large benefit for pathogens, with a large<br />

decrease in bifidobacterium population, followed by an increase in pathogen population.<br />

70


8. Discussion and Future Work<br />

I believe that this project has been quite successful as <strong>the</strong> model created is flexible and <strong>the</strong><br />

parameters now affect <strong>the</strong> behaviour <strong>of</strong> <strong>the</strong> system as was intended (after refining certain aspects).<br />

This flexibility in parameters allows users to observe <strong>the</strong> affects <strong>of</strong> altering certain values, though<br />

<strong>the</strong>se mainly affect bacterial growth, with only a few parameters allowing alterations to <strong>the</strong><br />

sacrificing dynamics. However, I have made as many <strong>of</strong> <strong>the</strong> sacrificing parameter as possible<br />

available for user definition.<br />

Additionally, <strong>the</strong> model provides a good starting point in terms <strong>of</strong> creating a realistic simulation <strong>of</strong> a<br />

<strong>Salmonella</strong> <strong>Typhimurium</strong> infection. The initial experiments showed that <strong>the</strong> environment dynamics<br />

provide a functional representation <strong>of</strong> <strong>the</strong> colon and allow <strong>the</strong> bacteria to grow, however <strong>the</strong>re is<br />

still scope for making <strong>the</strong>se dynamics more realistic. This is highlighted by my having to remove <strong>the</strong><br />

constant flow dynamics in <strong>the</strong> nutrients, which I believe is something that <strong>the</strong> real colon would<br />

show. In order to achieve fur<strong>the</strong>r realism, more in-vitro biology experiments are needed to analyse<br />

<strong>the</strong> behaviour <strong>of</strong> nutrients and pH in <strong>the</strong> colon in reality and this is, unfortunately, a very difficult<br />

thing to do.<br />

In terms <strong>of</strong> bacterial growth patterns, <strong>the</strong> model again provides a reasonable representation.<br />

Experiment phase 2 shows that <strong>the</strong> patterns closely represent <strong>the</strong> growth patterns <strong>of</strong> bacteria, as<br />

observed in various in-vitro experiments, under normal conditions. The main concerns I still have in<br />

this area are <strong>the</strong> effects <strong>of</strong> temperature, inflammation and pH on <strong>the</strong> bacteria and <strong>the</strong> maintenance<br />

rates. With regards to temperature and pH, it is possible that <strong>the</strong> influences <strong>the</strong>se factors have on<br />

<strong>the</strong> bacteria in <strong>the</strong> model are still too high, cause by <strong>the</strong> tolerance levels being too restrictive.<br />

However, based on <strong>the</strong> biological data I found, <strong>the</strong>y are as best I could conceive.<br />

The investigation <strong>of</strong> sacrificing methods has not been very revealing in terms <strong>of</strong> determining how it<br />

could work in reality, although that could be attributed to many factors including <strong>the</strong> assumptions I<br />

have made and <strong>the</strong> lack <strong>of</strong> biological knowledge with regards to <strong>the</strong> colon environment and bacteria<br />

properties. Despite <strong>the</strong>se issues, <strong>the</strong> model did reveal some interesting behaviours. Without any<br />

mutation, <strong>the</strong> pathogen population requires a low probability to sacrifice (be that by strict<br />

probability values, or location based methods) in order to allow <strong>the</strong> persistence <strong>of</strong> <strong>the</strong> sacrificing<br />

phenotype within <strong>the</strong> population. However, with <strong>the</strong> addition <strong>of</strong> mutation, <strong>the</strong> simultaneous<br />

sacrificing and hierarchy based sacrificing also become viable methods.<br />

I believe <strong>the</strong> next steps would be to, first, continue trying to bring <strong>the</strong> model closer to reality in<br />

terms <strong>of</strong> <strong>the</strong> environment and bacteria properties, which would provide more accurate and<br />

<strong>the</strong>refore more useful results. However, as I have already mentioned, achieving some <strong>of</strong> this would<br />

require in-vitro biology experimentation in order to obtain specific data. Once <strong>the</strong> model has<br />

reached a point where it is as close to biological fact as possible, it would be interesting to<br />

implement actual immune system dynamics, such as providing a representation <strong>of</strong> <strong>the</strong> mediating<br />

factors <strong>of</strong> inflammation and o<strong>the</strong>r innate and active immune system features and <strong>the</strong> reactions <strong>of</strong><br />

existing agents to <strong>the</strong>se features. This would increase <strong>the</strong> autonomy <strong>of</strong> <strong>the</strong> model, again possibly<br />

providing more useful data in terms <strong>of</strong> what is governing <strong>the</strong> sacrificing behaviour <strong>of</strong> <strong>the</strong> cooperative<br />

pathogens in real life.<br />

71


It would also be beneficial to fur<strong>the</strong>r consult a biologist and see what data would be useful to obtain<br />

from such a model. As I created <strong>the</strong> model, I simply created outputs that I thought would be useful<br />

and I am fairly confident that <strong>the</strong> population graph and raw data outputs fit <strong>the</strong> bill. However, I may<br />

have overlooked some o<strong>the</strong>r data which a specialist might want to observe and I also may have<br />

included outputs which provide no insightful data and sever only to clutter <strong>the</strong> interface.<br />

Stepping back from <strong>the</strong> model itself and taking a look at <strong>the</strong> implementation method, I think that<br />

NetLogo provided suitable functionality for creating <strong>the</strong> model in terms <strong>of</strong> its ability to handle<br />

multiple agents and <strong>the</strong> environment behaviours. However, <strong>the</strong>re are some restrictions within<br />

NetLogo which suggest it probably wasn’t <strong>the</strong> best implementation method. For example, <strong>the</strong><br />

graphs produced, although providing a good overview <strong>of</strong> <strong>the</strong> plotted data, do not give any numerical<br />

values when <strong>the</strong>y are exported and even within <strong>the</strong> NetLogo environment, reading accurate values<br />

from <strong>the</strong> graphs is difficult. I know <strong>the</strong>re are Java packages which allow graphs to be easily plotted<br />

and added to an interface and it may have been a better method.<br />

Ano<strong>the</strong>r factor which indicates that Java may have been a better option is that <strong>the</strong> visualisation that<br />

NetLogo provides and one <strong>of</strong> <strong>the</strong> main deciding factors in using NetLogo, does not seem very useful<br />

form a biological point-<strong>of</strong>-view now I have seen what it produces. With so many agents, <strong>the</strong> area<br />

becomes very crowded and it is hard to track an individual and observe <strong>the</strong> behaviour. However, <strong>the</strong><br />

visualisation was very useful when testing <strong>the</strong> model, especially when I observed <strong>the</strong> “bunching up”<br />

<strong>of</strong> bacteria in experiment phase 1. I believe it is unlikely I would have noticed this behaviour had I<br />

relied on pure data outputs.<br />

As a final note, I personally found <strong>the</strong> experience very valuable. It introduced me to a subject area I<br />

very much enjoy and has given me an insight into <strong>the</strong> difficulty <strong>of</strong> modelling biological systems,<br />

which are very complex and have little known about <strong>the</strong>m. Additionally, my lack <strong>of</strong> consultation<br />

with biologists has highlighted <strong>the</strong> benefit <strong>of</strong> inter-disciplinary teams as having <strong>the</strong> knowledge <strong>of</strong><br />

someone who works in <strong>the</strong> field <strong>of</strong> microbiology would have meant I could avoid some <strong>of</strong> <strong>the</strong> more<br />

naïve assumptions and saved some time during <strong>the</strong> experimentation phase.<br />

72


9. References<br />

1. Martin Ackermann, B.S., Nikki E. Freed, Pascal Songhet, Wolf-Dietrich Hardt & Michael<br />

Doebeli, Self-destructive cooperation mediated by phenotypic noise. Nature, 2008. 454: p.<br />

987-990.<br />

2. Doebeli, M., <strong>Agent</strong> based model <strong>of</strong> self-destructive cooperation, M. Carrie, Editor. 2010.<br />

3. JA Jankowski, R.A.G., NA Wright, Maintenance <strong>of</strong> normal intestinal mucosa: function,<br />

structure, and adaptation. <strong>Gut</strong>, 1994. 35(1).<br />

4. Markus C Schlumberger, W.-D.H., <strong>Salmonella</strong> type III secretion effectors: pulling <strong>the</strong> host<br />

cell's strings. Current Opinion in Microbiology, 2006. 9: p. 46-54.<br />

5. Stecher B, R.R., Walker AW, Westendorf AM, Bar<strong>the</strong>l M, et al., <strong>Salmonella</strong> enterica Serovar<br />

<strong>Typhimurium</strong> Exploits Inflammation to Compete with <strong>the</strong> Intestinal Microbiota. PLoS Biology,<br />

2007. 5(10).<br />

6. unkown, The normal gut flora. 2005, University <strong>of</strong> Glasgow.<br />

7. Hana Strul, R.K., Moshe Leshno, Aharon Halak, Markus Jakubowicz, Moshe Santo, Mark<br />

Umansky, Haim Shirin, Ya'ara Degani, Miri Revivo, Zamir Halpern, and Nadir Arber,<br />

Prevalence Anatomic Location <strong>of</strong> Colorectal Adenoma and Cancer: Patients and Methods.<br />

The American Journal <strong>of</strong> Gastroenterology, 2006. 101(2): p. 255-262.<br />

8. Francisco Guarner, J.-R.M., <strong>Gut</strong> flora in health and disease. The Lancet, 2003. 360: p. 512-<br />

519.<br />

9. J A A Hoogkamp-Korstane, J.G.E.M.L., J H Marcelis, H den Daas-Slagt, N M de Vos,<br />

Composition and ecology <strong>of</strong> <strong>the</strong> human intestinal flora. Antonie van Leeuwenhoek, 1979. 45:<br />

p. 35-40.<br />

10. WasaMedicals. The composition <strong>of</strong> <strong>the</strong> intestinal micr<strong>of</strong>lora. 2006 22/02/2010]; Available<br />

from: www.wasamedicals.com.<br />

11. Salyers, A.A., Bacteriodes <strong>of</strong> <strong>the</strong> Human Lower Intestinal Tract. Annual Review <strong>of</strong><br />

Microbiology, 1984. 38: p. 293-313.<br />

12. Todar, K., The Normal Bacterial Flora <strong>of</strong> Humans, in Todar's Online Textbook <strong>of</strong> Bacteriology.<br />

2008.<br />

13. Sears, C.L., A dynamic partnership: Celebrating our gut flora. Anaerobe, 2005. 11(5): p. 247-<br />

251.<br />

14. J VAN HOUTE, R.J.G., Studies <strong>of</strong> <strong>the</strong> cultivable flora <strong>of</strong> normal human feces. Antonie van<br />

Leeuwenhoek, 1966. 32: p. 212-222.<br />

15. Hans-Willi Mittrucker, S.H.E.K., Immune response to infection with <strong>Salmonella</strong> typhimurium<br />

in mice. Journal <strong>of</strong> Leukocyte Biology, 2000. 67: p. 457-463.<br />

16. MC Schlumberger, A.M., K Ehrbar, B Winnen, I Duss, B Stecher, WD Hardt, Real-time imaging<br />

<strong>of</strong> type III secretion: <strong>Salmonella</strong> SipA injection into host cells. Proc Nati Acad Sci, 2005. 102: p.<br />

12548-12553.<br />

17. DM Monack, B.R., AE Hromockyj, S Falkow, Ssalmonella typhimurium invasion induces<br />

apoptosis in infected macrophages. Proc.Natl. Acad. Sci. USA, 1996. 93: p. 9833-9838.<br />

18. NA Buchmeier, F.H., Intracellular Survival <strong>of</strong> Wild-Type <strong>Salmonella</strong> typhimurium and<br />

Macrophage-Sensitive Mutants in Diverse Populations <strong>of</strong> Macrophages. <strong>Infection</strong> and<br />

Immunity, 1989. 57(1): p. 1-7.<br />

19. S. H<strong>of</strong>fmann, T.J., Effect <strong>of</strong> Temperature, Humidity and Exposure to Oxygen on <strong>the</strong> Survival <strong>of</strong><br />

Anaeorbic Bacteria. Journal <strong>of</strong> Medical Microbiology, 1980. 13(4): p. 609-612.<br />

20. H.J.K Goodman, E.S., D.R. Woods, Heat shock stress in Bacteroides fragilis. Archives <strong>of</strong><br />

Microbiology, 1985. 142: p. 362-364.<br />

21. Allyn W P, I.L.B., Oxidation-reduction potentials in relation to <strong>the</strong> growth <strong>of</strong> an aerobic form<br />

<strong>of</strong> bacteria. Journal <strong>of</strong> Bacteriology, 1931.<br />

22. unkown. Glossary: Commonly Used Terms Found in Medical Literature. Deep Brain<br />

Stimulation 2004-2007 24/02/2010]; Available from: http://www.dbsstn.org/glossary4.php.<br />

73


23. Joc Cing Tay, A.J. CAFISS: A Complex Adaptive Framework for Immune System Simulation. in<br />

ACM symposium on applied computing. 2005.<br />

24. Bugl, P., Immune System. 2001, University <strong>of</strong> Hartford.<br />

25. Parham, P., The Immune System. 3 ed. 2009: Garland Science.<br />

26. V Stvrtinova, J.J., I Hulin, Inflammation and Fever, in Pathophysiology principles <strong>of</strong> diseases.<br />

1995.<br />

27. Wong, L., Temperature <strong>of</strong> a Healthy Human (Body Temperature), in The Physics Factbook, G.<br />

Elert, Editor.<br />

28. M Dias, B.A., H Pinto, B Rekha, <strong>Salmonella</strong> enterica serotype dublic bacteraemia mimicking<br />

enteric fever. Indian J Med Microbiol, 2009. 27: p. 365-367.<br />

29. N. O. KJELDGAARD, O.M., M. SCHAECHTER, The Transition Between Different Physiological<br />

States During Balanced Growth <strong>of</strong> <strong>Salmonella</strong> typhimurium. Journal <strong>of</strong> General Microbiology,<br />

1958. 19: p. 607-616.<br />

30. M. SCHAECHTER, J.P.W., J. R. HOOD, A. L. KOCH, Growth, Cell and Nuclear Divisions in some<br />

Bacteria. Journal <strong>of</strong> General Microbiology, 1981. 29: p. 421-434.<br />

31. unkown, Salmonellosis (Public Health Concerns for <strong>the</strong> Farm Family and Staff), in Chronicle<br />

Online. 1998, Cornell University.<br />

32. unkown, Microbial Data Sheets: Non-typhoid <strong>Salmonella</strong>e. 2001, New Zealand Food Safety<br />

Authority.<br />

33. A. Eley, D.G., F. O'Grady, Comparative growth <strong>of</strong> bacteroides species in various anaerobic<br />

culture media. Journal <strong>of</strong> Medical Microbiology, 1985. 19: p. 195-201.<br />

34. JC Hagen, W.W., T Hashimoto, Effect <strong>of</strong> Temperature on Survival <strong>of</strong> Bacteroides fragilis<br />

subsp. fragilis and Escherichia coli in Pus. Journal <strong>of</strong> Clinical Biology, 1977. 6(6): p. 567-570.<br />

35. BL Ventling, V.M., Growth Characteristics <strong>of</strong> Bifidobacteria in Ultrafiltered Milk. Journal <strong>of</strong><br />

Dairy Science, 1993. 76(4): p. 962-971.<br />

36. B Biavati, M.V., S Torriani, V Bottazzi, Bifidobacteria: history, ecology, physiology and<br />

applications. Annals <strong>of</strong> Microbilogy, 2000. 50: p. 117-131.<br />

37. unkown, Microbial Data Sheets: Escherichia Coli 0157:H7. 2001, New Zealand Food Safety<br />

Authority.<br />

38. V K Juneja, R.C.W., H M Marks, O P Snyder, Predictivemodel for growth <strong>of</strong> Clostridium<br />

perfringens at temperatures applicable to cooling <strong>of</strong> cookedmeat. Food Microbiology, 1999.<br />

16: p. 335-349.<br />

39. unkown, Microbial Data Sheets: Clostridium Perfringens. 2001, New Zealand Food Safety<br />

Authority.<br />

40. S Forrest, C.B., Computer Immunology. Communications <strong>of</strong> <strong>the</strong> ACM, 2006. 40(10): p. 88-96.<br />

41. M Meier-Schellersheim, G.M., SIMMUNE, a tool for simulating and analyzing Immune<br />

System behaviour. Arxiv preprint cs/9903017, 2008.<br />

42. N Fachada, V.L., A Rosa, <strong>Agent</strong> based modelling and simulation <strong>of</strong> <strong>the</strong> immune system: a<br />

review, in 13th Portuguese Conference on Artificial Intelligence. 2007: Guimarães Portugal.<br />

43. J-U Kreft, G.b., JWT Wimpenny, BacSim, a simulator for individual-based modelling <strong>of</strong><br />

bacterial colony growth. Microbiology, 1998. 144: p. 3275-3287.<br />

44. Donachie, W., Relationship between cell size and time <strong>of</strong> initiation <strong>of</strong> DNA replication.<br />

Nature, 1968. 219: p. 1077-1079.<br />

45. Amy L. Bauer, C.A.A.B., Alan S. Perelson, <strong>Agent</strong>-based modelling <strong>of</strong> host-pathogen systems:<br />

The successes and challenges. Information Sciences, 2008. 179(10): p. 1379-1389.<br />

46. M Bernaschi, F.C., Design and implementation <strong>of</strong> an immune system simulator. Computers in<br />

Biology and Medicine, 2001. 31: p. 303-331.<br />

47. N yee-key Li, S.W., K Ravin, Y Vodovotz, <strong>Agent</strong>-based simulation <strong>of</strong> urinary tract infection<br />

leading to renal scarring. Journal <strong>of</strong> Critical Care, 2007. 22(4): p. 336.<br />

48. Y Pechersky, K.R., V Nesdore, Q Mi, Y Vodovotz, <strong>Agent</strong>-based simulation <strong>of</strong> bacterial sepsis: a<br />

teaching tool for science students. Journal <strong>of</strong> Critical Care, 2007. 22(4): p. 336-337.<br />

74


49. Ophardt, C.E., Acids and Bases - pH, in Virtual Chembook. 2003, Elmhurst College.<br />

50. Daum, L., Growth and Mineralization Characteristics <strong>of</strong> Toluene and Diesel-Degrading<br />

Bacteria From Williams Refinery Groundwater ASHSSS Advisor Resources, 2004.<br />

75


A. User Guide<br />

Contents<br />

1. Introduction ....................................................................................................................... 77<br />

2. Installing and Running <strong>the</strong> <strong>Model</strong> ........................................................................................ 77<br />

2.1 System Requirements ................................................................................................................. 77<br />

2.2 Installing <strong>the</strong> <strong>Model</strong> .................................................................................................................... 77<br />

2.3 Running <strong>the</strong> <strong>Model</strong> ..................................................................................................................... 78<br />

3. Using <strong>the</strong> <strong>Model</strong> ................................................................................................................. 79<br />

3.1 Setting environment parameters ................................................................................................ 80<br />

3.1.1 Initial environment settings ................................................................................................. 80<br />

3.1.2 Runtime environment behaviour ......................................................................................... 80<br />

3.1.3 Flushing ................................................................................................................................ 81<br />

3.2 Controlling runtime duration ...................................................................................................... 81<br />

3.3 Visualisation and run speed ........................................................................................................ 82<br />

3.4 Setting agent parameters ........................................................................................................... 83<br />

3.4.1 <strong>Agent</strong> behaviour ................................................................................................................... 83<br />

3.4.2 <strong>Agent</strong> properties .................................................................................................................. 83<br />

3.5 Adding agents ............................................................................................................................. 84<br />

3.6 Setting sacrificing parameters .................................................................................................... 84<br />

3.7 Reading and interpreting outputs ............................................................................................... 85<br />

3.7.1 Data output area .................................................................................................................. 85<br />

3.7.2 Interpreting <strong>the</strong> visualisation ............................................................................................... 85<br />

76


1. Introduction<br />

The model which this guide accompanies aims to simulate <strong>the</strong> dynamics <strong>of</strong> a <strong>Salmonella</strong><br />

<strong>Typhimurium</strong> infection <strong>of</strong> <strong>the</strong> human colon. It allows users to modify parameters and view what<br />

effect <strong>the</strong>y have on <strong>the</strong> population dynamics <strong>of</strong> <strong>the</strong> infection over a period <strong>of</strong> time. The key point <strong>of</strong><br />

interest in <strong>the</strong> model is <strong>the</strong> ability <strong>of</strong> <strong>Salmonella</strong> to exploit inflammation in order to gain an<br />

advantage over <strong>the</strong> native bacteria populations when colonising <strong>the</strong> environment.<br />

This guide aims to provide information to users <strong>of</strong> <strong>the</strong> model, allowing <strong>the</strong>m to use <strong>the</strong> model in its<br />

current state and conduct experiments <strong>of</strong> <strong>the</strong>ir own. For information on modifying <strong>the</strong> behaviour <strong>of</strong><br />

<strong>the</strong> model, please consult <strong>the</strong> maintenance manual.<br />

2. Installing and Running <strong>the</strong> <strong>Model</strong><br />

2.1 System Requirements<br />

The only requirement for running <strong>the</strong> system is to download and install <strong>the</strong> NetLogo multi-agent<br />

modelling system. The program is freely available from “http://ccl.northwestern.edu/netlogo/”.<br />

Requirements for running NetLogo can be found on this website. The model was created using<br />

NetLogo version 4.1. If you have a different version <strong>of</strong> <strong>the</strong> program, some features may not work<br />

correctly, however, <strong>the</strong> model can still be loaded. NetLogo will present you with a message,<br />

informing you that different version <strong>of</strong> <strong>the</strong> program was used to create <strong>the</strong> model. First, try<br />

bypassing <strong>the</strong> message by clicking “Continue”. If you experience problems later, you can attempt<br />

translation <strong>of</strong> <strong>the</strong> model by following <strong>the</strong> “Transition Guide”, however, performing such<br />

amendments will require programming knowledge. For information on <strong>the</strong> program structure and<br />

code, please refer to <strong>the</strong> maintenance manual.<br />

As NetLogo is a Java program itself, it should be possible to install and run <strong>the</strong> model on UNIX or MS<br />

Windows based systems, however, issues may arise from running on a UNIX based system as <strong>the</strong><br />

model was created and tested using MS Windows.<br />

Although NetLogo is <strong>the</strong> only actual requirement for <strong>the</strong> model, due to <strong>the</strong> large number <strong>of</strong> agents<br />

which can be active at any one time in <strong>the</strong> model, it is recommended that you use a high-end<br />

computer to run <strong>the</strong> simulations. To provide an example <strong>of</strong> run-times, <strong>the</strong> machine used to test <strong>the</strong><br />

model had a 2.6GHz processor and 4GB <strong>of</strong> memory. A 59000 cycle simulation (5 days <strong>of</strong> simulated<br />

time) on this machine, with no visualisation options enabled (increasing performance) took 2.5-3<br />

hours to complete.<br />

2.2 Installing <strong>the</strong> <strong>Model</strong><br />

The model is distributed as a gzip compressed tarball file. Within this archive is a single .nlogo file,<br />

which is a NetLogo model, which can be loaded and run using NetLogo. The process <strong>of</strong> extracting<br />

<strong>the</strong> model varies between different operating systems.<br />

UNIX-based operating system<br />

To extract <strong>the</strong> archive on a UNIX-based operating system, you can ei<strong>the</strong>r use <strong>the</strong> GUI interface <strong>of</strong> <strong>the</strong><br />

operating system (if one exists) and simply double click <strong>the</strong> “carrie_martin.tar.gz” archive and<br />

extract <strong>the</strong> tarball from <strong>the</strong> gzip archive and <strong>the</strong>n extract <strong>the</strong> .nlogo file from <strong>the</strong> tarball.<br />

77


If you cannot extract <strong>the</strong> file in this way, you will need to open a terminal window and navigate to<br />

<strong>the</strong> directory where <strong>the</strong> archive is stored. Then enter <strong>the</strong> following two lines to extract <strong>the</strong> .nlogo<br />

file from its compressed state:<br />

$ gunzip carrie_martin.tar.gz<br />

$ tar xf carrie_martin.tar<br />

MS Windows operating system<br />

In order to install on a MS Windows system, you will first need to download and install an archiving<br />

program capable <strong>of</strong> extracting <strong>the</strong> archive. For this, I would recommend 7Zip (available from:<br />

www.7-zip.org). Once you have an archiving program installed, follow <strong>the</strong> instructions for that<br />

application. If you are using 7Zip’s graphical interface, this involves simply double clicking<br />

“carrie_martin.tar.gz” and extracting <strong>the</strong> tarball from <strong>the</strong> gzip archive to a directory and <strong>the</strong>n<br />

extracting <strong>the</strong> .nlogo file from <strong>the</strong> tarball archive.<br />

2.3 Running <strong>the</strong> <strong>Model</strong><br />

Once you have installed NetLogo and extracted <strong>the</strong> model, running <strong>the</strong> model is a case <strong>of</strong> double<br />

clicking <strong>the</strong> “<strong>Salmonella</strong>Simulation.nlogo” file. If <strong>the</strong> .nlogo file extension is not associated with<br />

NetLogo by your operating system, you may need to set up <strong>the</strong> association <strong>the</strong> same way you would<br />

for any o<strong>the</strong>r file (normally by browsing for <strong>the</strong> NetLogo.exe, which is found in <strong>the</strong> NetLogo<br />

installation directory).<br />

If <strong>the</strong> association is not set up and you don’t know how to set <strong>the</strong> association, you can load <strong>the</strong><br />

model in <strong>the</strong> following way. First, run <strong>the</strong> NetLogo program by clicking a shortcut to or on <strong>the</strong> actual<br />

NetLogo.exe. Once NetLogo has loaded, select “File” <strong>the</strong>n “Open”, navigate to <strong>the</strong><br />

“<strong>Salmonella</strong>Simulation.nlogo” file, highlight it and <strong>the</strong>n select “Open”.<br />

Once <strong>the</strong> model is loaded, you should be presented with a screen similar to that shown in figure A-1.<br />

You may see more or less <strong>of</strong> <strong>the</strong> model controls depending on <strong>the</strong> resolution <strong>of</strong> your display.<br />

Figure A-1: Main NetLogo interface with “<strong>Salmonella</strong>Simulation.nlogo” model<br />

loaded.<br />

78


3. Using <strong>the</strong> <strong>Model</strong><br />

The following section intends to guide you around <strong>the</strong> model’s interface, explaining <strong>the</strong> controls and<br />

parameters. Figure A-2 shows <strong>the</strong> complete model interface, with <strong>the</strong> controls in highlighted<br />

sections, separated by what aspects <strong>of</strong> <strong>the</strong> model <strong>the</strong>y relate to.<br />

The section highlighted in red shows <strong>the</strong> main model controls, used to setup and run <strong>the</strong> model, add<br />

agents and control <strong>the</strong> speed. The green section highlights <strong>the</strong> visualisation controls. The purple<br />

section highlights environment parameters and flushing controls. The yellow section contains <strong>the</strong><br />

bacteria parameters and <strong>the</strong> blue section highlights <strong>the</strong> data output area.<br />

Figure A-2: <strong>Model</strong> interface with common controls separated into highlighted sections.<br />

79


When <strong>the</strong> model first loads, <strong>the</strong> first step you will need to take to run <strong>the</strong> model is to press <strong>the</strong><br />

“Setup” button, found to <strong>the</strong> far left <strong>of</strong> <strong>the</strong> main controls area (red). This will initialise <strong>the</strong> global<br />

model parameters and draw <strong>the</strong> environment visualisation in <strong>the</strong> visualisation window (<strong>the</strong> box in<br />

<strong>the</strong> green area) and initialise <strong>the</strong> environment grid locations.<br />

3.1 Setting environment parameters<br />

3.1.1 Initial environment settings<br />

The model parameters which control <strong>the</strong> default environment values are all found under <strong>the</strong><br />

“Environment Parameters” heading in <strong>the</strong> section <strong>of</strong> <strong>the</strong> interface highlighted by <strong>the</strong> purple box in<br />

figure A-2. The “Env-Base-Temperature” input box allows you to change <strong>the</strong> temperature <strong>of</strong> <strong>the</strong><br />

environment under normal conditions. By default, this is set to 36, which is approximately <strong>the</strong><br />

normal colon temperature. Beside <strong>the</strong> base temperature input box is <strong>the</strong> “Env-Fever-Temperature”<br />

input box. This allows you to determine what temperature <strong>the</strong> environment rises to when<br />

pathogens are present. The environment will remain at this fever temperature until all pathogens<br />

are eliminated.<br />

The o<strong>the</strong>r controls which relate to default environment parameters are “Initial-Env-Nutrient-<br />

Concentration-Min” and “Initial-Env-Nutrient-Concentration-Max”. These two sliders range from 0<br />

to 100 and control <strong>the</strong> range <strong>of</strong> initial nutrient concentrations <strong>of</strong> grid locations in <strong>the</strong> environment,<br />

with each grid location being assigned a nutrient concentration between <strong>the</strong> two values specified<br />

here. These sliders also determine <strong>the</strong> nutrient concentration range used to assign new nutrient<br />

concentrations to grid locations on during a flush. Please note that <strong>the</strong>se sliders should not be set to<br />

equal values and <strong>the</strong> “Initial-Env-Nutrient-Concentration-Max” slider must have a higher value than<br />

<strong>the</strong> “Initial-Env-Nutrient-Concentration-Min” slider. If ei<strong>the</strong>r <strong>of</strong> <strong>the</strong>se conditions is not met, <strong>the</strong><br />

model will freeze.<br />

The initial pH level <strong>of</strong> <strong>the</strong> environment cannot be set using model parameters. They will always<br />

initialise to levels between 6 and 8 in <strong>the</strong> lumen (green area in <strong>the</strong> visualisation window) and 7 and 9<br />

in <strong>the</strong> membrane (pink area in <strong>the</strong> visualisation window). If you wish to alter <strong>the</strong>se values, please<br />

consult <strong>the</strong> maintenance manual.<br />

3.1.2 Runtime environment behaviour<br />

As <strong>the</strong> model runs, <strong>the</strong> environment will replenish nutrients, recover from inflammation and<br />

undergo flushing. The rate at which nutrients are replenished can be set using <strong>the</strong> “Replenish-<br />

Nutrients-Every-N-Ticks” input box under “Environment Parameters”, found in <strong>the</strong> section <strong>of</strong> <strong>the</strong><br />

interface highlighted by <strong>the</strong> purple box. The value in this box will tell <strong>the</strong> model to perform<br />

replenishment every time <strong>the</strong> number <strong>of</strong> cycles specified transpires. For example, if <strong>the</strong> value is set<br />

to 100, <strong>the</strong> model will replenish nutrients on cycle 100, 200, 300 etc.<br />

When replenishing nutrients, <strong>the</strong> model will add a percentage <strong>of</strong> <strong>the</strong> current nutrient concentration<br />

<strong>of</strong> a grid location, to that grid location. The percentage added is determined by <strong>the</strong> value <strong>of</strong> <strong>the</strong><br />

slider “Replenish-Nutrient-Percentage-Factor”, which is found just below <strong>the</strong> “Replenish-Nutrients-<br />

Every-N-Ticks” input box. To fur<strong>the</strong>r illustrate this behaviour, if <strong>the</strong> value <strong>of</strong> <strong>the</strong> slide is set to ‘10’,<br />

<strong>the</strong>n each grid location in <strong>the</strong> environment will be set to its current nutrient concentration plus 10%<br />

<strong>of</strong> that concentration when <strong>the</strong> number <strong>of</strong> cycles specified in “Replenish-Nutrients-Every-N-Ticks”<br />

80


have elapsed, for example, a grid location with a nutrient concentration <strong>of</strong> 50 will be increased to<br />

55.<br />

Ano<strong>the</strong>r environment factor during runtime is inflammation. Inflammation is increased by<br />

pathogens sacrificing and inducing inflammation. The two input boxes under <strong>the</strong> “Environment<br />

Parameters” heading labelled “Min-Cycles-Before-Inflammation-Recovery” and “Max-Cycles-Before-<br />

Inflammation-Recovery” allow you to set <strong>the</strong> range <strong>of</strong> time before <strong>the</strong> environment recovers from<br />

<strong>the</strong> inflammation caused by a particular sacrifice action. To fur<strong>the</strong>r explain <strong>the</strong>se parameters, each<br />

pathogen has a property which determines how long after sacrificing that sacrifice action is<br />

considered by <strong>the</strong> model to contribute to inflammation. When <strong>the</strong> pathogen sacrifices, this property<br />

is set to a value equal to <strong>the</strong> number <strong>of</strong> cycles that have already transpired plus a random value<br />

between “Min-Cycles-Before-Inflammation-Recovery” and “Max-Cycles-Before-Inflammation-<br />

Recovery”. Once <strong>the</strong> model reaches <strong>the</strong> cycle which is equal to <strong>the</strong> property <strong>of</strong> a pathogen, that<br />

pathogen is removed from <strong>the</strong> model and no longer contributes to inflammation.<br />

3.1.3 Flushing<br />

The final environment factor which affects <strong>the</strong> model during runtime is a flushing event. Flushing is<br />

designed to represent <strong>the</strong> passage <strong>of</strong> material through <strong>the</strong> digestive tract and can be toggled on or<br />

<strong>of</strong>f using <strong>the</strong> “Enable-Flushing” switch under <strong>the</strong> “Flushing Parameters” heading, which can be found<br />

in <strong>the</strong> section highlighted in purple. If flushing is enabled, a flush will occur at regular cycle intervals,<br />

which range between <strong>the</strong> values specified in <strong>the</strong> “Min-Cycles-Before-Flush” and “Max-Cycles-Before-<br />

Flush” input boxes. The behaviour <strong>of</strong> this parameter is similar to that <strong>of</strong> inflammation recovery,<br />

except it relates to flushing not inflammation.<br />

There are two main events when a flush occurs. First, <strong>the</strong> nutrient concentration and pH level <strong>of</strong><br />

grid locations in <strong>the</strong> environment are reset to similar values as are attained when <strong>the</strong> “Setup” button<br />

is pressed. The same input parameters that are used in setup are again used for flushing, so “Initial-<br />

Env-Nutrient-Concentration-Min” and “Initial-Env-Nutrient-Concentration-Max “. Again, pH levels<br />

cannot be set. Once new levels are assigned to grid locations, several diffusion cycles are run to<br />

allow <strong>the</strong> levels to distribute. The number <strong>of</strong> diffusion cycles executed on a flush event can be set<br />

using <strong>the</strong> “Diffusions-On-Flush” input box.<br />

The second event that occurs during a flush is that a percentage <strong>of</strong> <strong>the</strong> bacteria population are<br />

removed from <strong>the</strong> model. This is to simulate those bacteria agents being “washed” away with <strong>the</strong><br />

lumen material. To change <strong>the</strong> percentage <strong>of</strong> bacteria removed during a flush event, simply move<br />

<strong>the</strong> “Percentage-Bacteria-Removed-On-Flush” to <strong>the</strong> desired level. This slider can be found under<br />

“Flushing Parameters” in <strong>the</strong> purple highlighted section as seen in figure A-2.<br />

3.2 Controlling runtime duration<br />

Before adding any agents to <strong>the</strong> model, it is recommended that you let <strong>the</strong> model run for a short<br />

period in order to let <strong>the</strong> nutrient concentrations and pH levels <strong>of</strong> <strong>the</strong> environment settle. If flushing<br />

is enabled, a single cycle should suffice as a flush will be preformed, which will reset and diffuse <strong>the</strong><br />

nutrient and pH <strong>of</strong> <strong>the</strong> model. To run a single cycle, press <strong>the</strong> “Go Once” button, found in <strong>the</strong> main<br />

controls area (red). If flushing is not enabled, it is necessary to run several cycles. To run <strong>the</strong> model<br />

for a limited number <strong>of</strong> cycles, simply enter <strong>the</strong> number <strong>of</strong> cycles into <strong>the</strong> “Halt-On-Cycle” input box<br />

and press “Go”, both <strong>of</strong> <strong>the</strong>se controls can be found in <strong>the</strong> main controls area. While <strong>the</strong> model is<br />

81


unning, <strong>the</strong> “Go” button will remain depressed, <strong>the</strong> model can be stopped at any time by pressing<br />

<strong>the</strong> “Go” button again. Figure A-3 shows what <strong>the</strong> button looks like when <strong>the</strong> model is running and<br />

stopped.<br />

STOPPED RUNNING<br />

Figure A-3: Go button states.<br />

The “Halt-On-Cycle” input box is very useful if you wish to run <strong>the</strong> model for a set period <strong>of</strong> time.<br />

Each cycle <strong>of</strong> <strong>the</strong> model relates to around 6 seconds <strong>of</strong> real time, <strong>the</strong>refore 10 cycles is equal to 1<br />

minute and 600 cycles is equal to 1 hour. So, if you want to run <strong>the</strong> model for 12 hours, you can<br />

enter 7200 into this input area and <strong>the</strong> model will stop on that cycle. Remember, if you want to run<br />

<strong>the</strong> model for 12 hours post-infection, you will have to add <strong>the</strong> number <strong>of</strong> cycles <strong>the</strong> model has<br />

already run for allowing <strong>the</strong> environment and native bacteria to settle (if you have chosen to do<br />

this). If you want <strong>the</strong> model to run indefinitely, simply enter a ‘0’ into <strong>the</strong> “Halt-On-Cycle” input box.<br />

50-100 cycles should be sufficient to allow nutrient concentration and pH levels to settle, however it<br />

is best to check <strong>the</strong> distribution <strong>of</strong> nutrients and pH using <strong>the</strong> visualisation options.<br />

3.3 Visualisation and run speed<br />

In order to change <strong>the</strong> visualisation options between nutrient concentration and pH level, use <strong>the</strong><br />

“Env-Visualisation-Mode” drop down list and select ei<strong>the</strong>r one. Changing this option will switch <strong>the</strong><br />

model visualisation between nutrient concentration and pH level, which are indicated on <strong>the</strong><br />

visualisation using a scaled green colour. The higher <strong>the</strong> level <strong>of</strong> pH or nutrients on a grid location in<br />

<strong>the</strong> environment, <strong>the</strong> brighter <strong>the</strong> grid location will become. pH level ranges between completely<br />

black at a pH <strong>of</strong> 5 and white at a pH <strong>of</strong> 10, while nutrient concentration ranges between black at 0<br />

and white at 100.<br />

If, while running <strong>the</strong> model, you find that <strong>the</strong> pace is too slow <strong>the</strong>re are a number <strong>of</strong> options<br />

available. First, <strong>the</strong>re is <strong>the</strong> speed slider, built into NetLogo. This slider is positioned at <strong>the</strong> topmiddle<br />

portion <strong>of</strong> <strong>the</strong> main controls (red) area <strong>of</strong> <strong>the</strong> interface, on <strong>the</strong> NetLogo tool bar. Moving <strong>the</strong><br />

slide to <strong>the</strong> right will increase <strong>the</strong> speed and moving it left will decrease <strong>the</strong> speed.<br />

Should <strong>the</strong> fastest speed made available by this slider still be insufficient, <strong>the</strong> run speed can be<br />

fur<strong>the</strong>r increased by removing visualisation <strong>of</strong> certain agents, or stopping visualisation updates<br />

altoge<strong>the</strong>r. To remove specific bacteria types from <strong>the</strong> model, you can use <strong>the</strong> “showPathogens”,<br />

“showBacteroides” and “showBifidobacterium” toggle switches. These switches are found to <strong>the</strong><br />

right side <strong>of</strong> <strong>the</strong> main visualisation window in <strong>the</strong> visualisation (green) section <strong>of</strong> <strong>the</strong> interface. If <strong>the</strong><br />

model is paused, you will need to run at least one more cycle before <strong>the</strong> visualisation is updated<br />

with changes to <strong>the</strong>se switches. It should also be noted that removing certain agents can be useful if<br />

you wish to focus your observations on one specific type <strong>of</strong> bacteria.<br />

In order to disable visual updates altoge<strong>the</strong>r, you can uncheck <strong>the</strong> “view updates” check box, which<br />

is found to <strong>the</strong> right <strong>of</strong> <strong>the</strong> speed slider mentioned earlier (top-middle <strong>of</strong> <strong>the</strong> main controls (red)<br />

section <strong>of</strong> <strong>the</strong> interface).<br />

82


3.4 Setting agent parameters<br />

3.4.1 <strong>Agent</strong> behaviour<br />

There are various parameters which determine <strong>the</strong> behaviour <strong>of</strong> bacteria agents in <strong>the</strong> model.<br />

Under <strong>the</strong> “Shared Bacteria Parameters” heading, found in <strong>the</strong> section highlighted in yellow in figure<br />

A-2, <strong>the</strong>re are 3 main operations that can be controlled. First, <strong>the</strong> slider labelled “Leave-Percent-<br />

Nutrients-On-Death” allows you to set <strong>the</strong> percentage <strong>of</strong> a bacteria’s nutrient concentration it will<br />

leave behind when it dies.<br />

The next main model operation controlled in this section is apoptosis. In order to simulate<br />

programmed cell death, each bacteria agent has an X/100 chance <strong>of</strong> dying. The value <strong>of</strong> X is set<br />

using <strong>the</strong> “Apoptosis-Probability” slider. The check for deaths by apoptosis occurs every time <strong>the</strong><br />

number <strong>of</strong> cycles specified in <strong>the</strong> input box labelled “Run-Apoptosis-Every-N-ticks” elapses.<br />

The final slider under <strong>the</strong> “Shared Bacteria Parameters” heading allows you to control how much an<br />

individual bacteria agent can increase/decrease <strong>the</strong> pH level <strong>of</strong> a grid location by every cycle. The<br />

range <strong>of</strong> <strong>the</strong> slider is between 0 and 1 with an accuracy <strong>of</strong> 2 decimal places. To illustrate <strong>the</strong> effect<br />

<strong>of</strong> this slider, if it is set to ‘0.10’, <strong>the</strong>n every bacteria on a given grid location will increase or decrease<br />

<strong>the</strong> pH level <strong>of</strong> that location by ‘0.10’. Whe<strong>the</strong>r an agent increases or decreases <strong>the</strong> pH level is<br />

dependent on whe<strong>the</strong>r <strong>the</strong> pH level <strong>of</strong> <strong>the</strong> grid location is higher or lower than <strong>the</strong> optimal pH <strong>of</strong> <strong>the</strong><br />

agent.<br />

Next we will cover pathogen mutation. There are two controls which affect mutation “Mutations-<br />

Allowed” and “Mutation-Probability”, both found at <strong>the</strong> bottom <strong>of</strong> <strong>the</strong> “Pathogen Parameters”<br />

section in <strong>the</strong> yellow area. “Mutations-Allowed” allows you to select <strong>the</strong> type <strong>of</strong> mutation that can<br />

occur, <strong>the</strong> options are “Defector -> Cooperator”, which allows defector pathogens, that is pathogens<br />

which are not <strong>of</strong> <strong>the</strong> phenotype TTSS-1 + and <strong>the</strong>refore not sacrifice, to divide and produce pathogens<br />

which do express that phenotype. The second option is “Defector Cooperator”, which allows<br />

mutations both ways and <strong>the</strong> final option is “None”, which does not allow any mutation to occur.<br />

The slider, “Mutation-Probability” allows you to set <strong>the</strong> chance that mutation will occur. The slider<br />

ranges between 0 and 100, a random number will be generated between <strong>the</strong>se values if mutation is<br />

allowed and if <strong>the</strong> generated number is less than <strong>the</strong> value <strong>of</strong> <strong>the</strong> “Mutation-Probability” slider,<br />

mutation will occur.<br />

3.4.2 <strong>Agent</strong> properties<br />

When agents are added to <strong>the</strong> model, <strong>the</strong>y are initialised with a nutrient concentration. In order to<br />

provide some variance between different agents, <strong>the</strong> nutrient concentration level is set to a value<br />

between a range. The range is controlled by <strong>the</strong> sliders “Initial-Native-Nutrient-Concentration-Min”<br />

and “Initial-Native-Nutrient-Concentration-Max” sliders for native bacteria (found under <strong>the</strong> “Native<br />

Bacteria Parameters” heading) and “Initial-Pathogen-Nutrient-Concentration-Min” and “Initial-<br />

Pathogen-Nutrient-Concentration-Max” sliders for pathogens (found under “Pathogen Parameters”).<br />

<strong>Agent</strong>s also have an uptake rate and maintenance rate. The “XX-Base-Uptake” input boxes for <strong>the</strong><br />

various bacteria agents set <strong>the</strong> uptake rate <strong>of</strong> a bacteria agent <strong>of</strong> size ‘1’, which is considered to be<br />

<strong>the</strong> base size <strong>of</strong> a bacterial agent. To illustrate how this size relates to <strong>the</strong> bacteria behaviour, as <strong>the</strong><br />

83


acteria consume nutrients, <strong>the</strong>y grow in size, increasing to a maximum size <strong>of</strong> ‘2’, at which point<br />

<strong>the</strong>y begin preparing for division. As an agent grows in size, <strong>the</strong> nutrient uptake rate is increased,<br />

due to <strong>the</strong> increased surface area. When a bacteria agent divides, its current nutrient level is divided<br />

between it and <strong>the</strong> new agent it spawns, reducing <strong>the</strong> nutrient concentration back to below ‘2’, at<br />

which point it will start to grow again.<br />

The “XX-Maintenance” input boxes specify <strong>the</strong> rate at which <strong>the</strong> various bacteria agents consume<br />

nutrients in order to survive. The maintenance rate also increases, relative to <strong>the</strong> size <strong>of</strong> an agent.<br />

3.5 Adding agents<br />

Once <strong>the</strong> environment has settled <strong>the</strong> bacteria agents can be added to <strong>the</strong> simulation. It is<br />

recommended to add <strong>the</strong> native bacteria agents first and allow <strong>the</strong> population levels to settle before<br />

beginning <strong>the</strong> infection, unless you wish to observe what happens with specific population levels <strong>of</strong><br />

native bacteria and pathogens, though in this case it is best to adjust <strong>the</strong> environment parameters<br />

until <strong>the</strong> model can only maintain <strong>the</strong> number <strong>of</strong> natives you desire. To add <strong>the</strong> native bacteria<br />

agents, press <strong>the</strong> “Add Natives” button in <strong>the</strong> main controls area (red). To add pathogens to <strong>the</strong><br />

model, press <strong>the</strong> “Begin <strong>Infection</strong>” button, also found in <strong>the</strong> main controls area.<br />

The native bacteria population levels, for respective stains, can be set using <strong>the</strong> “Initial-Bacteroide-<br />

Pop” and “Initial-Bifidobacterium-Pop” input boxes, found under <strong>the</strong> “Native Parameters” heading in<br />

<strong>the</strong> bacteria parameters (yellow) section <strong>of</strong> <strong>the</strong> interface. The pathogen population level is set using<br />

<strong>the</strong> “Initial-Pathogen-Pop” input box, found under “Pathogen Parameters” in <strong>the</strong> same interface<br />

section. The default native bacteria population levels are scaled, but proportional levels <strong>of</strong> <strong>the</strong><br />

different bacteria as <strong>the</strong>y are found in reality. The pathogen population level however defaults to a<br />

proportional value based on specific experiments. The final control relating to bacteria populations<br />

is found under <strong>the</strong> “Pathogen Parameters” heading and is labelled “Percentage-Expressing-TTSS1”.<br />

This slider controls what percentage <strong>of</strong> <strong>the</strong> pathogen population will express <strong>the</strong> TTSS-1 phenotype<br />

and <strong>the</strong>refore be able to sacrifice and increase inflammation.<br />

3.6 Setting sacrificing parameters<br />

As <strong>the</strong> model runs, any pathogens which express <strong>the</strong> TTSS-1 + phenotype will have a chance to<br />

sacrifice <strong>the</strong>mselves. The chance is based on <strong>the</strong> sacrifice method selected and <strong>the</strong> values <strong>of</strong><br />

parameters which affect that selected method. Before sacrificing can commence however, <strong>the</strong><br />

pathogens will need to grow to <strong>the</strong> capacity <strong>of</strong> <strong>the</strong> model. To control this, <strong>the</strong> model uses <strong>the</strong><br />

“Duration-Of-Stationary-Phase” and “Population-Variation-During-Stationary-Phase” parameters,<br />

found at <strong>the</strong> bottom <strong>of</strong> <strong>the</strong> “Pathogen Parameters” section. The “Duration-Of-Stationary-Phase”<br />

determines how long <strong>the</strong> pathogen population must remain within <strong>the</strong> range defined by<br />

“Population-Variation-During-Stationary-Phase”. Once initial growth has been detected (that is <strong>the</strong><br />

pathogen population grows past <strong>the</strong> initial population value), <strong>the</strong> model will begin counting cycles<br />

for <strong>the</strong> purpose <strong>of</strong> detecting a stationary phase. Once a stationary phase has been detected,<br />

sacrificing begins. If you do not wish to use this delay, simply set <strong>the</strong> “Duration-Of-Stationary-Phase”<br />

to a low value e.g. “1”.<br />

There are four sacrifice mechanics built into <strong>the</strong> model including “Simultaneous”, “Hierarchy <strong>Based</strong>”,<br />

“Probability <strong>Based</strong>” and “Location <strong>Based</strong>”. The method can be selected using <strong>the</strong> “Sacrifice-Method”<br />

84


drop-down list, which is found under <strong>the</strong> “Pathogen Parameters” heading in <strong>the</strong> section highlighted<br />

by <strong>the</strong> yellow box in figure A-2.<br />

If “Simultaneous” sacrificing is selected, all <strong>of</strong> <strong>the</strong> TTSS-1 + pathogens will sacrifice immediately.<br />

“Hierarchy <strong>Based</strong>” sacrificing means that only a certain number <strong>of</strong> pathogens can begin sacrificing at<br />

any one time and no o<strong>the</strong>r pathogens can begin sacrificing until all pathogens in <strong>the</strong> previous level <strong>of</strong><br />

<strong>the</strong> hierarchy have finished invading <strong>the</strong> membrane. The maximum number <strong>of</strong> pathogens in each<br />

hierarchy level can be set using <strong>the</strong> “Maximum-Pathogens-In-Hierarchy-Level” input box. The model<br />

will allow a number <strong>of</strong> pathogens to begin sacrificing, equal to a random value between 1 and <strong>the</strong><br />

value specified.<br />

“Probability <strong>Based</strong>” sacrificing is completely stochastic. When pathogens are added to <strong>the</strong> model,<br />

each cooperative pathogen is given a sacrifice probability, which ranges between 0.001 and <strong>the</strong><br />

value set in <strong>the</strong> “Sacrifice-Probability” input box. Every cycle <strong>of</strong> <strong>the</strong> model, a random floating-point<br />

number is generated between 0 and 100 and if <strong>the</strong> pathogen’s sacrifice probability is greater than<br />

<strong>the</strong> generated number, it will begin sacrificing.<br />

The final sacrificing method, “Location <strong>Based</strong>”, operates by beginning a sacrifice only if a pathogen<br />

moves next to <strong>the</strong> membrane through normal behaviour.<br />

3.7 Reading and interpreting outputs<br />

3.7.1 Data output area<br />

The data output area <strong>of</strong> <strong>the</strong> model is highlighted by blue box in figure A-2, under <strong>the</strong> title “Monitors<br />

and Plots” on <strong>the</strong> interface. The 10 boxes at <strong>the</strong> top give various raw data outputs, which update<br />

every cycle <strong>of</strong> <strong>the</strong> simulation. These outputs can be divided into two sections.<br />

On <strong>the</strong> left you can see <strong>the</strong> average nutrient concentration and pH level <strong>of</strong> all <strong>the</strong> lumen patches in<br />

<strong>the</strong> environment, <strong>the</strong> number <strong>of</strong> sacrifices which are currently influencing inflammation in <strong>the</strong><br />

environment and <strong>the</strong> current inflammation level and temperature <strong>of</strong> <strong>the</strong> environment.<br />

The output boxes to <strong>the</strong> right show <strong>the</strong> population levels <strong>of</strong> <strong>the</strong> agents in <strong>the</strong> model and also show<br />

what proportion <strong>of</strong> <strong>the</strong> pathogen population are co-operators and defectors (express TTSS-1<br />

secretion systems or not).<br />

Below <strong>the</strong> input boxes are 5 line graphs showing <strong>the</strong> population levels <strong>of</strong> <strong>the</strong> different bacteria types<br />

over time, <strong>the</strong> population levels <strong>of</strong> <strong>the</strong> 4 types <strong>of</strong> Bacteroide agents, showing <strong>the</strong> proportion <strong>of</strong> <strong>the</strong><br />

total Bacteroide population over time. These first two plots are titled “Population Levels” and<br />

“Bacteroide Population Distribution”. Additionally, <strong>the</strong>re are graphs showing <strong>the</strong> total number <strong>of</strong><br />

sacrifices which influence environment inflammation over time (“Total Influencing Sacrifices over<br />

Time”) and <strong>the</strong> total inflammation and temperature, showing how <strong>the</strong>y relate, over time<br />

(“Inflammation and Temperature”). The final graph, titled “Average Nutrient Concentration” shows<br />

<strong>the</strong> average nutrient concentration over time.<br />

3.7.2 Interpreting <strong>the</strong> visualisation<br />

The visualisation window is in <strong>the</strong> visualisation area, highlighted by <strong>the</strong> green box in figure A-2. As<br />

mentioned earlier in this guide, <strong>the</strong> visualisation has two main areas. The largest area, coloured<br />

85


green, represents <strong>the</strong> lumen <strong>of</strong> <strong>the</strong> colon. This is <strong>the</strong> area bacteria populate. The shade <strong>of</strong> individual<br />

grid locations in this area will scale from completely black to white based on <strong>the</strong> nutrient<br />

concentration or pH level, depending on visualisation mode setting (see “3.3 Visualisation and run<br />

speed”) <strong>of</strong> <strong>the</strong> location. The smaller, pink area represents <strong>the</strong> colon membrane. This is <strong>the</strong> area<br />

which TTSS-1 + pathogens infiltrate to cause inflammation.<br />

The bacteria agents are represented by different coloured dots. The red dots represent <strong>the</strong><br />

Bacteroide agents in <strong>the</strong> model, <strong>the</strong> blue dots show <strong>the</strong> Bifidobacteria agents, <strong>the</strong> yellow dots show<br />

<strong>the</strong> TTSS-1 - pathogens and <strong>the</strong> cyan dots represent <strong>the</strong> TTSS-1 + pathogens.<br />

86


B. Maintenance Manual<br />

Contents<br />

1. Introduction ....................................................................................................................... 88<br />

2. Program flow and code ....................................................................................................... 88<br />

3. Global definitions ............................................................................................................... 89<br />

4. Setup methods ................................................................................................................... 92<br />

5. Go (main loop) methods ..................................................................................................... 92<br />

6. Environment methods ........................................................................................................ 93<br />

6.1 Update environment pH and Update environment nutrients .................................................... 93<br />

6.2 O<strong>the</strong>r environment methods ...................................................................................................... 93<br />

7. <strong>Agent</strong> methods ................................................................................................................... 94<br />

7.1 Shared agent methods ................................................................................................................ 94<br />

7.2 Native agent methods ................................................................................................................. 95<br />

7.3 Pathogen agent methods ............................................................................................................ 95<br />

8. Function methods ............................................................................................................... 96<br />

9. Monitor methods ............................................................................................................... 96<br />

87


1. Introduction<br />

The model, <strong>Salmonella</strong> Simulation, aims to provide a biologically accurate simulation <strong>of</strong> <strong>the</strong> colon<br />

environment, <strong>the</strong> native bacteria in that environment and <strong>the</strong> infection dynamics and inflammation<br />

exploitation <strong>of</strong> invading <strong>Salmonella</strong> typhimurium. The aim <strong>of</strong> this manual is to provide you with <strong>the</strong><br />

information you will need to understand <strong>the</strong> program and how to modify it to improve current<br />

behaviour or add new behaviour.<br />

The program was created using <strong>the</strong> NetLogo agent based modelling system. The program can be<br />

downloaded freely from “http://ccl.northwestern.edu/netlogo/” and is <strong>the</strong> only requirement for<br />

modifying and running <strong>the</strong> simulation. This guide assumes you have knowledge <strong>of</strong> <strong>the</strong> NetLogo<br />

development environment and NetLogo coding. Please check <strong>the</strong> URL provided for requirements for<br />

running NetLogo itself and fur<strong>the</strong>r guides on using <strong>the</strong> NetLogo modelling system.<br />

The user guide which accompanies <strong>the</strong> model provides instructions on extracting and running <strong>the</strong><br />

model from <strong>the</strong> “carrie_martin.tar.gz” archive it is distributed in.<br />

2. Program flow and code<br />

The code for <strong>the</strong> model can be divided into 5 stages. First, <strong>the</strong>re is <strong>the</strong> “Setup” stage, which is<br />

responsible for initialising global model variables and <strong>the</strong> NetLogo visualisation window. This stage<br />

is executed only once per simulation run. The o<strong>the</strong>r 6 stages form <strong>the</strong> main iteration <strong>of</strong> <strong>the</strong> program<br />

during runtime and include updating <strong>the</strong> environment, agents, visualisation and raw data outputs.<br />

Figure B-1 shows <strong>the</strong> order <strong>of</strong> <strong>the</strong> model stages, along with o<strong>the</strong>r program states and how <strong>the</strong>y can<br />

be entered into.<br />

Pause<br />

simulation<br />

Interruptible Region<br />

Check halting<br />

conditions<br />

Resume<br />

Figure B-1: Main simulation cycle.<br />

Update data<br />

outputs<br />

Setup<br />

Update<br />

environment<br />

Update<br />

visualisation<br />

Update agents<br />

88


Although <strong>the</strong> above diagram suggests an automatic transition from <strong>the</strong> setup phase to <strong>the</strong> main<br />

iteration (highlighted by <strong>the</strong> “Interruptible Region” box), <strong>the</strong> program will not progress until <strong>the</strong> user<br />

presses <strong>the</strong> “Go” button on <strong>the</strong> interface <strong>of</strong> <strong>the</strong> model.<br />

The model code has been separated using comment lines, in order to group common methods<br />

toge<strong>the</strong>r based on what <strong>the</strong>y affect or by <strong>the</strong>ir purpose. The groups in <strong>the</strong> code include “Global<br />

Definitions”, “Setup Methods”, “Go (Main Loop) Methods), “Update Environment pH”, “Update<br />

Environment Nutrients”, “O<strong>the</strong>r Environment Methods”, “Shared <strong>Agent</strong> Methods”, “Native <strong>Agent</strong><br />

Methods”, “Pathogen <strong>Agent</strong> Methods”, “Function Methods” and “Monitor Methods”. The following<br />

sections <strong>of</strong> this manual will follow <strong>the</strong>se section headings and describe <strong>the</strong> purpose <strong>of</strong> <strong>the</strong> methods<br />

contained within each section. This will hopefully provide you with <strong>the</strong> information you need to<br />

modify <strong>the</strong> behaviour <strong>of</strong> <strong>the</strong> model.<br />

3. Global definitions<br />

This first section <strong>of</strong> <strong>the</strong> code serves to define certain aspects <strong>of</strong> <strong>the</strong> model and import any code<br />

extensions that are required. In terms <strong>of</strong> <strong>the</strong> model itself, <strong>the</strong> important functions <strong>of</strong> this section are<br />

defining <strong>the</strong> types <strong>of</strong> agents in <strong>the</strong> model and assigning <strong>the</strong>m specific properties, assigning<br />

properties to <strong>the</strong> environment and also defining <strong>the</strong> global variables <strong>of</strong> <strong>the</strong> model.<br />

The model currently defines three agent types and those are “Pathogens”, “Bacteroides” and<br />

“Bifidos” (bifidobacterium) agents.<br />

The code <strong>the</strong>n assigns properties to <strong>the</strong> agents. The properties shared by all <strong>of</strong> <strong>the</strong> agents are<br />

created within <strong>the</strong> “turtles-own” code block. These properties include those common to all<br />

bacteria such as generation time, nutrient uptake rate, current nutrient concentrations, current<br />

action etc. The properties are separated within <strong>the</strong> code block by those which are static (under <strong>the</strong><br />

“properties” comment in <strong>the</strong> code) and those which are variable (under <strong>the</strong> “variables” comment in<br />

<strong>the</strong> code) in order to assist in maintenance and readability.<br />

The properties which are specific to one type <strong>of</strong> agent are specified under “type-own” code blocks<br />

(for example “pathogens-own”). At present, only pathogen agents have unique properties which<br />

help control <strong>the</strong> sacrificing mechanics and effects.<br />

Next, <strong>the</strong> environment patches are setup (for definition and description <strong>of</strong> a ‘patch’, please refer to<br />

<strong>the</strong> NetLogo user guide). Again, <strong>the</strong>se properties are separated by those which are static and<br />

variable and are set similarly to <strong>the</strong> way agent properties are set, containing <strong>the</strong>m within a<br />

“patches-own” code block.<br />

Finally, this section <strong>of</strong> <strong>the</strong> code defines <strong>the</strong> global variables for <strong>the</strong> model. These include some<br />

additional environment properties, which are not specific to each individual patch and o<strong>the</strong>r<br />

variables which are used to aid in <strong>the</strong> functionality <strong>of</strong> <strong>the</strong> model. The purpose <strong>of</strong> each variable is<br />

evident from its name or is explained in comment lines in <strong>the</strong> code itself, though table C-1 lists all<br />

variables and what purpose <strong>the</strong>y sever in <strong>the</strong> model.<br />

89


Shared bacteria properties (turtles-own)<br />

generationTime This variable states how many cycles if takes for a bacteria<br />

agent to grow, perform DNA syn<strong>the</strong>sis and divide. It is used<br />

after an agent has finished <strong>the</strong> growth phase <strong>of</strong> <strong>the</strong> cell life<br />

cycle and begins syn<strong>the</strong>sis. A number <strong>of</strong> cycles equal to half<br />

<strong>the</strong> value <strong>of</strong> this variable must transpire, simulating DNA<br />

syn<strong>the</strong>sis, before division occurs.<br />

baseNutUptake The base nutrient uptake rate <strong>of</strong> <strong>the</strong> agent. Defined for each<br />

agent type by <strong>the</strong> user on <strong>the</strong> model interface.<br />

maintenanceRate The maintenance rate <strong>of</strong> <strong>the</strong> agent. This maintenance rate<br />

simulates <strong>the</strong> required nutrients in order for a bacteria cell to<br />

survive. Defined for each agent type by <strong>the</strong> user on <strong>the</strong> model<br />

interface.<br />

optPH The optimal pH for <strong>the</strong> agent. This is used when determining<br />

<strong>the</strong> bacterial influence on <strong>the</strong> pH <strong>of</strong> an environment patch. If<br />

<strong>the</strong> patch’s current pH is lower than this value, <strong>the</strong> bacteria<br />

will increase <strong>the</strong> pH and vice-versa. Meant to simulate<br />

bacterial secretions which affect <strong>the</strong>ir environment.<br />

bNutCon The current nutrient concentration for <strong>the</strong> agent. As <strong>the</strong> agent<br />

consumes nutrients (every cycle), this value increases. When<br />

this value reaches 0, <strong>the</strong> agent will die.<br />

action The current action being carried out by <strong>the</strong> agent. Possible<br />

actions are listed in table B-2 along with what it means and<br />

whe<strong>the</strong>r it is specific to a certain agent type.<br />

cyclesOnAction The number <strong>of</strong> cycles an agent has spent on <strong>the</strong> action<br />

currently being performed. This is used to control sacrificing,<br />

for example, <strong>the</strong> time spent injecting TTSS-1 effectors.<br />

Pathogen specific properties (pathogens-own)<br />

sacrificeProb This is used for “Probability <strong>Based</strong>” sacrificing and holds <strong>the</strong><br />

number which <strong>the</strong> randomly generated threshold must be<br />

lower than in order for this pathogen to begin sacrificing.<br />

influenceUntilTick This is used to control inflammation recovery. When a<br />

pathogen sacrifices, this property will be set to <strong>the</strong> number <strong>of</strong><br />

cycles that have already transpired in <strong>the</strong> model, plus a<br />

random value between a range set by <strong>the</strong> user on <strong>the</strong><br />

interface. Once this value is reached in cycles, <strong>the</strong> pathogen’s<br />

sacrifice no longer contributes to environment inflammation.<br />

Location specific environment properties (patches-own)<br />

envArea This variable will be set to ei<strong>the</strong>r “Lumen” or “Membrane” and<br />

is used to detect <strong>the</strong> border between <strong>the</strong> regions and control<br />

agent movements. For example, agents cannot move outside<br />

<strong>the</strong> Lumen area unless <strong>the</strong>y are sacrificing pathogens. Or, with<br />

“Location <strong>Based</strong>” sacrificing, this variable is used to detect if a<br />

pathogen is bordering <strong>the</strong> membrane.<br />

pNutCon The nutrient concentration <strong>of</strong> <strong>the</strong> environment patch.<br />

pPh The pH level <strong>of</strong> <strong>the</strong> environment patch.<br />

Global environment properties (globals)<br />

membraneSize Controls <strong>the</strong> number <strong>of</strong> rows <strong>the</strong> membrane area takes up in<br />

90


<strong>the</strong> model.<br />

envTemp The temperature <strong>of</strong> <strong>the</strong> environment.<br />

envInflam The inflammation level <strong>of</strong> <strong>the</strong> environment.<br />

nextFlushCycle Controls when <strong>the</strong> next flush will occur. The value is set to <strong>the</strong><br />

current number <strong>of</strong> cycles that have transpired plus a random<br />

value between a range specified by <strong>the</strong> user on <strong>the</strong> model<br />

interface after a flush occurs.<br />

O<strong>the</strong>r global variables (globals)<br />

cols Array <strong>of</strong> arrays <strong>of</strong> integers (2D array), equal in size to <strong>the</strong><br />

number <strong>of</strong> environment patches, used for updating pH and<br />

nutrient levels.<br />

pathogensSacrificed Keeps track <strong>of</strong> <strong>the</strong> number <strong>of</strong> pathogen sacrifices which are<br />

currently influencing inflammation level for inflammation<br />

calculation.<br />

stationaryPeriodDeteced? Indicates whe<strong>the</strong>r a stationary period has been detected.<br />

Used to control sacrificing beginning.<br />

stationaryPeriodDuration Counter, which tracks how many cycles <strong>the</strong> pathogen<br />

population has stayed within <strong>the</strong> range defined by <strong>the</strong> user.<br />

Used for discovering stationary periods and beginning<br />

sacrifices.<br />

popCountStartStationaryPeriod Records <strong>the</strong> pathogen population level at <strong>the</strong> start <strong>of</strong> <strong>the</strong> last<br />

“stationaryPeriodDuration” count. Used to ensure pathogen<br />

population stays within <strong>the</strong> range defined by <strong>the</strong> user.<br />

Table B-1: <strong>Agent</strong> properties, environment properties and global variables.<br />

Action Description<br />

Growing Indicates that <strong>the</strong> agent is currently just moving around <strong>the</strong> environment<br />

consuming nutrients in preparation for DNA syn<strong>the</strong>sis.<br />

Syn<strong>the</strong>sis Indicates that <strong>the</strong> agent has consumed enough nutrients for division and is<br />

syn<strong>the</strong>sising DNA.<br />

Sacrificing Indicates that a cooperative pathogen (TTSS-1 + ) is moving towards <strong>the</strong><br />

membrane to begin <strong>the</strong> invasion process.<br />

WaitingToInject Indicates that a cooperative pathogen (TTSS-1 + ) has reached <strong>the</strong> membrane<br />

and is used to simulate <strong>the</strong> slight delay before injection actually begins.<br />

Injecting Indicates that a cooperative pathogen (TTSS-1 + ) has begun injecting TTSS-1<br />

effectors into <strong>the</strong> membrane and is in <strong>the</strong> process <strong>of</strong> being engulfed.<br />

InMembrane Indicates that a cooperative pathogen (TTSS-1 + ) has been fully engulfed by<br />

<strong>the</strong> membrane layer.<br />

Table B-2: List <strong>of</strong> possible agent actions.<br />

91


4. Setup methods<br />

This section <strong>of</strong> <strong>the</strong> code deals with resetting and initialising <strong>the</strong> model. The main setup method is<br />

called simply “Setup” and performs <strong>the</strong> resetting, initialisation <strong>of</strong> main global variables and calls two<br />

additional methods “drawEnv” and “initEnv”.<br />

If you wish to alter <strong>the</strong> size <strong>of</strong> <strong>the</strong> visualisation area <strong>of</strong> <strong>the</strong> model, you may wish to change <strong>the</strong> value<br />

<strong>of</strong> <strong>the</strong> “membraneSize” variable, which determines how many rows are used to represent <strong>the</strong><br />

membrane area on <strong>the</strong> visualisation. You will have to change <strong>the</strong> size <strong>of</strong> <strong>the</strong> arrays used to update<br />

<strong>the</strong> environment patch pH and nutrient levels, which can be updated by changing <strong>the</strong> initialisation <strong>of</strong><br />

<strong>the</strong> “cols” variable.<br />

The “drawEnv” method contains <strong>the</strong> code which will colour <strong>the</strong> patches in <strong>the</strong> environment to<br />

represent <strong>the</strong> lumen or membrane area. The only reason to change this method would be to change<br />

<strong>the</strong> colour scheme <strong>of</strong> <strong>the</strong> model, or, add additional colours if you wish to add fur<strong>the</strong>r environment<br />

regions.<br />

The “initEnv” method initialises both <strong>the</strong> patch-specific and global environment properties. The<br />

first part deals with <strong>the</strong> global properties, setting <strong>the</strong> temperature (“envTemp”) to <strong>the</strong> base<br />

temperature set by <strong>the</strong> user on <strong>the</strong> interface, inflammation (“envInflam”) to 0 and <strong>the</strong> next flush<br />

cycle (“nextFlushCycle”) to 0. Setting “nextFlushCycle” to 0 means that a flush will occur on <strong>the</strong><br />

first cycle <strong>of</strong> <strong>the</strong> model, which helps to distribute pH levels and nutrients before agents are added.<br />

After <strong>the</strong> first cycle, this variable is set to value between <strong>the</strong> range defined by <strong>the</strong> user plus <strong>the</strong><br />

current simulation cycle and determines when <strong>the</strong> next flush event will occur. The method <strong>the</strong>n sets<br />

patch-specific properties, including what environment area <strong>the</strong>y represent, <strong>the</strong>ir pH levels and<br />

nutrient concentrations.<br />

5. Go (main loop) methods<br />

This group <strong>of</strong> methods constitute <strong>the</strong> main simulation loop. The first method, called “Go”, is<br />

repeatedly called by <strong>the</strong> “Go” and a single time by <strong>the</strong> “Go Once” buttons on <strong>the</strong> interface. It checks<br />

for halting conditions, updates <strong>the</strong> cycle counter and calls o<strong>the</strong>r methods within <strong>the</strong> “Go methods”<br />

group, which update <strong>the</strong> environment (“updateEnvironment”), agents (“update<strong>Agent</strong>s”),<br />

visualisation (“updateVisualisation”) and plots (“updatePlots”). Only <strong>the</strong> graph (plot) outputs<br />

require updating through coding as NetLogo handles updating <strong>of</strong> raw data outputs.<br />

The “updateEnvironment” method contains code to replenish nutrient levels (based on <strong>the</strong><br />

replenishment rate specified by <strong>the</strong> user on <strong>the</strong> model interface) and determine whe<strong>the</strong>r a flush is<br />

to be executed. It also calls <strong>the</strong> methods in <strong>the</strong> “Update Environment Ph” section to calculate and<br />

set pH levels, <strong>the</strong> “Update Environment Nutrients” section to calculate and set nutrient<br />

concentrations and methods in <strong>the</strong> “O<strong>the</strong>r Environment Methods” section, which are responsible for<br />

updating inflammation, temperature and for performing flush events.<br />

“update<strong>Agent</strong>s” is <strong>the</strong> method responsible for calling methods in <strong>the</strong> “Shared <strong>Agent</strong> Methods” and<br />

“Pathogen <strong>Agent</strong> Methods” sections to update agent states. It also contains code to update <strong>the</strong><br />

number <strong>of</strong> cycles an agent has spent on a particular action.<br />

92


The “updateVisualisation” method does not call any additional methods, but contains code to<br />

update aspects <strong>of</strong> <strong>the</strong> visualisation which NetLogo does not handle automatically. First, <strong>the</strong> colour<br />

scaling <strong>of</strong> <strong>the</strong> patches which constitute <strong>the</strong> lumen area is updated, based on <strong>the</strong> nutrient or pH level<br />

(depending on <strong>the</strong> visualisation mode setting on <strong>the</strong> interface), scaling <strong>the</strong> brightness <strong>of</strong> <strong>the</strong> colour<br />

depending on <strong>the</strong> ranges specified in this method. Secondly, it enables or disables <strong>the</strong> built-in agent<br />

property “hidden?” which shows or hides agents. This property is switched for different agent types<br />

depending on how <strong>the</strong> switches are set on <strong>the</strong> model interface.<br />

The final method, “updatePlots”, calls a series <strong>of</strong> methods from <strong>the</strong> “Monitor Methods” section <strong>of</strong><br />

<strong>the</strong> code. The methods called update <strong>the</strong> graphs on <strong>the</strong> interface with <strong>the</strong> relevant values for <strong>the</strong><br />

current cycle.<br />

6. Environment methods<br />

6.1 Update environment pH and Update environment nutrients<br />

The methods in <strong>the</strong>se sections are responsible for calculating and updating <strong>the</strong> pH and nutrient<br />

levels <strong>of</strong> individual environment patches (“calculateNewEnvironmentPh”/<br />

“calculateNewEnvironmentNutrientConcentration” and “updateEnvironmentPh”/”<br />

updateEnvironmentNutrientConcentration” respectively). The second <strong>of</strong> <strong>the</strong>se sets <strong>of</strong> methods<br />

is relatively simple, just iterating through <strong>the</strong> “cols” 2d array, updating <strong>the</strong> actual environment<br />

patches in <strong>the</strong> model, with <strong>the</strong> values calculated in <strong>the</strong> “calculateNewEnvironmentX” methods.<br />

The “calculateNewEnvironmentX” methods are <strong>the</strong> most complex in terms <strong>of</strong> coding and have a<br />

significant impact on performance. The reason is that <strong>the</strong> methods iterate through <strong>the</strong> “cols” array,<br />

which is an array <strong>of</strong> arrays and was initialised in this way because NetLogo does not support multidimensional<br />

arrays. Additionally, <strong>the</strong> array is very large, with a separate entry for every patch in <strong>the</strong><br />

lumen area <strong>of</strong> <strong>the</strong> model.<br />

As mentioned, <strong>the</strong> methods iterate through <strong>the</strong> “cols” array, calculating and storing <strong>the</strong> new pH<br />

and nutrient concentration values for <strong>the</strong> patches. The values are first calculated and placed into<br />

this array so <strong>the</strong> new levels do not affect <strong>the</strong> calculation <strong>of</strong> levels for <strong>the</strong> patches calculated<br />

subsequently. The methods generate random values or use existing values for <strong>the</strong> patches which<br />

form <strong>the</strong> border <strong>of</strong> <strong>the</strong> lumen area.<br />

These methods are fundamental in controlling flow <strong>of</strong> <strong>the</strong> nutrients and pH levels through <strong>the</strong> model<br />

and also controlling <strong>the</strong> influence from surrounding lumen areas and <strong>the</strong> membrane.<br />

6.2 O<strong>the</strong>r environment methods<br />

This section <strong>of</strong> <strong>the</strong> code contains two methods, “updateEnvironmentInflammation” and “flush”.<br />

The first <strong>of</strong> <strong>the</strong>se methods is responsible for updating <strong>the</strong> number <strong>of</strong> sacrifices which can currently<br />

influence inflammation, checking <strong>the</strong> “influenceUntilTick” property <strong>of</strong> cooperative pathogens<br />

and checking if <strong>the</strong> number <strong>of</strong> cycles that has transpired is equal to or exceeds that value. The<br />

method also calculates <strong>the</strong> level <strong>of</strong> inflammation itself, based on <strong>the</strong> number <strong>of</strong> influencing sacrifices<br />

and also sets <strong>the</strong> temperature <strong>of</strong> <strong>the</strong> environment.<br />

93


The “flush” method is responsible for executing <strong>the</strong> events that take place when a flush event is<br />

initiated. The first action it takes is to remove a percentage <strong>of</strong> <strong>the</strong> bacteria population <strong>of</strong> <strong>the</strong> model.<br />

Which individual bacteria cells are removed is pseudo-random, with pathogens that have “latched”<br />

onto <strong>the</strong> membrane by inserting <strong>the</strong>ir TTSS injectors being <strong>the</strong> only agents exempt from flushing.<br />

The percentage removed is set by <strong>the</strong> model user on <strong>the</strong> interface.<br />

Once <strong>the</strong> bacteria have been removed, <strong>the</strong> resets <strong>the</strong> nutrient concentrations <strong>of</strong> all patches in <strong>the</strong><br />

model to values between a range set by <strong>the</strong> user. This is <strong>the</strong> same way that <strong>the</strong> nutrient<br />

concentrations are initially set by <strong>the</strong> model when it is first setup.<br />

The next action executed by this method is that <strong>of</strong> running diffusion cycles. This is to ensure that <strong>the</strong><br />

new nutrient levels are “washed” toge<strong>the</strong>r similar to <strong>the</strong> way <strong>the</strong>y would be in <strong>the</strong> real colon, as <strong>the</strong><br />

new nutrient concentrations are meant to simulate new digested material flowing into <strong>the</strong><br />

environment. The number <strong>of</strong> diffusion cycles run on a flush event is set by <strong>the</strong> user, using <strong>the</strong> input<br />

box on <strong>the</strong> model interface.<br />

The final action <strong>the</strong> “flush” method performs is to calculate when <strong>the</strong> next flush will occur.<br />

7. <strong>Agent</strong> methods<br />

7.1 Shared agent methods<br />

The methods in this section are utilised when determining <strong>the</strong> behaviour <strong>of</strong> all agents in <strong>the</strong> model.<br />

The first <strong>of</strong> <strong>the</strong> methods in this section is <strong>the</strong> “move<strong>Agent</strong>s” method, which iterates through every<br />

agent in <strong>the</strong> model, checks for <strong>the</strong> highest nutrient concentration <strong>of</strong> <strong>the</strong> patch <strong>the</strong> agent is currently<br />

occupying and <strong>the</strong> eight surrounding patches. Once <strong>the</strong> highest nutrient concentration is found, <strong>the</strong><br />

agent ei<strong>the</strong>r rotates to face that patch, or, if it is already facing <strong>the</strong> correct direction, moves toward<br />

<strong>the</strong> patch as long as <strong>the</strong>re are less than 2 agents already occupying that patch.<br />

This behaviour is common to all agents whose action is ei<strong>the</strong>r that <strong>of</strong> “Growing” or “Syn<strong>the</strong>sis”. If<br />

an agent has “Sacrificing” as <strong>the</strong>ir current action, it will move toward <strong>the</strong> membrane. When a<br />

sacrificing agent reaches <strong>the</strong> membrane, it has its action set to “WaitingToInject”.<br />

The next shared agent method is “consumeNutrients”. This method updates an agent’s nutrient<br />

concentration, removes <strong>the</strong> consumed nutrients from <strong>the</strong> patch <strong>the</strong> agent is currently occupying and<br />

finally updates <strong>the</strong> size <strong>of</strong> <strong>the</strong> agent based on <strong>the</strong> new nutrient concentration <strong>of</strong> that agent.<br />

When calculating <strong>the</strong> gain from nutrient consumption on <strong>the</strong> patch, <strong>the</strong> method first calculates <strong>the</strong><br />

affecting factors. Those factors include <strong>the</strong> concentration <strong>of</strong> nutrients on <strong>the</strong> patch (“conFactor”),<br />

<strong>the</strong> temperature <strong>of</strong> <strong>the</strong> environment compared to <strong>the</strong> optimal, minimum and maximum survival<br />

temperature <strong>of</strong> <strong>the</strong> bacteria (“tempFactor”), <strong>the</strong> pH level <strong>of</strong> <strong>the</strong> patch <strong>the</strong>y are currently occupying<br />

compared to <strong>the</strong> optimal pH <strong>of</strong> <strong>the</strong> agent type (“pHFactor”) and finally, <strong>the</strong> inflammation factor<br />

(“infFactor”). These factors are <strong>the</strong>n used, in conjunction with <strong>the</strong> base uptake rate and<br />

maintenance rate <strong>of</strong> <strong>the</strong> bacterial agent to calculate <strong>the</strong> “amount” <strong>of</strong> nutrients consumed.<br />

The third and fourth methods in this section “checkDeaths” and “kill<strong>Agent</strong>” deal with checking for<br />

and executing <strong>the</strong> deaths <strong>of</strong> agents. “checkDeaths” deals with agent deaths due to lack <strong>of</strong> nutrients<br />

or apoptosis (programmed cell death). Death due to lack <strong>of</strong> nutrients only occurs when an agent’s<br />

94


nutrient level falls to 0. Death by apoptosis is purely based on chance. The probability <strong>of</strong> a death by<br />

apoptosis for an individual agent is set by <strong>the</strong> user. When an agent dies by ei<strong>the</strong>r method, <strong>the</strong><br />

“kill<strong>Agent</strong>” method is used to handle <strong>the</strong> death, by removing <strong>the</strong> agent from <strong>the</strong> simulation and<br />

leaving behind a percentage <strong>of</strong> <strong>the</strong> nutrients that agent currently had. This percentage is also set by<br />

<strong>the</strong> model user.<br />

The last method in this section, called “checkDivisions”, is responsible for checking for and<br />

performing cell division. The method simply iterates through all agents on <strong>the</strong> “Syn<strong>the</strong>sis” action<br />

and checks if <strong>the</strong>y have spent a number <strong>of</strong> cycles on this action which is equal to half <strong>the</strong>ir<br />

generation time. If <strong>the</strong>y have, a new agent is spawned and <strong>the</strong> nutrient concentration <strong>of</strong> <strong>the</strong> parent<br />

agent is divided between <strong>the</strong> parent and <strong>the</strong> child. Both agents are <strong>the</strong>n reset in terms <strong>of</strong> size, have<br />

<strong>the</strong>ir actions set to “Growing” and <strong>the</strong>n go on to behave as normal. When a cooperative pathogen<br />

divides, <strong>the</strong> new agent will have a different sacrifice probability than <strong>the</strong> parent (this is only relevant<br />

if “Probability <strong>Based</strong>” sacrificing is used). The final responsibility <strong>of</strong> this method is that <strong>of</strong> controlling<br />

mutation. Depending on <strong>the</strong> type <strong>of</strong> mutation allowed by <strong>the</strong> user, pathogens will produce mutated<br />

<strong>of</strong>fspring when <strong>the</strong>y divide based on a probability to mutate, also set by <strong>the</strong> user.<br />

7.2 Native agent methods<br />

There is only one method in this section <strong>of</strong> <strong>the</strong> code. The “addNatives” method is responsible for<br />

adding native agents to <strong>the</strong> model when <strong>the</strong> “Add Natives” button is pressed by <strong>the</strong> user. The<br />

number <strong>of</strong> agents added is defined by <strong>the</strong> user, with <strong>the</strong> bacteroide population being divided by <strong>the</strong><br />

four types <strong>of</strong> bacteroide simulated in <strong>the</strong> model. Each type <strong>of</strong> agent has a different generation time,<br />

optimal pH, base uptake rate, maintenance rate etc. The generation time and optimal pH are set in<br />

this method using explicit values, which were determined through research. The base uptake rate<br />

and maintenance rate values are set by <strong>the</strong> user <strong>of</strong> <strong>the</strong> model.<br />

7.3 Pathogen agent methods<br />

The first method found in this group is called “stationaryPeriodDetection”. This method is<br />

responsible for detecting <strong>the</strong> end <strong>of</strong> <strong>the</strong> initial lag phase in pathogen growth and <strong>the</strong>n continuously<br />

checking <strong>the</strong> pathogen population to see if it stays within <strong>the</strong> range defined by <strong>the</strong> input parameter<br />

“Population-Variation-During-Stationary-Phase” for a duration defined by “Duration-Of-<br />

Stationary-Phase”. The purpose <strong>of</strong> this method is to check a stationary phase in <strong>the</strong> pathogen<br />

growth and <strong>the</strong>n allow sacrificing to begin, as <strong>the</strong> pathogen population should reach <strong>the</strong> full capacity<br />

before beginning sacrifices.<br />

The second method in this group, called “begin<strong>Infection</strong>”, adds pathogens to <strong>the</strong> simulation and is<br />

called when <strong>the</strong> user presses <strong>the</strong> “Begin <strong>Infection</strong>” button on <strong>the</strong> interface. The first thing <strong>the</strong><br />

method does is determine <strong>the</strong> number <strong>of</strong> cooperative pathogens within <strong>the</strong> pathogen population.<br />

To do this, it uses <strong>the</strong> initial pathogen population and percentage co-operators inputs, set by <strong>the</strong><br />

user. It <strong>the</strong>n creates a number <strong>of</strong> pathogens, with a sacrifice probability <strong>of</strong> 0, equal to <strong>the</strong> requested<br />

initial pathogen population minus <strong>the</strong> calculated number <strong>of</strong> co-operators, thus, adding defector<br />

pathogens to <strong>the</strong> model. It <strong>the</strong>n creates a number <strong>of</strong> pathogens equal to <strong>the</strong> number <strong>of</strong> calculated<br />

co-operators, with a random sacrifice probability, adding co-operators. The sacrifice probability<br />

property <strong>of</strong> a pathogen agent is used to determine whe<strong>the</strong>r it is a co-operator or not.<br />

95


The third method in this group is called “beginNewSacrifices”. Depending on <strong>the</strong> sacrifice method<br />

selected by <strong>the</strong> user, this method iterates through all <strong>of</strong> <strong>the</strong> cooperative pathogens checking for <strong>the</strong><br />

criteria which will initiate a sacrifice action and begins <strong>the</strong> sacrifice if <strong>the</strong>y are met.<br />

The final method in this group is called “checkInjectionProgress” and is responsible for checking<br />

and updating <strong>the</strong> progress <strong>of</strong> a sacrificing pathogen, once it has begun <strong>the</strong> “WaitingToInject”<br />

action. The first part <strong>of</strong> this method simply checks to see if a pathogen has spent 2 cycles (12<br />

seconds) waiting to inject, which simulates <strong>the</strong> short period before a pathogen actually begins<br />

injecting TTSS-1 effectors. The second part checks if sufficient time has elapsed since <strong>the</strong><br />

“Injecting” action began. Once <strong>the</strong> required number <strong>of</strong> cycles has transpired, <strong>the</strong> pathogen is<br />

moved “out <strong>of</strong> <strong>the</strong> way”, to <strong>the</strong> top-left corner <strong>of</strong> <strong>the</strong> visualisation window, hidden and has its action<br />

set to “InMembrane”, indicating that it is a co-operator who has invaded <strong>the</strong> membrane.<br />

Additionally, <strong>the</strong> “influenceUntilTick” property is set for that pathogen, indicating on which cycle<br />

<strong>the</strong> environment will be said to have recovered from <strong>the</strong> inflammation caused by that pathogen’s<br />

invasion.<br />

8. Function methods<br />

The single method in this section, “randomFloatMinMax”, was created as NetLogo did not have <strong>the</strong><br />

ability to generate a random value between two given values built-in. The function simply takes two<br />

numbers and returns a random floating point value between <strong>the</strong> given minimum and maximum<br />

values.<br />

9. Monitor methods<br />

The final section <strong>of</strong> <strong>the</strong> code contains 8 methods, which are used to ei<strong>the</strong>r update <strong>the</strong> output graphs<br />

or calculate o<strong>the</strong>r data outputs to ei<strong>the</strong>r be displayed or used in <strong>the</strong> calculation <strong>of</strong> fur<strong>the</strong>r data<br />

outputs. The methods in this section are fairly self-explanatory from <strong>the</strong>ir names and descriptions in<br />

<strong>the</strong> code, with <strong>the</strong> first 5 being responsible for updating <strong>the</strong> various graphs and <strong>the</strong> last three<br />

calculating data values.<br />

96

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!