Skin microbiome and Shine coli
Model was written in NetLogo 6.1.1
•
Viewed 180 times
•
Downloaded 10 times
•
Run 0 times
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
Info tab cannot be displayed because of an encoding error
Comments and Questions
Please start the discussion about this model!
(You'll first need to log in.)
Click to Run Model
; (C) Caius Gibeily - Designer of Microbiome Simulator patches-own [damage birth-tick age quorum_col2 quorum_col3 ] to setup clear-all if Seed = True [ random-seed seed-val ] ask patches [ set pcolor one-of [green blue orange] set birth-tick 4 set damage 0 set quorum_col3 0 set quorum_col2 0 ] reset-ticks end to go ask patches [ set birth-tick ticks col-replication increment-age death ] if Model-type = "solar model" [ ask up-to-n-of solar-flux patches [set damage (damage + damage-factor) UV-recovery ] ] if Model-type = "quorum sensing" [ ask patches [ quorum-sensing ] ] if (count patches with [pcolor = green] = 0) and (count patches with [pcolor = orange] = 0) and (count patches with [pcolor = blue] = 0) [ stop ] if (count patches with [pcolor = green] >= 21000) or (count patches with [pcolor = orange] >= 21000) or (count patches with [pcolor = blue] >= 21000) [ print "All hail the new colony" ] if (ticks = N-cycles) and (N-cycles > 0) [ stop] tick end to increment-age let age-in-ticks birth-tick - ticks if (age-in-ticks >= 0) and (age-in-ticks mod 2 = 0) [ set age (1 + age) ] end to quorum-sensing ask self [ ifelse (pcolor = blue) and (age >= col2-doublingt) [ set quorum_col2 quorum_col2 + 1 let amount quorum_col2 * col2-secretion let neighbor-share amount / 8 ask neighbors4 [set quorum_col2 quorum_col2 + neighbor-share] ] [if (pcolor = orange) and (age >= col3-doublingt) [ set quorum_col3 quorum_col3 + 1 let amount2 quorum_col3 * col3-secretion let neighbor-share2 amount2 / 8 ask neighbors4 [set quorum_col3 quorum_col3 + neighbor-share2] ] ] ] end to col-replication ask self [ if (pcolor = cyan) and (age = 3) [ if random-float 120 < shine-replication [ set birth-tick ticks set age 0 ask neighbors4 [ set pcolor cyan set birth-tick ticks set age 0 ] ] ] if (pcolor = green) and (age = col1-doublingt) [ if random-float 100 < col1-replication [ set birth-tick ticks set age 0 ask neighbors4 [ set pcolor green set birth-tick ticks set age 0 ] ] ] ifelse (Model-type = "quorum sensing") and (pcolor = blue) and (age = col2-doublingt) [ ifelse (pcolor = blue) and (age = col2-doublingt) and (quorum_col2 > 5) [ if random-float 40 < col2-replication [ set birth-tick ticks set age 0 set quorum_col2 0 ask neighbors4 [ set pcolor blue set birth-tick ticks set age 0 ] ] ] [ifelse (pcolor = blue) and (age = col2-doublingt) and (quorum_col2 < 5) [ if random-float 150 < col2-replication [ set birth-tick ticks set quorum_col2 0 set age 0 ask neighbors4 [ set pcolor blue set birth-tick ticks set age 0 ] ] ] [if (pcolor = blue) and (age = col2-doublingt) and (quorum_col2 < quorum_col3) [ ifelse random-float 140 < col2-replication [ set birth-tick ticks set age 0 set quorum_col2 0 ask neighbors4 [ set pcolor blue set birth-tick ticks set age 0 set quorum_col2 0 ] ] [set pcolor orange ask neighbors4 [ set pcolor orange set birth-tick ticks set age 0 set quorum_col2 0 set quorum_col3 1 ] ] ] ] ] ] [if (Model-type = "dark microbiome") or (Model-type = "solar model") and (pcolor = blue) and (age = col2-doublingt)[ if random-float 100 < col2-replication [ set birth-tick ticks set age 0 ask neighbors4 [ set pcolor blue set birth-tick ticks set age 0 ] ] ] ] ifelse (Model-type = "quorum sensing") and (pcolor = orange) and (age = col3-doublingt)[ ifelse (pcolor = orange) and (age = col3-doublingt) and (quorum_col3 > 5) [ if random-float 40 < col3-replication [ set birth-tick ticks set age 0 set quorum_col3 0 ask neighbors4 [ set pcolor orange set birth-tick ticks set age 0 ] ] ] [ifelse (pcolor = orange) and (age = col3-doublingt) and (quorum_col3 < 5) [ if random-float 150 < col3-replication [ set birth-tick ticks set age 0 set quorum_col3 0 ask neighbors4 [ set pcolor orange set birth-tick ticks set age 0 ] ] ] [if (pcolor = orange) and (age = col3-doublingt) and (quorum_col3 < quorum_col2) [ ifelse random-float 140 < col3-replication [ set birth-tick ticks set age 0 ask neighbors4 [ set pcolor orange set birth-tick ticks set age 0 set quorum_col3 0 ] ] [set pcolor blue ask neighbors4 [ set pcolor blue set birth-tick ticks set age 0 set quorum_col3 0 set quorum_col2 1 ] ] ] ] ] ] [if (Model-type = "dark microbiome") or (Model-type = "solar model") and (pcolor = orange) and (age = col3-doublingt)[ if random-float 100 < col3-replication [ set birth-tick ticks set age 0 ask neighbors4 [ set pcolor orange set birth-tick ticks set age 0 ] ] ] ] ] end to UV-recovery ask self [ if (pcolor = brown) and (age >= 5) [ if random-float 20 < 10 [ set pcolor [pcolor] of one-of neighbors4 set damage 0 ] if pcolor = cyan [ ask patches in-radius electrosphere [ set damage 0 ] ] ] ] end to col ask self [ if age > 100 [ set pcolor white ] ] end to death ask self [ if (age >= death-age-def3) and (pcolor = one-of [blue orange green cyan]) [set pcolor [black] of myself] if Model-type = "solar model" [ if (damage > green-damage-threshold) and (pcolor = green) [set pcolor brown set damage 0 ] if (damage > orange-damage-threshold) and (pcolor = orange) [set pcolor brown set damage 0 ] if (damage > blue-damage-threshold) and (pcolor = blue) [set pcolor brown set damage 0 ] ] ] end to-report colony-orange report patches with [pcolor = orange] end to-report colony-blue report patches with [pcolor = blue] end to-report colony-green report patches with [pcolor = green] end to-report thanos report patches with [pcolor = black] end to-report age-check report patches with [age > 3] end
There are 4 versions of this model.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Skin microbiome and Shine coli.png | preview | Preview for 'Skin microbiome and Shine coli' | almost 4 years ago, by Caius Gibeily | Download |
This model does not have any ancestors.
This model does not have any descendants.