Virus Level Test 1

No preview image

2 collaborators

Default-person Andrew Motz (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by the author
Model was written in NetLogo 5.2.1 • Viewed 311 times • Downloaded 48 times • Run 0 times
Download the 'Virus Level Test 1' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


WHAT IS IT?

(a general understanding of what the model is trying to show or explain)

HOW IT WORKS

(what rules the agents use to create the overall behavior of the model)

HOW TO USE IT

(how to use the model, including a description of each of the items in the Interface tab)

THINGS TO NOTICE

(suggested things for the user to notice while running the model)

THINGS TO TRY

(suggested things for the user to try to do (move sliders, switches, etc.) with the model)

EXTENDING THE MODEL

(suggested things to add or change in the Code tab to make the model more complicated, detailed, accurate, etc.)

NETLOGO FEATURES

(interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features)

RELATED MODELS

(models in the NetLogo Models Library and elsewhere which are of related interest)

CREDITS AND REFERENCES

(a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links)

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

globals [ virus-score infect-var cure-var kill-num kill-var erad?]
patches-own [ virus-per ]

to setup
  clear-all
  ask patches [ set pcolor 9.9 ]
  set virus-score 0
  set erad? false
  reset-ticks
end 

to go
  set infect-var random (250 / infectability)
  if cureability != 0 [
    set cure-var random (300 / Cureability)
    if virus-score > 23 [
    cure-virus
    ]
  ]
  set kill-num mortality
  set kill-var random 5
  virus-infect
  if virus-score < 0 [
    set virus-score 0
  ]
  kill-peep
  if virus-score = 0 [
    set erad? true
  ]
  tick
end 

to virus-infect
  if (infect-var = 1) or (infect-var = 2) [
    set virus-score virus-score + 24
  ]
end 

to cure-virus
  if (cure-var = 1) [
    set virus-score virus-score - (random 25 + 40)
  ]
end 

to kill-peep
  if (kill-var = 2) or (kill-var = 1) [
    if virus-score > 5000 [
      set virus-score (virus-score - (9 * kill-num))
    ]
    if virus-score > 3000 [
      set virus-score virus-score - (6 * kill-num)
     ]
    if virus-score > 1500 [
        set virus-score (virus-score - 4 * kill-num)
     ]
    if virus-score > 140 [
        set virus-score (virus-score - 3 * kill-num)

    ]
  ]
end 




There are 2 versions of this model.

Uploaded by When Description Download
Andrew Motz over 8 years ago Update Download this version
Andrew Motz over 8 years ago Initial upload Download this version

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.