Celiaquía - Food Manipulation

Celiaquía - Food Manipulation preview image

1 collaborator

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.3.0 • Viewed 279 times • Downloaded 26 times • Run 0 times
Download the 'Celiaquía - Food Manipulation' 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

patches-own [harinas]
turtles-own [contaminacion]

to setup
  clear-all
  ;;armo 3 mesas
  create-turtles 1 [
    ifelse mesas = "juntas"
    [
    ;;harina
    dibujamesas 5 0 black
    ]
    [;;harina
     dibujamesas 5 -10 black
    ]
    ;;carne
    dibujamesas -3 0 red
    ;;vegetales
    dibujamesas -11 0 green
    die
  ]
  ask patches [
    set pcolor white
    ;;cargo el valor de la harina
    ifelse mesas = "juntas"
      [ if pxcor >= 5 and pxcor <= 11 and pycor >= 0 and pycor <= 3
          [set pcolor yellow
          set harinas 50]
      ]
      [if pxcor >= 5 and pxcor <= 11 and pycor >= -10 and pycor <= -7
          [set pcolor yellow
          set harinas 50]
      ]
  ]
  if cocinero = true
    [create-turtles 1
      [setxy 0 -4
        set shape "person"
        set color pink
      ]
    ]
  reset-ticks
end 

to go
  ifelse cocinero = true
    [if mesas = "separadas"
      [user-message (word "solo funciona con mesas juntas")
      stop]
      ask turtles
         [
         ;;harinas
         setxy (5 + random  6) (random 4)
         set contaminacion 50
         ask patch-here [set harinas harinas - 1]
         ;; carnes
         setxy (-3 + random 7) (random 4)
         ask patch-here [set harinas harinas + 1
                         set pcolor yellow]
         set contaminacion contaminacion - 1
         ;;verduras
         setxy (-5 + random -7) (random 4)
         ask patch-here [set harinas harinas + 1
                         set pcolor yellow]
         set contaminacion contaminacion - 1
         ]
    ]
    [;;difunde las harinas a 1%
     diffuse harinas 1
     ask patches [
         set pcolor scale-color yellow harinas 10 0]
  ]
  tick
end 

to dibujamesas [x y colores]
    set color colores
    setxy x y
    set pen-mode "down"
    set heading 90
    forward 6
    set heading 0
    forward 3
    set heading 270
    forward 6
    set heading 180
    forward 3
    set pen-mode "up"
end 

There is only one version of this model, created almost 2 years ago by Diego Díaz Córdova.

Attached files

File Type Description Last updated
Celiaquía - Food Manipulation.png preview Preview for 'Celiaquía - Food Manipulation' almost 2 years ago, by Diego Díaz Córdova Download

This model does not have any ancestors.

This model does not have any descendants.