Formation of Integral Wellbeing

Formation of Integral Wellbeing preview image

1 collaborator

Captura_de_pantalla_2021-07-16_a_la(s)_15.18.48 Marisol Manfredi (Author)

Tags

#wellbeing 

Tagged by Marisol Manfredi almost 3 years ago

Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.0.4 • Viewed 113 times • Downloaded 12 times • Run 0 times
Download the 'Formation of Integral Wellbeing' 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

;;;;;;;;;;;;;;;;;
; Global Vbles  ;
;;;;;;;;;;;;;;;;;

turtles-own [objwellbeing subjwellbeing attitude]
patches-own [quality place-availability-time]

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;                                Set up                               ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to setup
  clear-all
  reset-ticks
  create-turtles num-people	
  [
    setxy  0 0
    set attitude type-of-attitude
    set color yellow
    set size 1
    set objwellbeing 0.5
    set subjwellbeing 0.5]
     ; happiness is defined if [OWB+SWB]>1

ask turtles [limit

  ifelse (subjwellbeing + objwellbeing = 1.000 )[set shape "face neutral"] [ifelse (subjwellbeing + objwellbeing < 1.000)  [ set shape "face sad"] [set shape "face happy"]]

  ]

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;  Set up of patches as institutions (4 types) by color    ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

ask patches [
    ifelse (pxcor <= 0) [
      ifelse (pycor >= 0) [
        ifelse (pycor >= 11) and (pxcor <= -11) [set pcolor 125 SET quality 1] [ifelse (pycor < 11) and (pxcor > -11) [set pcolor 127 SET quality -0.5] [set pcolor 126 SET quality 0.5]]]
        [ifelse (pycor < -11) and (pxcor <= -11) [set pcolor 85 SET quality 1] [ifelse (pycor >= -11) and (pxcor > -11) [set pcolor 87 SET quality -0.5] [set pcolor 86 SET quality 0.5]]]
    ]
    [ ifelse (pycor < 0) [
        ifelse (pycor < -11) and (pxcor > 11) [set pcolor 75 SET quality 1] [ifelse (pycor >= -11) and (pxcor <= 11) [set pcolor 77 SET quality -0.5] [set pcolor 76 SET quality 0.5]]][
        ifelse (pycor < 11) and (pxcor <= 11) [set pcolor 117 SET quality -0.5] [ifelse (pycor >= 11) and (pxcor > 11) [set pcolor 115 SET quality 1] [set pcolor 116 SET quality 0.5]]]]]

  ; darker colors are better quality institutions
; food markets & hospitals are the institutions located in the inferior part of the interface because they satisfy 'biological needs' (eat and heal). their objwellbeing increases proportionally to the quality of the institution they go/patch they reach
; work & school are institutions located in the superior part of the interface because they satisfy 'cultural needs' (learn and work)

  reset-ticks
end 

to-report type-of-attitude ; there are three type of attitudes or worldviews that people can have and they are randomly set
  report one-of [
    1  ;; attitude 1
    2  ;; attitude 2
    3]
end 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;                                To go                                                 ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to go


  ask turtles[

    ifelse coin-flip? [right random 100] [left random 100]
    forward random 40] ;; turtles move around the place

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Actions that affects SWB and parameter happiness-of-interaction           ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ask turtles [

  let target one-of other turtles-here  ;; select somebody to talk with

      ifelse (target != nobody )

    [  ifelse (attitude != [attitude] of target)
     [  set subjwellbeing  subjwellbeing - 0.125 leave
        ask target [set subjwellbeing subjwellbeing - 0.125 leave ]];; if they find smn with different attitude, they decrease their SWB by 0.125 and ask target to do the same, then leave.

   [set subjwellbeing subjwellbeing + happiness-of-interaction
     ask target [set subjwellbeing subjwellbeing + happiness-of-interaction]] ;; happiness-of-interaction goes from 0 to 0.25 ;; if there is a target with the same attitude, increase its SWB on the rate defined by happiness of interaction and ask the target to do the same, then leave.
 ]

    [ search-to-find-a-target ]]  ;; if there is no target, search to find somebody to talk with

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;        Actions that affects OWB + limit + change face      ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

ask turtles [eat heal learn work]
   ask turtles [limit]
   ask turtles [
    ifelse (subjwellbeing + objwellbeing = 1.000 )[set shape "face neutral"] [ifelse (subjwellbeing + objwellbeing < 1.000)  [ set shape "face sad"] [set shape "face happy"]]]


;;;;;;;;;;;;;;;;;;;;;;
;; Stop conditions  ;;
;;;;;;;;;;;;;;;;;;;;;;


   if (all? patches [pcolor = BLACK]) [
 user-message "Institutions are exhausted by poeple!" stop ]

  if (all? turtles [subjwellbeing + objwellbeing <= 1.000 ] )  [
 user-message "The society failed: everyone is sad!" stop ] ;;neutral people is also count as sadness in the society

 if (all? turtles [subjwellbeing + objwellbeing > 1.000  ] )  [
 user-message "The society reached its aim: everyone is happy!" stop ]

  if (ticks = 5000) [stop]

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;     Investment-on-institutions: speed of regrowth parameter that affects OWB             ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

  ask patches [
    let proportional-place-availability-time 1 / investment-in-institutions
  ;;assumption> inverse relationship between the amount of days of regrowth and investment on institutions
    if (pcolor != black)
    [ ifelse (quality = 0.5)
        [ set place-availability-time 90 * proportional-place-availability-time] ;; place availability is the amount of days they need to grow, the more days the worst the institutional framework ergo the less investment
    [ifelse (quality = 1)
      [set place-availability-time 180 * proportional-place-availability-time]
      [set place-availability-time 30 * proportional-place-availability-time]]]]

  ask patches [create-more-places]

  update-plot
  tick
end 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;                 Specification of actions                           ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to limit
      if (subjwellbeing  < 0) [ set subjwellbeing 0]
    if (objwellbeing < 0) [ set objwellbeing  0]
    if (subjwellbeing > 1) [ set subjwellbeing 1]
    if (objwellbeing > 1) [ set objwellbeing  1]
end 

to leave
  fd 1
end 

to search-to-find-a-target
  rt random 90
  lt random 90
  fd 1
  if not any? other turtles-here [search-to-find-a-target] ;; if there is no one; continue to find a target
end 

to-report coin-flip?
  report random 2 = 0
end 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Actions that affects OWB  ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to eat
    if (pcolor = 85) or (pcolor = 87) or (pcolor = 86) [ ; when they go to cyan colors, they find food markets where they have the possibility to eat. This increase their objective wellbeing proportional to the quality of the food market they go.
    set pcolor black
    set objwellbeing objwellbeing + 0.25 * quality]
end 

to heal
  if (pcolor = 75) or (pcolor = 77) or (pcolor = 76) [ ; when they go to turquoise colors, they find hospitals where they have the possibility to heal. This increase their objective wellbeing proportional to the quality of the hospital they go.
    set pcolor black
    set objwellbeing objwellbeing + 0.25 * quality]
end 

to learn
  if (pcolor = 115) or (pcolor = 117) or (pcolor = 116) [ ; when they go to violet colors, they find schools where they have the possibility to learn (educate themselves). This increase their objective wellbeing proportional to the quality of the school they go.
    set pcolor black
    set objwellbeing objwellbeing + 0.25 * quality]
end 

to work
    if (pcolor = 125) or (pcolor = 127) or (pcolor = 126) [ ; when they go to magenta colors, they find companies/ places where they have the possibility to work. This increase their objective wellbeing proportional to the quality of the job they have.
    set pcolor black
    set objwellbeing objwellbeing + 0.25 * quality]
end 

;Update plot

to update-plot
   set-current-plot "happy people vs sad people"
  set-current-plot-pen "happy"
   plot count turtles with [shape = "face happy"]
  set-current-plot-pen "sad"
 plot count turtles with [shape = "face sad"]
  tick
end 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;  Different rates of regrowth of institutions depending on the quality   ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to create-more-places
  if pcolor = black [
    ifelse place-availability-time <= 0
      [
      ifelse (quality = 1)
        [
          ifelse (pxcor < 0 and pycor < 0)
          [set pcolor 85]
          [ifelse (pxcor > 0 and pycor < 0)
            [set pcolor 75]
            [ifelse (pxcor > 0 and pycor > 0)
              [set pcolor 115]
              [set pcolor 125]]]]
        [ifelse (quality = -0.5)
        [
          ifelse (pxcor <= 0 and pycor < 0)
          [set pcolor 87]
          [ifelse (pxcor > 0 and pycor < 0)
            [set pcolor 77]
            [ifelse (pxcor > 0 and pycor >= 0)
              [set pcolor 117]
              [set pcolor 127]]]]
        [if (quality = 0.5)
        [
          ifelse (pxcor <= 0 and pycor < 0)
          [set pcolor 86]
          [ifelse (pxcor > 0 and pycor < 0)
            [set pcolor 76]
            [ifelse (pxcor > 0 and pycor >= 0)
              [set pcolor 116]
                  [set pcolor 126] ]]]]]]
    [ set place-availability-time place-availability-time - 1 ]]
end 

There is only one version of this model, created almost 3 years ago by Marisol Manfredi.

Attached files

File Type Description Last updated
Formation of Integral Wellbeing.png preview Preview for 'Formation of Integral Wellbeing' almost 3 years ago, by Marisol Manfredi Download

This model does not have any ancestors.

This model does not have any descendants.