Decay of teeth

Decay of teeth preview image

1 collaborator

Gurca_andrei Gurca Andrei (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.4.0 • Viewed 248 times • Downloaded 13 times • Run 0 times
Download the 'Decay of teeth' 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 [

]

breed [teeth tooth]
teeth-own [
  health-level ; nivelul de sănătate al dintelui
]

to setup
  clear-all
  ask patches [ set pcolor black ]  ; Setează culoarea fundalului la roșu
  set decay-rate 2               ; Setare inițială pentru rata de degradare
  set carie-probability 2        ; Setare inițială pentru probabilitatea de carie
  set genetic-factor false       ; Inițial, genetica este setată ca fiind rea
  set hygiene-level 100           ; Nivelul de igienă este setat la jumătate
  create-teeth 32 [              ; 32 de dinți
    setxy -8 + (who mod 16) * 1.1 (floor (who / 16) * 4 - 2)  ; Distribuția pe două rânduri
    set-dental-shape
    set size 1.5
    set color white  ; Inițializare la alb
    set health-level 100
  ]

  ; Selectează aleatoriu dinții care vor fi artificiali
  let artificial-teeth n-of artificial-teeth-count teeth
  ask artificial-teeth [ set color sky ]

  reset-ticks
end 

to set-dental-shape
  let pos who mod 16
  ifelse pos < 2 or pos >= 14 [
    set shape "masea"
  ] [
    ifelse pos = 5 or pos = 10 [
      set shape "sharpteeth"
    ] [
      ifelse pos < 5 or pos > 10 [
        set shape "masea"
        set size 2

      ] [
        set shape "teeth"
        set size 1.5
      ]
    ]
  ]
end 

to go
  if not any? teeth [ stop ]
  ask teeth [
    decay
    display-health
  ]
  tick
end 

to decay
  ask teeth with [color != sky] [
    if random-float 100 < carie-probability [
      let base-decay decay-rate + random 10
      let hygiene-modifier (hygiene-level / 100) * 5
      let decay-modifier base-decay - hygiene-modifier

      if genetic-factor [
        set decay-modifier decay-modifier * 0.5
      ]

      set health-level health-level - decay-modifier
      set color scale-color yellow health-level 0 100
    ]
  ]
end 

to display-health
  if health-level < 50 [
    set size 1.2
  ]
end 

There is only one version of this model, created over 1 year ago by Gurca Andrei.

Attached files

File Type Description Last updated
Decay of teeth.png preview Preview for 'Decay of teeth' over 1 year ago, by Gurca Andrei Download

This model does not have any ancestors.

This model does not have any descendants.