Uso de Barbijos

Uso de Barbijos preview image

This model is seeking new collaborators — would you please help?

1 collaborator

Tags

barbijos, mascaras, covid19 

Tagged by Diego Díaz Córdova over 3 years ago

Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.1.1 • Viewed 274 times • Downloaded 24 times • Run 0 times
Download the 'Uso de Barbijos' 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

turtles-own [
contagio?
barbijo?]

to setup
  ca ;;abreviatura de clear-all
  crt cantortu ;; abreviatura de create-turtles
  ask turtles [set shape "person"
  setxy random-xcor random-ycor
  ifelse random-float 100 < infectiousness
    [set contagio? true
    ]
    [set contagio? false
    ]
  ifelse random-float 100 < usodebarbijo
    [set barbijo? true
    ]
    [set barbijo? false
    ]
    colorean
  ]
  reset-ticks
end 

to go
  ask turtles[
  secontagian
  colorean
  move]
  if count turtles with [contagio? = true] = cantortu
      [stop]
  tick
end 

to move
 set heading random 360
              fd 1
end 

to secontagian
  ask other turtles-here with [ contagio?]
    [
      ;tiene mi vecino barbijo?
      ifelse barbijo?
      [
      ask myself
        [
        ;tengo yo barbijo?
        ifelse barbijo?
        [if precision ( random-float 1.0 ) 3 < 0.001
            [set contagio? true]
          ]
        [if precision ( random-float 1.0 ) 2 < 0.4
            [set contagio? true]
          ]
        colorean
        ]
      ]
      [ask myself
        [
        ;tengo yo barbijo?
        ifelse barbijo?
        [if precision ( random-float 1.0 ) 2 < 0.4
            [set contagio? true]
          ]
        [if precision ( random-float 1.0 ) 2 < 0.9
            [set contagio? true]
          ]
        colorean
        ]
      ]
    ]
  ;;with [(contagio? = true) AND (barbijo? = false)]
end 

to colorean
  ifelse contagio?
  [set color red]
  [set color blue]
end 

There are 3 versions of this model.

Uploaded by When Description Download
Diego Díaz Córdova over 3 years ago corregido error de zip Download this version
Diego Díaz Córdova over 3 years ago Uso de barbijos con arreglo en info tab Download this version
Diego Díaz Córdova over 3 years ago Initial upload Download this version

Attached files

File Type Description Last updated
Uso de Barbijos.png preview barbijo2 over 3 years ago, by Diego Díaz Córdova Download

This model does not have any ancestors.

This model does not have any descendants.