MIHS-18 Period 6 Ethan T, Brian P
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
Cellular Infections, v0.5
Our model simulates cellular virus infections and an organism's nonspecific immune response to the viral infection. The blue circles represent macrophages which destroy the viruses when within a certain radius. The green patches represents healthy, non-infected cells that regularly divide. The red patches represents infected cells that fail to divide and eventually die, in the process releasing several viruses. Once as virus infects a healthy cell, the color of the patch/cell turns red, and a certain number of reproduced viruses come out of the infected cell (this value can be adjusted by the viruses-produced-after-infection).
HOW IT WORKS
Viruses and phagocytic cells diffuse randomly throughout the environment. Healthy cells, after spending enough time alive, continuously look for unpopulated, adjacent squares to divide into. Viruses infect cells they come into contact with, disappearing in the process. Infected cells do not divide, but have a separate timer running down while infected until they lyse into new virus particles, which then diffuse and infect more healthy cells. When viruses enter a certain radius of phagocytic cells, they die. Antibodies are not currently implemented. Phagocytic cells currently do not target or otherwise move towards viruses.
HOW TO USE IT
Press Setup, and then press go. Alter the initial number of immune cells, viruses, viruses produced per infected cell, and cell division and death speeds by moving the sliders.
EXTENDING THE MODEL
Implement antibodies properly. Divide immune cells. Add more types of immune cells.
Comments and Questions
globals [ max-viruses ] turtles-own [ mass ;; affects diffusion speeds ] patches-own [ is-Cell? ;; virus reproduction site is-Infected? pDeathTimer ;; time until death and release of viruses pDivideTimer ;; time until division into neighboring non-cell patch ] breed [Macrophages Macrophage] breed [Viruses Virus] breed [Antibodies Antibody] Antibodies-own [ connected-VirusA? connected-VirusB? connected-VirusC? connected-VirusD? ] Macrophages-own [ activatedEnergy divideTimer ] to setup clear-all resize-world -25 25 -25 25 set-patch-size 8 set max-viruses 1000 ask patches [ set is-Cell? false set is-Infected? false ] make-cells -20 -20 make-cells 20 15 create-Macrophages initial-number-Macrophages [ set shape "circle" set color blue set size 5 set mass 30 set activatedEnergy 0 set divideTimer 100 setxy random-xcor random-ycor ] create-Viruses initial-number-Viruses [ set shape "default" set color white set size 1 set mass 10 setxy random-xcor random-ycor ] create-Antibodies initial-number-Antibodies [ set shape "pentagon" set color yellow set size 1 set mass 1 setxy random-xcor random-ycor ] reset-ticks end to move set heading random 360 forward 2 / mass end to go ask Macrophages [ eat-viruses move ] ask Antibodies [ move ] ask patches [ lyse divide ] ask Viruses [ move infect-cell ] tick end to infect-cell if [is-Cell?] of patch-here and not [is-Infected?] of patch-here [ ;; if healthy ask patch-here [ set is-Infected? true set pColor red ] die ] end to make-cells [x y] ask patches [ if (distancexy x y) <= 5 [ spawn-cell pxcor pycor ] ] end to spawn-cell [x y] ask patch x y [ set pcolor green set is-Cell? true set pDivideTimer cell-division-speed + random cell-division-speed / 3 - random cell-division-speed / 3 set pDeathTimer cell-death-speed + random cell-death-speed / 3 - random cell-death-speed / 3 ] end to divide if is-Cell? and not is-Infected? [ ;; if healthy ifelse pDivideTimer <= 0 and (any? neighbors with [pcolor = black]) [ let cellPatch one-of neighbors with [pcolor = black] spawn-cell [pxcor] of cellPatch [pycor] of cellPatch spawn-cell pxcor pycor ] [ set pDivideTimer pDivideTimer - 1 ] ] end to lyse if is-Cell? and is-Infected? [ ifelse pDeathTimer <= 0 [ set is-Cell? not is-Cell? set is-Infected? not is-Infected? set pcolor black if count Viruses < max-viruses [ sprout-Viruses viruses-produced-after-infection [ set shape "default" set color white set size 1 set mass 10 setxy pxcor pycor ] ] ] [ set pDeathTimer pDeathTimer - 1 ] ] end to eat-viruses ask Viruses in-radius 5 [die] end
There is only one version of this model, created over 6 years ago by Ethan Torok.
Attached files
No files
This model does not have any ancestors.
This model does not have any descendants.