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 7 times • Downloaded 0 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.)


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 11 days ago by Gurca Andrei.

Attached files

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

This model does not have any ancestors.

This model does not have any descendants.