Simulacion CGSM Bacterias mangles iguanas

Simulacion CGSM Bacterias mangles iguanas preview image

1 collaborator

Default-person Santiago Ospina (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 5 times • Downloaded 0 times • Run 0 times
Download the 'Simulacion CGSM Bacterias mangles iguanas' 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

; Simulación multiescalar en CGSM (Ciénaga Grande de Santa Marta)
; Fase Micro → Meso → Macro con continuidad ecológica y relacional entre agentes
; Información basada en ecología real de bacterias del suelo, manglares e impacto de herbívoros

breed [bacterias bacteria]
breed [mangles mangle]
breed [iguanas iguana]

patches-own [nutrientes]
mangles-own [salud expansion]
bacterias-own [simbiotica]

; ========== SETUP GENERAL ==========

to setup
  clear-all
  ask patches [ set pcolor green set nutrientes random 10 ]

  set-default-shape bacterias "circle"
  set-default-shape mangles "tree"
  set-default-shape iguanas "turtle"

  create-mangles 15 [
    setxy random-xcor random-ycor
    set color brown
    set salud 5
    set expansion 1
  ]

  create-bacterias 80 [
    setxy random-xcor random-ycor
    set color cyan
    set size 0.7
    set simbiotica false
  ]

  reset-ticks
  repeat 500 [ go ]
end 

; ========== GO GENERAL ==========

to go
  if ticks < 50 [fase-micro]
  if ticks >= 50 and ticks < 150 [fase-meso]
  if ticks >= 150 [fase-macro]
  tick
end 

; ========== FASE MICRO: Simbiosis ==========

to fase-micro
  ask bacterias [
    let objetivo one-of mangles in-radius 6
    if objetivo != nobody and simbiotica = false [
      face objetivo
      rt random 10 - random 10
      fd 1.5
      if distance objetivo < 1 [
        set color yellow
        set simbiotica true
        ask objetivo [ set salud salud + 1 ]
      ]
    ]
  ]
end 

; ========== FASE MESO: Expansión vegetal ==========

to fase-meso
  ask mangles [
    if salud > 6 [ set expansion expansion + 0.03 ]
    let nearby-patch one-of patches in-radius expansion
    if nearby-patch != nobody and not any? mangles-on nearby-patch [
      ask nearby-patch [
        sprout 1 [
          set breed mangles
          set color brown
          set salud 5
          set expansion 1
        ]
      ]
    ]
  ]
end 

; ========== FASE MACRO: Herbivoría de iguanas ==========

to fase-macro
  if ticks = 150 [
    create-iguanas 10 [
      setxy random-xcor random-ycor
      set color lime
    ]
  ]

  ask iguanas [
    let objetivo one-of mangles in-radius 2
    if objetivo != nobody [
      face objetivo
      fd 1
      ask objetivo [
        set salud salud - 1
        if salud <= 0 [ die ]
      ]
    ]
  ]
end 

There is only one version of this model, created 4 days ago by Santiago Ospina.

Attached files

File Type Description Last updated
Simulacion CGSM Bacterias mangles iguanas.png preview Preview for 'Simulacion CGSM Bacterias mangles iguanas' 4 days ago, by Santiago Ospina Download

This model does not have any ancestors.

This model does not have any descendants.