imaxinariaenrede_1

imaxinariaenrede_1 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 5.0.5 • Viewed 153 times • Downloaded 8 times • Run 0 times
Download the 'imaxinariaenrede_1' 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 [
  test
  xx
  yy
  x1
  y1
  x2
  y2  
  x3
  y3
  x4
  y4
  x5
  y5
  innovacion1
  innovacion2
  innovacion3
  innovacion4
  innovacion5
]
;NODOS
breed [nodos nodo]
breed [halos halo]
;TERRITORIO
patches-own [agro vivienda taller laboratorio escenico cultural agro? vivienda? taller? laboratorio? escenico? cultural? nodeable]
;AGENTES
breed [ciudadanos-i ciudadano-i]
breed [locales local]
breed [expertos experto]
breed [visitantes visitante]
;RECURSOS
breed [economicos economico]
breed [hardwares hardware]
breed [aplicaciones aplicacion]
breed [objetosculturales objetocultural]
breed [materiales aplicacion]

;PROPIEDADES INTERNAS
nodos-own [nciudadano-i nlocal nexperto nvisitante neconomico nhardware naplicacion nobjetocultural nmaterial territorio agentes recursos]
turtles-own [tipo meses]

;LINKS
undirected-link-breed [relacionesinternas relacioninterna]
undirected-link-breed [relacionesexternas relacionexterna]
relacionesinternas-own [nodolink? vidarelacioninterna]

to apuntar
    if mouse-down? [
      set xx round mouse-xcor
      set yy round mouse-ycor
    ]
    if nodo? = "alga"[
    set x1 xx
    set y1 yy
    ]
    if nodo? = "colorida"[
    set x2 xx
    set y2 yy
  ]
    if nodo? = "axouxere"[
    set x3 xx
    set y3 yy
  ]
    if nodo? = "ucv"[
    set x4 xx
    set y4 yy
  ]
    if nodo? = "sede"[
    set x5 xx
    set y5 yy
  ]
end 

to pintarprueba
  ca
  ask one-of patches [set pcolor blue]
  ask one-of patches [set pcolor red]
end 

to posicion
  ask patches with [pcolor = blue] [set x1 pxcor]
  ask patches with [pcolor = blue] [set y1 pycor]
  ask patches with [pcolor = red] [set x2 pxcor]
  ask patches with [pcolor = red] [set y2 pycor]
end 

to setup
;  ask patches [set pcolor white]
  set innovacion1 0
  set innovacion2 0
  set innovacion3 0
  set innovacion4 0
  set innovacion5 0
  set test[
    [3 5 4 2 3 4 1 1 5 2 3 2 1 2 4]
    [2 2 5 2 1 3 3 2 2 5 3 1 4 1 4]
    [2 5 4 5 3 4 1 3 5 2 1 2 2 2 3]
    [1 2 5 2 2 3 3 2 4 5 3 4 3 4 4]
    [3 2 4 2 4 3 5 3 5 4 3 2 5 2 2]
  ]
  let colors [green blue red yellow orange violet] 
  crt 1 [
    set breed nodos
    setxy x1 y1
    set shape "nodo"
    set tipo 0
    set size 5
    set color color1
    set meses 0
    hatch 1 [
    set breed halos
    set shape "halo"
    set size 25
    ask patches in-radius (13) [set nodeable 1]
    ]
    set agro item 0 item tipo test
    set vivienda item 1 item tipo test
    set taller item 2 item tipo test
    set laboratorio item 3 item tipo test
    set escenico item 4 item tipo test
    set cultural item 5 item tipo test
    set nciudadano-i item 6 item tipo test
    set nlocal item 7 item tipo test
    set nexperto item 8 item tipo test
    set nvisitante item 9 item tipo test
    set neconomico item 10 item tipo test
    set nhardware item 11 item tipo test
    set naplicacion item 12 item tipo test
    set nobjetocultural item 13 item tipo test
    set nmaterial item 14 item tipo test
    ask n-of agro patches in-radius (2 + 1)[
      set pcolor green
      set agro? 1]
    ask n-of vivienda patches in-radius (2 + 3) [
      set pcolor blue
      set vivienda? 1]
    ask n-of taller patches in-radius (2 + 5) [
      set pcolor red
      set taller? 1]
    ask n-of laboratorio patches in-radius (2 + 7) [
      set pcolor yellow
      set laboratorio? 1]
    ask n-of escenico patches in-radius (2 + 9) [
      set pcolor orange
      set escenico? 1]
    ask n-of cultural patches in-radius (2 + 11) [
      set pcolor violet
      set cultural? 1]
    hatch nciudadano-i [
      set breed ciudadanos-i
      setxy (x1 + random-float 3) (y1 + random-float 2)
      set shape "ciudadano-i"
      set size 2
      rt random 360
    ]
    hatch nlocal [
      set breed locales
      setxy (x1 + ((random-float  2) + 1)) (y1 + ((random-float  2) + 1))
      set shape "local"
      set size 2
      rt random 360
    ]
    hatch nexperto [
      set breed expertos
      setxy (x1 + ((random-float -2) + 2)) (y1 + ((random-float -2) + 2))
      set shape "experto"
      set size 2
      rt random 360
    ]
    hatch nvisitante [
      set breed visitantes
      setxy (x1 + ((random-float -2) + 2)) (y1 + ((random-float 2) + 2))
      set shape "visitante"
      set size 2
      rt random 360
    ]
    hatch neconomico [
      set breed economicos
      setxy (x1 + ((random-float -2) + 2)) (y1 + ((random-float -2) + 2))
      set shape "economico"
      set size 2
      rt random 360
    ]
    hatch nhardware [
      set breed hardwares
      setxy (x1 + ((random-float -2) + 2)) (y1 + ((random-float -2) + 2))
      set shape "hardware"
      set size 2
    ]
    hatch naplicacion [
      set breed expertos
      setxy (x1 + ((random-float -2) + 2)) (y1 + ((random-float -2) + 2))
      set shape "aplicacion"
      set size 2
      rt random 360
    ]
    hatch nobjetocultural [
      set breed objetosculturales
      setxy (x1 + ((random-float -2) + 2)) (y1 + ((random-float -2) + 2))
      set shape "objetocultural"
      set size 2
      rt random 360
    ]
    hatch nmaterial [
      set breed materiales
      setxy (x1 + ((random-float -2) + 2)) (y1 + ((random-float -2) + 2))
      set shape "material"
      set size 2
      rt random 360
    ]
  ]
  crt 1 [
    set breed nodos
    setxy x2 y2
    set shape "nodo"
    set tipo 1
    set size 5
    set color color2
    set meses 0
    hatch 1 [
    set breed halos
    set shape "halo"
    set size 25
    ask patches in-radius (13) [set nodeable 1]
    ]
    set agro item 0 item tipo test
    set vivienda item 1 item tipo test
    set taller item 2 item tipo test
    set laboratorio item 3 item tipo test
    set escenico item 4 item tipo test
    set cultural item 5 item tipo test
    set nciudadano-i item 6 item tipo test
    set nlocal item 7 item tipo test
    set nexperto item 8 item tipo test
    set nvisitante item 9 item tipo test
    set neconomico item 10 item tipo test
    set nhardware item 11 item tipo test
    set naplicacion item 12 item tipo test
    set nobjetocultural item 13 item tipo test
    ask n-of agro patches in-radius (2 + 1)[
      set pcolor green
      set agro? 2]
    ask n-of vivienda patches in-radius (2 + 3) [
      set pcolor blue
      set vivienda? 2]
    ask n-of taller patches in-radius (2 + 5) [
      set pcolor red
      set taller? 2]
    ask n-of laboratorio patches in-radius (2 + 7) [
      set pcolor yellow
      set laboratorio? 2]
    ask n-of escenico patches in-radius (2 + 9) [
      set pcolor orange
      set escenico? 2]
    ask n-of cultural patches in-radius (2 + 11) [
      set pcolor violet
      set cultural? 2]
    hatch nciudadano-i [
      set breed ciudadanos-i
      setxy (x2 + random-float 3) (y2 + random-float 2)
      set shape "ciudadano-i"
      set size 2
      rt random 360
    ]
    hatch nlocal [
      set breed locales
      setxy (x2 + ((random-float  2) + 1)) (y2 + ((random-float  2) + 1))
      set shape "local"
      set size 2
      rt random 360
    ]
    hatch nexperto [
      set breed expertos
      setxy (x2 + ((random-float -2) + 2)) (y2 + ((random-float -2) + 2))
      set shape "experto"
      set size 2
      rt random 360
    ]
    hatch nvisitante [
      set breed visitantes
      setxy (x2 + ((random-float -2) + 2)) (y2 + ((random-float 2) + 2))
      set shape "visitante"
      set size 2
      rt random 360
    ]
    hatch neconomico [
      set breed economicos
      setxy (x2 + ((random-float -2) + 2)) (y2 + ((random-float -2) + 2))
      set shape "economico"
      set size 2
      rt random 360
    ]
    hatch nhardware [
      set breed hardwares
      setxy (x2 + ((random-float -2) + 2)) (y2 + ((random-float -2) + 2))
      set shape "hardware"
      set size 2
    ]
    hatch naplicacion [
      set breed expertos
      setxy (x2 + ((random-float -2) + 2)) (y2 + ((random-float -2) + 2))
      set shape "aplicacion"
      set size 2
      rt random 360
    ]
    hatch nobjetocultural [
      set breed objetosculturales
      setxy (x2 + ((random-float -2) + 2)) (y2 + ((random-float -2) + 2))
      set shape "objetocultural"
      set size 2
      rt random 360
    ]
    hatch nmaterial [
      set breed materiales
      setxy (x2 + ((random-float -2) + 2)) (y2 + ((random-float -2) + 2))
      set shape "material"
      set size 2
      rt random 360
    ]
  ]
    crt 1 [
    set breed nodos
    setxy x3 y3
    set shape "nodo"
    set tipo 2
    set size 5
    set color color3
    set meses 0
    hatch 1 [
    set breed halos
    set shape "halo"
    set size 25
    ask patches in-radius (13) [set nodeable 1]
    ]
    set agro item 0 item tipo test
    set vivienda item 1 item tipo test
    set taller item 2 item tipo test
    set laboratorio item 3 item tipo test
    set escenico item 4 item tipo test
    set cultural item 5 item tipo test
    set nciudadano-i item 6 item tipo test
    set nlocal item 7 item tipo test
    set nexperto item 8 item tipo test
    set nvisitante item 9 item tipo test
    set neconomico item 10 item tipo test
    set nhardware item 11 item tipo test
    set naplicacion item 12 item tipo test
    set nobjetocultural item 13 item tipo test
    ask n-of agro patches in-radius (2 + 1)[
      set pcolor green
      set agro? 3]
    ask n-of vivienda patches in-radius (2 + 3) [
      set pcolor blue
      set vivienda? 3]
    ask n-of taller patches in-radius (2 + 5) [
      set pcolor red
      set taller? 3]
    ask n-of laboratorio patches in-radius (2 + 7) [
      set pcolor yellow
      set laboratorio? 3]
    ask n-of escenico patches in-radius (2 + 9) [
      set pcolor orange
      set escenico? 3]
    ask n-of cultural patches in-radius (2 + 11) [
      set pcolor violet
      set cultural? 3]
    hatch nciudadano-i [
      set breed ciudadanos-i
      setxy (x3 + random-float 3) (y3 + random-float 2)
      set shape "ciudadano-i"
      set size 2
      rt random 360
    ]
    hatch nlocal [
      set breed locales
      setxy (x3 + ((random-float  2) + 1)) (y3 + ((random-float  2) + 1))
      set shape "local"
      set size 2
      rt random 360
    ]
    hatch nexperto [
      set breed expertos
      setxy (x3 + ((random-float -2) + 2)) (y3 + ((random-float -2) + 2))
      set shape "experto"
      set size 2
      rt random 360
    ]
    hatch nvisitante [
      set breed visitantes
      setxy (x3 + ((random-float -2) + 2)) (y3 + ((random-float 2) + 2))
      set shape "visitante"
      set size 2
      rt random 360
    ]
    hatch neconomico [
      set breed economicos
      setxy (x3 + ((random-float -2) + 2)) (y3 + ((random-float -2) + 2))
      set shape "economico"
      set size 2
      rt random 360
    ]
    hatch nhardware [
      set breed hardwares
      setxy (x3 + ((random-float -2) + 2)) (y3 + ((random-float -2) + 2))
      set shape "hardware"
      set size 2
    ]
    hatch naplicacion [
      set breed expertos
      setxy (x3 + ((random-float -2) + 2)) (y3 + ((random-float -2) + 2))
      set shape "aplicacion"
      set size 2
      rt random 360
    ]
    hatch nobjetocultural [
      set breed objetosculturales
      setxy (x3 + ((random-float -2) + 2)) (y3 + ((random-float -2) + 2))
      set shape "objetocultural"
      set size 2
      rt random 360
    ]
    hatch nmaterial [
      set breed materiales
      setxy (x3 + ((random-float -2) + 2)) (y3 + ((random-float -2) + 2))
      set shape "material"
      set size 2
      rt random 360
    ]
  ]
    crt 1 [
    set breed nodos
    setxy x4 y4
    set shape "nodo"
    set tipo 3
    set size 5
    set color color4
    set meses 0
    hatch 1 [
    set breed halos
    set shape "halo"
    set size 25
    ask patches in-radius (13) [set nodeable 1]
    ]
    set agro item 0 item tipo test
    set vivienda item 1 item tipo test
    set taller item 2 item tipo test
    set laboratorio item 3 item tipo test
    set escenico item 4 item tipo test
    set cultural item 5 item tipo test
    set nciudadano-i item 6 item tipo test
    set nlocal item 7 item tipo test
    set nexperto item 8 item tipo test
    set nvisitante item 9 item tipo test
    set neconomico item 10 item tipo test
    set nhardware item 11 item tipo test
    set naplicacion item 12 item tipo test
    set nobjetocultural item 13 item tipo test
    ask n-of agro patches in-radius (2 + 1)[
      set pcolor green
      set agro? 4]
    ask n-of vivienda patches in-radius (2 + 3) [
      set pcolor blue
      set vivienda? 4]
    ask n-of taller patches in-radius (2 + 5) [
      set pcolor red
      set taller? 4]
    ask n-of laboratorio patches in-radius (2 + 7) [
      set pcolor yellow
      set laboratorio? 4]
    ask n-of escenico patches in-radius (2 + 9) [
      set pcolor orange
      set escenico? 4]
    ask n-of cultural patches in-radius (2 + 11) [
      set pcolor violet
      set cultural? 4]
    hatch nciudadano-i [
      set breed ciudadanos-i
      setxy (x4 + random-float 3) (y4 + random-float 2)
      set shape "ciudadano-i"
      set size 2
      rt random 360
    ]
    hatch nlocal [
      set breed locales
      setxy (x4 + ((random-float  2) + 1)) (y4 + ((random-float  2) + 1))
      set shape "local"
      set size 2
      rt random 360
    ]
    hatch nexperto [
      set breed expertos
      setxy (x4 + ((random-float -2) + 2)) (y4 + ((random-float -2) + 2))
      set shape "experto"
      set size 2
      rt random 360
    ]
    hatch nvisitante [
      set breed visitantes
      setxy (x4 + ((random-float -2) + 2)) (y4 + ((random-float 2) + 2))
      set shape "visitante"
      set size 2
      rt random 360
    ]
    hatch neconomico [
      set breed economicos
      setxy (x4 + ((random-float -2) + 2)) (y4 + ((random-float -2) + 2))
      set shape "economico"
      set size 2
      rt random 360
    ]
    hatch nhardware [
      set breed hardwares
      setxy (x4 + ((random-float -2) + 2)) (y4 + ((random-float -2) + 2))
      set shape "hardware"
      set size 2
    ]
    hatch naplicacion [
      set breed expertos
      setxy (x4 + ((random-float -2) + 2)) (y4 + ((random-float -2) + 2))
      set shape "aplicacion"
      set size 2
      rt random 360
    ]
    hatch nobjetocultural [
      set breed objetosculturales
      setxy (x4 + ((random-float -2) + 2)) (y4 + ((random-float -2) + 2))
      set shape "objetocultural"
      set size 2
      rt random 360
    ]
    hatch nmaterial [
      set breed materiales
      setxy (x4 + ((random-float -2) + 2)) (y4 + ((random-float -2) + 2))
      set shape "material"
      set size 2
      rt random 360
    ]
  ]
    crt 1 [
    set breed nodos
    setxy x5 y5
    set shape "nodo"
    set tipo 4
    set size 5
    set color color5
    set meses 0
    hatch 1 [
    set breed halos
    set shape "halo"
    set size 25
    ask patches in-radius (13) [set nodeable 1]
    ]
    set agro item 0 item tipo test
    set vivienda item 1 item tipo test
    set taller item 2 item tipo test
    set laboratorio item 3 item tipo test
    set escenico item 4 item tipo test
    set cultural item 5 item tipo test
    set nciudadano-i item 6 item tipo test
    set nlocal item 7 item tipo test
    set nexperto item 8 item tipo test
    set nvisitante item 9 item tipo test
    set neconomico item 10 item tipo test
    set nhardware item 11 item tipo test
    set naplicacion item 12 item tipo test
    set nobjetocultural item 13 item tipo test
    ask n-of agro patches in-radius (2 + 1)[
      set pcolor green
      set agro? 5]
    ask n-of vivienda patches in-radius (2 + 3) [
      set pcolor blue
      set vivienda? 5]
    ask n-of taller patches in-radius (2 + 5) [
      set pcolor red
      set taller? 5]
    ask n-of laboratorio patches in-radius (2 + 7) [
      set pcolor yellow
      set laboratorio? 5]
    ask n-of escenico patches in-radius (2 + 9) [
      set pcolor orange
      set escenico? 5]
    ask n-of cultural patches in-radius (2 + 11) [
      set pcolor violet
      set cultural? 5]
    hatch nciudadano-i [
      set breed ciudadanos-i
      setxy (x5 + random-float 3) (y5 + random-float 2)
      set shape "ciudadano-i"
      set size 2
      rt random 360
    ]
    hatch nlocal [
      set breed locales
      setxy (x5 + ((random-float  2) + 1)) (y5 + ((random-float  2) + 1))
      set shape "local"
      set size 2
      rt random 360
    ]
    hatch nexperto [
      set breed expertos
      setxy (x5 + ((random-float -2) + 2)) (y5 + ((random-float -2) + 2))
      set shape "experto"
      set size 2
      rt random 360
    ]
    hatch nvisitante [
      set breed visitantes
      setxy (x5 + ((random-float -2) + 2)) (y5 + ((random-float 2) + 2))
      set shape "visitante"
      set size 2
      rt random 360
    ]
    hatch neconomico [
      set breed economicos
      setxy (x5 + ((random-float -2) + 2)) (y5 + ((random-float -2) + 2))
      set shape "economico"
      set size 2
      rt random 360
    ]
    hatch nhardware [
      set breed hardwares
      setxy (x5 + ((random-float -2) + 2)) (y5 + ((random-float -2) + 2))
      set shape "hardware"
      set size 2
    ]
    hatch naplicacion [
      set breed expertos
      setxy (x5 + ((random-float -2) + 2)) (y5 + ((random-float -2) + 2))
      set shape "aplicacion"
      set size 2
      rt random 360
    ]
    hatch nobjetocultural [
      set breed objetosculturales
      setxy (x5 + ((random-float -2) + 2)) (y5 + ((random-float -2) + 2))
      set shape "objetocultural"
      set size 2
      rt random 360
    ]
    hatch nmaterial [
      set breed materiales
      setxy (x5 + ((random-float -2) + 2)) (y5 + ((random-float -2) + 2))
      set shape "material"
      set size 2
      rt random 360
    ]
  ]
  reset-ticks
end 


;to go
;  if any? nodos with [color = green] [stop]
;  let ciudadanos-i turtles with [shape = "ciudadano-i"]
;  let locales turtles with [shape = "local"]
;  let expertos turtles with [shape = "experto"]
;  ask ciudadanos-i [
;    fd 1
;    rt random 2
;    ]  
;  tick
;  update-plots
;end

;  
;end

to visualizar
  ask turtles with [shape = "ciudadano-i"] [
    set label "ciudadano-i"
  ]
end 

to ayudar
  crt ayuda-externa-cantidad[
    if (nodo? = "alga") [
      setxy x1 y1
      set size 2 
      set tipo 0]
    if (nodo? = "colorida") [
      setxy x2 y2
      set size 2 
      set tipo 1]
    if (nodo? = "axouxere") [
      setxy x3 y3
      set size 2 
      set tipo 2]
    if (nodo? = "ucv") [
      setxy x4 y4
      set size 2 
      set tipo 3]
    if (nodo? = "sede") [
      setxy x5 y5
      set size 2 
      set tipo 4]
    if (ayuda-externa = "ciudadano-i") [
    set breed ciudadanos-i
    set size 2
    set shape ayuda-externa]
    if (ayuda-externa = "experto") [
    set breed expertos
    set size 2
    set shape ayuda-externa]
    if (ayuda-externa = "local") [
    set breed locales
    set size 2
    set shape ayuda-externa]
    if (ayuda-externa = "visitante") [
    set breed visitantes
    set size 2
    set shape ayuda-externa]
    if (ayuda-externa = "economico") [
    set breed economicos
    set size 2
    set shape ayuda-externa]
    if (ayuda-externa = "hardware") [
    set breed hardwares
    set size 2
    set shape ayuda-externa]
    if (ayuda-externa = "aplicacion") [
    set breed aplicaciones
    set size 2
    set shape ayuda-externa]
    if (ayuda-externa = "objetocultural") [
    set breed objetosculturales
    set size 2
    set shape ayuda-externa]
    if (ayuda-externa = "material") [
    set breed materiales
    set size 2
    set shape ayuda-externa]
  ]
end 

to go
  if (color1 >= 55 and color2 >= 55 and color3 >= 55 and color4 >= 55 and color5 >= 55) [ stop ] 
  ask turtles  [
  movimientosinternos
  ]
  ask turtles [
    set meses meses + 1]
  ask nodos [relaciones]
;  ask links [untie]
  ask relacionesinternas [
    if vidarelacioninterna > 2 [
      die]
  ]
  if rede? [conectarredes]
  tick
  update-plots
  if  (ticks != 0) and (ticks mod fase = 0) [
      comprobarfase
      set innovacion1 0
      set innovacion2 0
      set innovacion3 0
      set innovacion4 0
      set innovacion5 0
  ]
  ask relacionesinternas [set vidarelacioninterna (vidarelacioninterna + 1)]
end 

to relaciones
  relacion1
  relacion2
  relacion3
  relacion4
  relacion5
  relacion6
  relacion7
end 

to comprobarfase
    ask nodos[
      set color1 (color1 + (innovacion1 / 2))
      set color2 (color2 + (innovacion2 / 2))
      set color3 (color3 + (innovacion3 / 2))
      set color4 (color4 + (innovacion4 / 2))
      set color5 (color5 + (innovacion5 / 2))
      ]
    ask nodos with [tipo = 0] [
      set color color1
      set territorio ((count patches in-radius 11 with [pcolor = red]) + (count patches in-radius 11 with [pcolor = yellow]) + (count patches in-radius 11 with [pcolor = green]) + (count patches in-radius 11 with [pcolor = orange]) + (count patches in-radius 11 with [pcolor = blue]))
      set agentes ((count locales with [ tipo = 0]) + (count expertos with [ tipo = 0]) + (count ciudadanos-i with [ tipo = 0]) + (count visitantes with [ tipo = 0]))
      set recursos ((count materiales with [ tipo = 0]) + (count hardwares with [ tipo = 0]) + (count economicos with [ tipo = 0]) + (count aplicaciones with [ tipo = 0])+ (count objetosculturales with [ tipo = 0]))
    ]
    ask nodos with [tipo = 1] [
      set color color2
      set territorio ((count patches in-radius 11 with [pcolor = red]) + (count patches in-radius 11 with [pcolor = yellow]) + (count patches in-radius 11 with [pcolor = green]) + (count patches in-radius 11 with [pcolor = orange]) + (count patches in-radius 11 with [pcolor = blue]))
      set agentes ((count locales with [ tipo = 1]) + (count expertos with [ tipo = 1]) + (count ciudadanos-i with [ tipo = 1]) + (count visitantes with [ tipo = 1]))
      set recursos ((count materiales with [ tipo = 1]) + (count hardwares with [ tipo = 1]) + (count economicos with [ tipo = 1]) + (count aplicaciones with [ tipo = 1])+ (count objetosculturales with [ tipo = 1]))
    ]
    ask nodos with [tipo = 2] [
      set color color3
      set territorio ((count patches in-radius 11 with [pcolor = red]) + (count patches in-radius 11 with [pcolor = yellow]) + (count patches in-radius 11 with [pcolor = green]) + (count patches in-radius 11 with [pcolor = orange]) + (count patches in-radius 11 with [pcolor = blue]))
      set agentes ((count locales with [ tipo = 2]) + (count expertos with [ tipo = 2]) + (count ciudadanos-i with [ tipo = 2]) + (count visitantes with [ tipo = 2]))
      set recursos ((count materiales with [ tipo = 2]) + (count hardwares with [ tipo = 2]) + (count economicos with [ tipo = 2]) + (count aplicaciones with [ tipo = 2])+ (count objetosculturales with [ tipo = 2]))
    ]
    ask nodos with [tipo = 3] [
      set color color4
      set territorio ((count patches in-radius 11 with [pcolor = red]) + (count patches in-radius 11 with [pcolor = yellow]) + (count patches in-radius 11 with [pcolor = green]) + (count patches in-radius 11 with [pcolor = orange]) + (count patches in-radius 11 with [pcolor = blue]))
      set agentes ((count locales with [ tipo = 3]) + (count expertos with [ tipo = 3]) + (count ciudadanos-i with [ tipo = 3]) + (count visitantes with [ tipo = 3]))
      set recursos ((count materiales with [ tipo = 3]) + (count hardwares with [ tipo = 3]) + (count economicos with [ tipo = 3]) + (count aplicaciones with [ tipo = 3])+ (count objetosculturales with [ tipo = 3]))
    ]
    ask nodos with [tipo = 4] [
      set color color5
      set territorio ((count patches in-radius 11 with [pcolor = red]) + (count patches in-radius 11 with [pcolor = yellow]) + (count patches in-radius 11 with [pcolor = green]) + (count patches in-radius 11 with [pcolor = orange]) + (count patches in-radius 11 with [pcolor = blue]))
      set agentes ((count locales with [ tipo = 4]) + (count expertos with [ tipo = 4]) + (count ciudadanos-i with [ tipo = 4]) + (count visitantes with [ tipo = 4]))
      set recursos ((count materiales with [ tipo = 4]) + (count hardwares with [ tipo = 4]) + (count economicos with [ tipo = 4]) + (count aplicaciones with [ tipo = 4])+ (count objetosculturales with [ tipo = 4]))
    ]
    ask halos with [tipo = 0][
      set color color1
      ]
    ask halos with [tipo = 1][
      set color color2
    ]
    ask halos with [tipo = 3][
      set color color3
      ]
    ask halos with [tipo = 4][
      set color color4
    ]
    ask halos with [tipo = 5][
      set color color5
      ]
end 

to movimientosinternos
  ask turtles with [(breed != nodos) and (breed != halos)][
  ifelse (nodeable = 1) [
  fd  1
  ]
  [
  rt ((random 30) + 180)
  fd 1
  ]
;  create-links-with other turtles in-radius 5 with [(breed != nodos) and (breed != halos)] [
;    set color yellow]
  
  ]
end 

to conectarredes
  ask nodos [
  create-relacionesexternas-with other nodos [
    set color yellow
  ]
    ]
end 

to recolorear
;    if (pcolor < 10) [set pcolor white]
    if ((pcolor > 12  and pcolor <= 19)  or (pcolor >= 22 and pcolor <= 29) or (pcolor >= 122 and pcolor <= 129) or (pcolor >= 132 and pcolor <= 139)) [set pcolor grey set nodeable 1]
;    if (pcolor >= 20 and pcolor < 40) [set pcolor orange]
;    if (pcolor >= 40 and pcolor < 50) [set pcolor yellow]
;    if (pcolor >= 50 and pcolor < 90) [set pcolor green]
    if ((pcolor >= 72 and pcolor <= 79) or (pcolor >= 82 and pcolor <= 89) or (pcolor >= 92 and pcolor <= 99) or (pcolor >= 112 and pcolor <= 119) or (pcolor >= 102 and pcolor <= 109)) [set pcolor blue]
end 
  

;------------------RELACIONES PORMENORIZADAS----------------------------------

to relacion1 ;La que describe un cultivo: Local + ciudadano-i + tierra = economico
  
    if any? patches with [agro? = 1][
    ask patches with [agro? = 1][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? locales in-radius 5[
    create-relacioninterna-with one-of locales in-radius 5 
    [ set color green
      set nodolink? "nodo1"
      set innovacion1 (innovacion1 + 1)
      set vidarelacioninterna 0
      ]
     hatch 1 [
        set meses 0
        set tipo 0
        set breed economicos
        set shape "economico"
        ]
     ]
    ]
    ]
    ]
]
  if any? patches with [agro? = 2][
  ask patches with [agro? = 2][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? locales in-radius 5[
    create-relacioninterna-with one-of locales in-radius 5 
    [ set color green
      set nodolink? "nodo2"
      set innovacion2 (innovacion2 + 1)
      set vidarelacioninterna 0
      ]
     hatch 1 [
        set meses 0
        set tipo 1
        set breed economicos
        set shape "economico"
        ]
     ]
    ]
    ]
    ]
]
  if any? patches with [agro? = 3][
    ask one-of patches with [agro? = 3][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? locales in-radius 5[
    create-relacioninterna-with one-of locales in-radius 5 
    [ set color green
      set nodolink? "nodo3"
      set innovacion3 (innovacion3 + 1)
      set vidarelacioninterna 0
      ]
     hatch 1 [
        set meses 0
        set tipo 2
        set breed economicos
        set shape "economico"
        ]
     ]
    ]
    ]
    ]
]
    if any? patches with [agro? = 4][
      ask one-of patches with [agro? = 4][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? locales in-radius 5[
    create-relacioninterna-with one-of locales in-radius 5 
    [ set color green
      set nodolink? "nodo4"
      set innovacion4 (innovacion4 + 1)
      set vidarelacioninterna 0
      ]
     hatch 1 [
        set meses 0
        set tipo 3
        set breed economicos
        set shape "economico"
        ]
     ]
    ]
    ]
      ]
]
    if any? patches with [agro? = 5][
        ask one-of patches with [agro? = 5][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? locales in-radius 5[
    create-relacioninterna-with one-of locales in-radius 5 
    [ set color green
      set nodolink? "nodo5"
      set innovacion5 (innovacion5 + 1)
      set vidarelacioninterna 0
      ]
     hatch 1 [
        set meses 0
        set tipo 4
        set breed economicos
        set shape "economico"
        ]
     ]
    ]
    ]
    ]
]
end 

to relacion2
    if any? patches with [agro? = 1][
    ask patches with [agro? = 1][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? other ciudadanos-i in-radius 5[
    create-relacioninterna-with one-of other ciudadanos-i in-radius 5 
    [ set color pink
      set nodolink? "nodo1"
      set innovacion1 (innovacion1 + 1)
      set vidarelacioninterna 0
      ]
     hatch 1 [
        set meses 0
        set tipo 0
        set breed economicos
        set shape "economico"
        ]
     ]
    ]
    ]
    ]
    ]
    if any? patches with [agro? = 2][
    ask patches with [agro? = 2][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? other ciudadanos-i in-radius 5[
    create-relacioninterna-with one-of other ciudadanos-i in-radius 5 
    [ set color pink
      set nodolink? "nodo2"
      set innovacion2 (innovacion2 + 1)
      set vidarelacioninterna 0
      ]
     hatch 1 [
        set meses 0
        set tipo 1
        set breed economicos
        set shape "economico"
        ]
     ]
    ]
    ]
    ]
    ]
    if any? patches with [agro? = 3][
    ask patches with [agro? = 3][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? other ciudadanos-i in-radius 5[
    create-relacioninterna-with one-of other ciudadanos-i in-radius 5 
    [ set color pink
      set nodolink? "nodo3"
      set innovacion3 (innovacion3 + 1)
      set vidarelacioninterna 0
      ]
     hatch 1 [
        set meses 0
        set tipo 2
        set breed economicos
        set shape "economico"
        ]
     ]
    ]
    ]
    ]
    ]
    if any? patches with [agro? = 4][
    ask patches with [agro? = 4][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? other ciudadanos-i in-radius 5[
    create-relacioninterna-with one-of other ciudadanos-i in-radius 5 
    [ set color pink
      set nodolink? "nodo4"
      set innovacion4 (innovacion4 + 1)
      set vidarelacioninterna 0
      ]
     hatch 1 [
        set meses 0
        set tipo 3
        set breed economicos
        set shape "economico"
        ]
     ]
    ]
    ]
    ]
    ]
    if any? patches with [agro? = 5][
    ask patches with [agro? = 5][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? other ciudadanos-i in-radius 5[
    create-relacioninterna-with one-of other ciudadanos-i in-radius 5 
    [ set color pink
      set nodolink? "nodo5"
      set innovacion5 (innovacion5 + 1)
      set vidarelacioninterna 0
      ]
     hatch 1 [
        set meses 0
        set tipo 4
        set breed economicos
        set shape "economico"
        ]
     ]
    ]
    ]
    ]
    ]
end 

to relacion3
    if any? materiales with [tipo = 0][
    if any? patches with [taller? = 1][
    ask patches with [taller? = 1][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? locales in-radius 5[
    create-relacioninterna-with one-of locales in-radius 5 
    [ set color brown
      set nodolink? "nodo1"
      set innovacion1 (innovacion1 + 1)
      set vidarelacioninterna 0
      ]
    ask patch-here [set pcolor blue set vivienda? 1]
     ]
    ]
    ]
    ]
    ]
    ask one-of materiales with [tipo = 0][
      die]
    ]
    
    if any? materiales with [tipo = 1][
    if any? patches with [taller? = 2][
    ask patches with [taller? = 2][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? locales in-radius 5[
    create-relacioninterna-with one-of locales in-radius 5 
    [ set color brown
      set nodolink? "nodo2"
      set innovacion2 (innovacion2 + 1)
      set vidarelacioninterna 0
      ]
    ask patch-here [set pcolor blue set vivienda? 2]
     ]
    ]
    ]
    ]
    ]
    ask one-of materiales with [tipo = 1][
      die]
    ]

if any? materiales with [tipo = 2][
    if any? patches with [taller? = 3][
    ask patches with [taller? = 3][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? locales in-radius 5[
    create-relacioninterna-with one-of locales in-radius 5 
    [ set color brown
      set nodolink? "nodo3"
      set innovacion3 (innovacion3 + 1)
      set vidarelacioninterna 0
      ]
    ask patch-here [set pcolor blue set vivienda? 3]
     ]
    ]
    ]
    ]
    ]
    ask one-of materiales with [tipo = 2][
      die]
    ]

if any? materiales with [tipo = 3][
    if any? patches with [taller? = 4][
    ask patches with [taller? = 4][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? locales in-radius 5[
    create-relacioninterna-with one-of locales in-radius 5 
    [ set color brown
      set nodolink? "nodo4"
      set innovacion4 (innovacion4 + 1)
      set vidarelacioninterna 0
      ]
    ask patch-here [set pcolor blue set vivienda? 4]
     ]
    ]
    ]
    ]
    ]
    ask one-of materiales with [tipo = 3][
      die]
    ]

if any? materiales with [tipo = 4][
    if any? patches with [taller? = 5][
    ask patches with [taller? = 5][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? locales in-radius 5[
    create-relacioninterna-with one-of locales in-radius 5 
    [ set color brown
      set nodolink? "nodo5"
      set innovacion5 (innovacion5 + 1)
      set vidarelacioninterna 0
      ]
    ask patch-here [set pcolor blue set vivienda? 5]
     ]
    ]
    ]
    ]
    ]
    ask one-of materiales with [tipo = 4][
      die]
    ]
end 

to relacion4
    if any? materiales with [tipo = 0][
    if any? patches with [taller? = 1][
    ask patches with [taller? = 1][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? other ciudadanos-i in-radius 5[
    create-relacioninterna-with one-of other ciudadanos-i in-radius 5 
    [ set color blue
      set nodolink? "nodo1"
      set innovacion1 (innovacion1 + 1)
      set vidarelacioninterna 0
      ]
    ask patch-here [set pcolor blue set vivienda? 1]
       ]
     ]
    ]
    ]
    ]
    ask one-of materiales with [tipo = 0][
      die]
    ]
    
    if any? materiales with [tipo = 1][
    if any? patches with [taller? = 2][
    ask patches with [taller? = 2][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? other ciudadanos-i in-radius 5[
    create-relacioninterna-with one-of other ciudadanos-i in-radius 5 
    [ set color blue
      set nodolink? "nodo2"
      set innovacion2 (innovacion2 + 1)
      set vidarelacioninterna 0
      ]
    ask patch-here [set pcolor blue set vivienda? 2]
       ]
     ]
    ]
    ]
    ]
    ask one-of materiales with [tipo = 1][
      die]
    ]
    
    if any? materiales with [tipo = 2][
    if any? patches with [taller? = 3][
    ask patches with [taller? = 3][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? other ciudadanos-i in-radius 5[
    create-relacioninterna-with one-of other ciudadanos-i in-radius 5 
    [ set color blue
      set nodolink? "nodo3"
      set innovacion3 (innovacion3 + 1)
      set vidarelacioninterna 0
      ]
    ask patch-here [set pcolor blue set vivienda? 3]
       ]
     ]
    ]
    ]
    ]
    ask one-of materiales with [tipo = 2][
      die]
    ]
    
    if any? materiales with [tipo = 3][
    if any? patches with [taller? = 4][
    ask patches with [taller? = 4][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? other ciudadanos-i in-radius 5[
    create-relacioninterna-with one-of other ciudadanos-i in-radius 5 
    [ set color blue
      set nodolink? "nodo4"
      set innovacion4 (innovacion4 + 1)
      set vidarelacioninterna 0
      ]
    ask patch-here [set pcolor blue set vivienda? 4]
       ]
     ]
    ]
    ]
    ]
    ask one-of materiales with [tipo = 3][
      die]
    ]
    
    if any? materiales with [tipo = 4][
    if any? patches with [taller? = 5][
    ask patches with [taller? = 5][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? other ciudadanos-i in-radius 5[
    create-relacioninterna-with one-of other ciudadanos-i in-radius 5 
    [ set color blue
      set nodolink? "nodo5"
      set innovacion5 (innovacion5 + 1)
      set vidarelacioninterna 0
      ]
    ask patch-here [set pcolor blue set vivienda? 5]
       ]
     ]
    ]
    ]
    ]
    ask one-of materiales with [tipo = 4][
      die]
    ]
end 

to relacion5
    if any? economicos with [tipo = 0][
    if any? patches with [laboratorio? = 1][
    ask patches with [laboratorio? = 1][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? expertos in-radius 5[
    create-relacioninterna-with one-of expertos in-radius 5 
    [ set color red
      set nodolink? "nodo1"
      set innovacion1 (innovacion1 + 1)
      set vidarelacioninterna 0
      ]
     hatch 1 [
        set meses 0
        set tipo 0
        set breed aplicaciones
        set shape "aplicacion"
        ]
      hatch 1 [
        set meses 0
        set tipo 0
        set breed hardwares
        set shape "hardware"
        ]

     ]
    ]
    ]
    ]
    ]
    ask one-of economicos with [tipo = 0][
    die]
    ]
    
    if any? economicos with [tipo = 1][
    if any? patches with [laboratorio? = 2][
    ask patches with [laboratorio? = 2][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? expertos in-radius 5[
    create-relacioninterna-with one-of expertos in-radius 5 
    [ set color red
      set nodolink? "nodo2"
      set innovacion2 (innovacion2 + 1)
      set vidarelacioninterna 0
      ]
     hatch 1 [
        set meses 0
        set tipo 1
        set breed aplicaciones
        set shape "aplicacion"
        ]
      hatch 1 [
        set meses 0
        set tipo 1
        set breed hardwares
        set shape "hardware"
        ]

     ]
    ]
    ]
    ]
    ]
    ask one-of economicos with [tipo = 1][
    die]
    ]
    
    if any? economicos with [tipo = 2][
    if any? patches with [laboratorio? = 3][
    ask patches with [laboratorio? = 3][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? expertos in-radius 5[
    create-relacioninterna-with one-of expertos in-radius 5 
    [ set color red
      set nodolink? "nodo3"
      set innovacion3 (innovacion3 + 1)
      set vidarelacioninterna 0
      ]
     hatch 1 [
        set meses 0
        set tipo 2
        set breed aplicaciones
        set shape "aplicacion"
        ]
      hatch 1 [
        set meses 0
        set tipo 2
        set breed hardwares
        set shape "hardware"
        ]

     ]
    ]
    ]
    ]
    ]
    ask one-of economicos with [tipo = 2][
    die]
    ]
    
    if any? economicos with [tipo = 3][
    if any? patches with [laboratorio? = 4][
    ask patches with [laboratorio? = 4][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? expertos in-radius 5[
    create-relacioninterna-with one-of expertos in-radius 5 
    [ set color red
      set nodolink? "nodo4"
      set innovacion4 (innovacion4 + 1)
      set vidarelacioninterna 0
      ]
     hatch 1 [
        set meses 0
        set tipo 3
        set breed aplicaciones
        set shape "aplicacion"
        ]
      hatch 1 [
        set meses 0
        set tipo 3
        set breed hardwares
        set shape "hardware"
        ]

     ]
    ]
    ]
    ]
    ]
    ask one-of economicos with [tipo = 3][
    die]
    ]
    
    if any? economicos with [tipo = 4][
    if any? patches with [laboratorio? = 5][
    ask patches with [laboratorio? = 5][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? expertos in-radius 5[
    create-relacioninterna-with one-of expertos in-radius 5 
    [ set color red
      set nodolink? "nodo5"
      set innovacion5 (innovacion5 + 1)
      set vidarelacioninterna 0
      ]
     hatch 1 [
        set meses 0
        set tipo 4
        set breed aplicaciones
        set shape "aplicacion"
        ]
      hatch 1 [
        set meses 0
        set tipo 4
        set breed hardwares
        set shape "hardware"
        ]

     ]
    ]
    ]
    ]
    ]
    ask one-of economicos with [tipo = 4][
    die]
    ]
end 

to relacion6
    if any? patches with [escenico? = 1][
    ask patches with [escenico? = 1][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? expertos in-radius 5[
    create-relacioninterna-with one-of expertos in-radius 5 
    [ set color turquoise
      set nodolink? "nodo1"
      set innovacion1 (innovacion1 + 1)
      set vidarelacioninterna 0
      ]
     hatch 1 [
        set meses 0
        set tipo 0
        set breed economicos
        set shape "economico"
        ]
     hatch 1 [
        set meses 0
        set tipo 0
        set breed visitantes
        set shape "visitante"
        ]
     ]
    ]
    ]
    ]
    ]
    
    if any? patches with [escenico? = 2][
    ask patches with [escenico? = 2][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? expertos in-radius 5[
    create-relacioninterna-with one-of expertos in-radius 5 
    [ set color turquoise
      set nodolink? "nodo2"
      set innovacion2 (innovacion2 + 1)
      set vidarelacioninterna 0
      ]
     hatch 1 [
        set meses 0
        set tipo 1
        set breed economicos
        set shape "economico"
        ]
     hatch 1 [
        set meses 0
        set tipo 1
        set breed visitantes
        set shape "visitante"
        ]
     ]
    ]
    ]
    ]
]
    
    if any? patches with [escenico? = 3][
    ask patches with [escenico? = 3][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? expertos in-radius 5[
    create-relacioninterna-with one-of expertos in-radius 5 
    [ set color turquoise
      set nodolink? "nodo3"
      set innovacion3 (innovacion3 + 1)
      set vidarelacioninterna 0
      ]
     hatch 1 [
        set meses 0
        set tipo 2
        set breed economicos
        set shape "economico"
        ]
     hatch 1 [
        set meses 0
        set tipo 2
        set breed visitantes
        set shape "visitante"
        ]
     ]
    ]
    ]
    ]
]
    
    if any? patches with [escenico? = 4][
    ask patches with [escenico? = 4][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? expertos in-radius 5[
    create-relacioninterna-with one-of expertos in-radius 5 
    [ set color turquoise
      set nodolink? "nodo4"
      set innovacion4 (innovacion4 + 1)
      set vidarelacioninterna 0
      ]
     hatch 1 [
        set meses 0
        set tipo 3
        set breed economicos
        set shape "economico"
        ]
     hatch 1 [
        set meses 0
        set tipo 3
        set breed visitantes
        set shape "visitante"
        ]
     ]
    ]
    ]
    ]
]
    
    if any? patches with [escenico? = 5][
    ask patches with [escenico? = 5][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? expertos in-radius 5[
    create-relacioninterna-with one-of expertos in-radius 5 
    [ set color turquoise
      set nodolink? "nodo5"
      set innovacion5 (innovacion5 + 1)
      set vidarelacioninterna 0
      ]
     hatch 1 [
        set meses 0
        set tipo 4
        set breed economicos
        set shape "economico"
        ]
     hatch 1 [
        set meses 0
        set tipo 4
        set breed visitantes
        set shape "visitante"
        ]
     ]
    ]
    ]
    ]
]
end 

to relacion7
    if any? economicos with [tipo = 0][
    if any? patches with [cultural? = 1][
    ask patches with [cultural? = 1][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? expertos in-radius 5[
    create-relacioninterna-with one-of expertos in-radius 5 
    [ set color lime
      set nodolink? "nodo1"
      set innovacion1 (innovacion1 + 1)
      set vidarelacioninterna 0
      ]
     hatch 1 [
        set meses 0
        set tipo 0
        set breed objetosculturales
        set shape "objetocultural"
        ]
     ]
    ]
    ]
    ]
    ]
    ask one-of economicos with [tipo = 0][
    die]
    ]
    
    if any? economicos with [tipo = 1][
    if any? patches with [cultural? = 2][
    ask patches with [cultural? = 2][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? expertos in-radius 5[
    create-relacioninterna-with one-of expertos in-radius 5 
    [ set color lime
      set nodolink? "nodo2"
      set innovacion2 (innovacion2 + 1)
      set vidarelacioninterna 0
      ]
     hatch 1 [
        set meses 0
        set tipo 1
        set breed objetosculturales
        set shape "objetocultural"
        ]
     ]
    ]
    ]
    ]
    ]
    ask one-of economicos with [tipo = 1][
    die]
    ]
    
    if any? economicos with [tipo = 2][
    if any? patches with [cultural? = 3][
    ask patches with [cultural? = 3][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? expertos in-radius 5[
    create-relacioninterna-with one-of expertos in-radius 5 
    [ set color lime
      set nodolink? "nodo3"
      set innovacion3 (innovacion3 + 1)
      set vidarelacioninterna 0
      ]
     hatch 1 [
        set meses 0
        set tipo 2
        set breed objetosculturales
        set shape "objetocultural"
        ]
     ]
    ]
    ]
    ]
    ]
    ask one-of economicos with [tipo = 2][
    die]
    ]
    
    if any? economicos with [tipo = 3][
    if any? patches with [cultural? = 4][
    ask patches with [cultural? = 4][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? expertos in-radius 5[
    create-relacioninterna-with one-of expertos in-radius 5 
    [ set color lime
      set nodolink? "nodo4"
      set innovacion4 (innovacion4 + 1)
      set vidarelacioninterna 0
      ]
     hatch 1 [
        set meses 0
        set tipo 3
        set breed objetosculturales
        set shape "objetocultural"
        ]
     ]
    ]
    ]
    ]
    ]
    ask one-of economicos with [tipo = 3][
    die]
    ]
    
    if any? economicos with [tipo = 4][
    if any? patches with [cultural? = 5][
    ask patches with [cultural? = 5][
    if any? ciudadanos-i in-radius 5[
    ask one-of ciudadanos-i in-radius 5 [
    if any? expertos in-radius 5[
    create-relacioninterna-with one-of expertos in-radius 5 
    [ set color lime
      set nodolink? "nodo5"
      set innovacion5 (innovacion5 + 1)
      set vidarelacioninterna 0
      ]
     hatch 1 [
        set meses 0
        set tipo 4
        set breed objetosculturales
        set shape "objetocultural"
        ]
     ]
    ]
    ]
    ]
    ]
    ask one-of economicos with [tipo = 4][
    die]
    ]
end 

There is only one version of this model, created about 9 years ago by Alberto de Austria Millán.

Attached files

File Type Description Last updated
imaxinariaenrede_1.png preview Preview for 'imaxinariaenrede_1' about 9 years ago, by Alberto de Austria Millán Download

This model does not have any ancestors.

This model does not have any descendants.