Citizen Initiatives for Global Solidarity - Fulfillment of Needs
No preview image
Model was written in NetLogo 6.2.0
•
Viewed 72 times
•
Downloaded 10 times
•
Run 0 times
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
;; note in this version I flipped what's considered "risky" behavior ;; still no "tenacity" in the model -- this is the one thing from the original PPT I'm not sure what to do with. ;; based on ppt sent by Jose from Lesbos on 13Apr2019 ;; CIGS seek out needs that are < expertise and < time-available ;; if there are no matching needs, they seek out additional funding ;; once the need is fulfilled, it goes away and CIGS find a new cause (having level-up expertise) ;; failure partially implemented ;; unemployed implemented ;; passive/aggressive development added based on slide 5 ;; consolidated some code for setup procedures ;; added tracking of different need types: those with CIGS addressing them, those with no one addressing them. ;; inserted code to track CIGS status (dead or alive) by risk-profile/strategy per Jose's interest (26 Feb 2020) globals [ fulfilled-needs ;; counter for needs that went away failed-CIGS ;; counter for failed CIGS unfulfilled ;; agentset of needs with no CIGS in-progress ;; agentset of needs with CIGS attached ;; Jose's interest variables added CIGS-1-alive CIGS-1-dead CIGS-0-alive CIGS-0-dead ] breed [ CIGS a-CIGS ] breed [ funding a-funding ] breed [ needs need ] ;; establishing up each agent attributes CIGS-own [ expertise ;; Random (0,100) time-available ;; Random (0, 365 days) tenacity;; Boolean (y/n) risk-profile;; – Boolean (aggressive/passive) unemployed;; random (0-30) status ;; alive/dead possible-cause ;; agent-set for use later cause ;; the need being addressed currently ] funding-own [ funding-amount ;; Random (0-100) funding-regenerate ;; random [0, 1) ] needs-own [ need-size ;;Random (0-100) need-type ;; for later?? time-required-to-complete;; random (0-365) ] ;; initilize variables and set up environment to setup clear-all create-CIGS CIGS-Start [ make-CIGS ] create-funding funder-Start [ make-funders ] create-needs needs-Start [ make-needs ] ;; initialize globals set in-progress 0 set unfulfilled 0 set CIGS-1-alive 0 set CIGS-1-dead 0 set CIGS-0-alive 0 set CIGS-0-dead 0 reset-ticks end to go ask CIGS [ if cause = nobody [ find-a-cause ] ;; look for a cause if you don't already have one if cause != nobody [ re-evaluate fulfill-need ;; each day work to fulfill need ] set time-available time-available - 1 ;; decrement 1 day per tick ] ask funding [ ifelse funding-amount = 0 [ die ] [ set funding-amount ( funding-amount * funding-regenerate + funding-amount ) ] ;; increment funding amount daily ;; note: zero funding is not going to improve! ] ;; regeneration of needs create-needs random needs-replacement [ make-needs ] update-globals ;; regeneration of CIGS and funding if count needs with [count link-neighbors = 0] > 0 [ create-funding random funder-replacement [ make-funders ] ;; unaddressed needs breed more CIGS create-CIGS random CIGS-replacement [ make-CIGS ] ;; addressed needs breed more funding -- MAYBE SOMETHING TO WORK OUT LATER ] if count CIGS = 0 or count needs = 0 [ stop ] tick end to find-a-cause ifelse risk-profile = 1 [ set possible-cause needs with [ (time-required-to-complete < [time-available] of myself ) AND (need-size < [expertise] of myself) ] ] [ set possible-cause needs with [ (time-required-to-complete < [time-available] of myself ) AND count link-neighbors > 0 ] ;; low risk profile joins fulfillment of a need without expertise if that need already has other CIGS involved ;; note this makes no determination of friend/foe CIGS ] ifelse count possible-cause > 0 [ set cause one-of possible-cause move-to cause create-link-with cause jump 2 ;; so they don't overlap ] [ set unemployed unemployed - 1 ;; CIGS can only exist as long as they are employed pursue-funding if unemployed = 0 [ set failed-CIGS failed-CIGS + 1 ifelse risk-profile = 0 [ set CIGS-1-dead CIGS-1-dead + 1 ] [ set CIGS-0-dead CIGS-0-dead + 1 ] ;; tallying dead by risk type die ] ] end ;; not sure if this works to pursue-funding ifelse count funding with [funding-amount > 0] > 0 [ move-to one-of funding with [funding-amount > 0] let funder one-of funding-here let ask-for-money random 10 + 1 set time-available ((1 / ask-for-money) * [funding-amount] of funder + time-available );; increase time available by fraction of money given ask funder [ set funding-amount ( funding-amount - (1 / ask-for-money) * funding-amount ) ] ;; deduct funding ] [ ;; adding Jose's interest code here ifelse risk-profile = 0 [ set CIGS-1-dead CIGS-1-dead + 1 ] [ set CIGS-0-dead CIGS-0-dead + 1 ] ;; tallying dead by risk type die set failed-CIGS failed-CIGS + 1 ] end to fulfill-need ;; this is a weird way to do this by using the "cause" variable owned by CIGS ask cause [ ifelse time-required-to-complete = 0 [ ask link-neighbors [ set expertise expertise + random 10 ] ;; each of contributing CIGS increases expertise set fulfilled-needs fulfilled-needs + 1 ;; increment global counter of fulfilled needs die ] [ set time-required-to-complete time-required-to-complete - 1 ;; decrement by 1 day; ] ] ;; note that multiple CIGS working on the same cause will decrement more quickly even though the cause units is days (like man-hours then) end to re-evaluate if (expertise > [ need-size ] of cause) AND (time-available < [time-required-to-complete] of cause) [ ifelse risk-profile = 1 [ pursue-funding ] [ die ifelse risk-profile = 0 [ set CIGS-1-dead CIGS-1-dead + 1 ] [ set CIGS-0-dead CIGS-0-dead + 1 ] ;; set failed-CIGS failed-CIGS + 1 ] ] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;; setup agents by type ;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to make-needs set shape "house" set color red set need-size random 100 + 1 ;; 0 < need-size <= 100 set time-required-to-complete random 365 + 1 ;; 0 < time-required-to-complete <= 365 setxy random-xcor random-ycor ;; distribute everyone randomly in the environment end to make-funders set shape "star" set color yellow set funding-amount random 100 + 1 ;; 0 < funding-amount <= 100 setxy random-xcor random-ycor ;; distribute everyone randomly in the environment end to make-CIGS set shape "person" set color blue set expertise random-float 100 ;; note this will never reach 100 -> 0<= expertise < 100 set time-available random 365 + 1 ;; 0 < time-available <= 365 to give at least 1 day to exist and is translated from funding set tenacity random 2 ;; can be either 0 or 1 -- establish 0 = no; 1 = yes set risk-profile random 2 ;; can be either 0 or 1 -- estabish 0 = passive; 1 = aggresive set unemployed random 30 + 1 ;; 0 < time-left-to-exist <= 30 to give at least 1 day without funding and without a need set status 1 ;; initially set to "alive" set cause nobody ;; no one to start setxy random-xcor random-ycor ;; distribute everyone randomly in the environment end to update-globals set unfulfilled needs with [ count link-neighbors = 0 ] ;; no links means no one's working on that need set in-progress needs with [ count link-neighbors > 0 ] ;; links mean CIGS are working on them. set CIGS-0-alive count CIGS with [ risk-profile = 1] ;; tallying CIGS by risk profile/strategy per Jose's interest set CIGS-1-alive count CIGS with [ risk-profile = 0] end
There is only one version of this model, created over 3 years ago by Erika Frydenlund.
Attached files
No files
This model does not have any ancestors.
This model does not have any descendants.