Macrophage Polarization at a Wound Site

No preview image

1 collaborator

Img_1313_lara_boman_(1) Lara Boman (Author)

Tags

有用 

Tagged by 于 伟威 almost 2 years ago

Visible to everyone | Changeable by everyone
Model was written in NetLogo 5.3.1 • Viewed 215 times • Downloaded 15 times • Run 0 times
Download the 'Macrophage Polarization at a Wound Site' modelDownload this modelEmbed this model

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

breed [m0s m0]
breed [m1s m1]
breed [m2s m2]

globals [elongation]
patches-own [IL-10 TNFa IL-1]

to setup
  clear-all
  setup-patches
  setup-macrophages
  reset-ticks
end 

to setup-patches
   ask patches [set pcolor 18.5]
   ask patches [set IL-10 0.1]
   ask patches [set TNFa 0.1]
   ask patches [set IL-1 0.1]
end 

to setup-macrophages
  create-m0s initm0 [set color black set shape "egg" setxy random-xcor random-ycor]
  create-m1s initm1 [set color 105 set shape "m1" setxy random-xcor random-ycor]
  create-m2s initm2 [set color 64 set shape "m2" setxy random-xcor random-ycor]
end 

to go
  ask turtles
  [rt random-float 10 - random-float 10
    fd 0.3]
  ask turtles [m0m1 m0m2 m1m2 m0death m1death m2death m2m2 m0m0]
  ask patches [protein]
  ask turtles [mprotein]
  setelongation
  ask turtles [elongate]
  tick  ;; tick = 1 day
end 

to m0m1
  if (any? m0s-here) and random-float 1000 < 611
  [ask m0s-here
    [set breed m1s
      set color 105 set shape "m1"]]
end 

to m0m2
  if (any? m0s-here) and random-float 1000 < 83.6
  [ask m0s-here
   [set breed m2s
   set color 64 set shape "m2"]]
end 

to m1m2
  if (any? m1s-here) and random-float 1000 < 84.6
  [ask m1s-here
    [set breed m2s
      set color 64 set shape "m2"]]
end 

to m2m2
  if (any? m2s-here) and random-float 1000 < 85.3
  [ask m2s-here
    [hatch-m2s 1
    set color 64 set shape "m2"]]
end 

to m0death
  if (any? m0s-here) and random-float 1000 < 156
  [ask m0s-here [die]]
end 

to m1death
  if (any? m1s-here) and random-float 1000 < 121
  [ask m1s-here [die]]
end 

to m2death
  if (any? m2s-here) and random-float 1000 < 163
  [ask m2s-here [die]]
end 

to m0m0
  if (any? m0s-here) and random-float 1000 < 15
  [hatch-m0s 1
    set color black set shape "egg"]
  if (any? m1s-here) and random-float 1000 < 15
  [hatch-m0s 1
    set color black set shape "egg"]
  if (any? m2s-here) and random-float 1000 < 15
  [hatch-m0s 1
    set color black set shape "egg"]
end 

to protein
  if (any? m2s-here)
  [set IL-10 (IL-10 + 0.0005)]
  if (any? m1s-here)
  [set TNFa (TNFa + 0.0007)
    set IL-1 (IL-1 + 0.0005)]
  ;; need to add in decreases
end 

to mprotein
  if (any? m0s-here) and random-float 1000 < (100 * (IL-1 / (IL-1 + 10)))
  [ask m0s-here
    [set breed m1s
      set color 105 set shape "m1"]]
  if (any? m0s-here) and random-float 1000 < (1000 * (TNFa / (TNFa + 10)))
  [ask m0s-here
    [set breed m1s
      set color 105 set shape "m1"]]
  if (any? m0s-here) and random-float 1000 < (300 * (IL-10 / (IL-10 + 5)))
  [ask m0s-here
    [set breed m2s
      set color 64 set shape "m2"]]
end 

to setelongation
  if surface >= 20 and surface < 24
  [set elongation 9]
  if surface >= 24 and surface < 28
  [set elongation 8]
  if surface >= 28 and surface < 32
  [set elongation 7]
  if surface >= 32 and surface < 38
  [set elongation 6]
  if surface >= 38 and surface < 42
  [set elongation 5]
  if surface >= 42 and surface < 46
  [set elongation 4]
  if surface >= 46 and surface <= 50
  [set elongation 3]
end 

to elongate
  if elongation = 3 and (any? turtles-here)
  [ask turtles-here
    [set breed m1s
      set color 105 set shape "m1"]]
  if elongation = 4 and (any? turtles-here) and random-float 1000 < 666
  [ask turtles-here
    [set breed m1s
      set color 105 set shape "m1"]]
  if elongation = 5 and (any? turtles-here) and random-float 1000 < 333
  [ask turtles-here
    [set breed m1s
      set color 105 set shape "m1"]]
  ; elongation = 6 results in no change
  if elongation = 7 and (any? turtles-here) and random-float 1000 < 333
  [ask turtles-here
    [set breed m2s
      set color 64 set shape "m2"]]
  if elongation = 8 and (any? turtles-here) and random-float 1000 < 666
  [ask turtles-here
    [set breed m2s
      set color 64 set shape "m2"]]
  if elongation = 9 and (any? turtles-here)
  [ask turtles-here
    [set breed m2s
      set color 64 set shape "m2"]]
end 

There is only one version of this model, created over 7 years ago by Lara Boman.

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.