Leonardi Model 2
Model was written in NetLogo 5.0.5
•
Viewed 361 times
•
Downloaded 78 times
•
Run 0 times
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
extensions [table] globals [social-influence material-influence] breed [people person] breed [expectations expectation] breed [technologies technology] people-own [usage understanding influencer persistence] expectations-own [feature strength] technologies-own [affordances] directed-link-breed [holds hold] to setup ca ; If auto-total-people is on, make sure the number of people expecting a, b and both doesn't exceed ;; the total number set. ;; Populate the rest of the world (up to the total number set) with people with no expectations. ifelse auto-total-people != "off" and #-expecting-a + #-expecting-b + #-expecting-both > auto-total-people [ user-message (word "There are too many people. Turn auto-total off, or reduce the number of people expecting a, b or both.")] [ if auto-total-people != "off" [ set #-no-expectations auto-total-people - (#-expecting-a + #-expecting-b + #-expecting-both)] ;; create the total number of people who will be in the model ;; distribute them randomly around the world ;; format their size and shape ;; set their usage blank ;; format their color to reflect their usage ;; give each of them a blank table that will hold their expectations about the technology create-people total-# [ setxy random-pxcor random-pycor set shape "person" set size 1.6 set usage [] color-code usage .8 set understanding table:make ] ;; for the number of people expecting only a, pick people with blank tables, and set their understanding of feature a to 1 ask n-of #-expecting-a people with [ table:length understanding < 1 ] [ table:put understanding "a" 1 ] ;; for the number of people expecting only b, pick people with blank tables, and set their understanding of feature b to 1 ask n-of #-expecting-b people with [ table:length understanding < 1 ] [ table:put understanding "b" 1 ] ;; for the number of people expecting a and b, pick people with blank tables, and set their understanding of ;; features a and b to 1 ask n-of #-expecting-both people with [ table:length understanding < 1 ] [ table:put understanding "a" 1 table:put understanding "b" 1 ] ask people ;; build a network of expectations to provide a visual representation of each person's table of understanding [ update-expectations ;; if limited persistence is on, give people a persistence of 3 ;; if it's off, give people a persistence that is extremely high ifelse limited-persistence [ set persistence 3 ] [ set persistence 1000 ] ] ;; format the network of expectations ask expectations [ format-expectations ] ;; set up the technology adopt-technology set social-influence [] set material-influence [] reset-ticks ] end to update-expectations ;; ask people whose table of understandings doesn't match the visual representation of their expectations ask people with [table:length understanding != count out-hold-neighbors] ;; create a blank slate [ ask out-hold-neighbors [ die ] ;; build the network of expectations up from the understanding table let instructions table:keys understanding while [instructions != []] [ hatch-expectations 1 [ create-hold-from myself ask my-in-holds [hide-link] set feature first instructions set strength [table:get understanding first instructions] of myself set instructions but-first instructions ] ] ] ask expectations [ format-expectations ] end to format-expectations ;; make expectations color, shape and placement reflect what they indicate if strength > 1 [ set strength 1 ] if strength < -1 [ set strength -1 ] if strength > 0 [ show-turtle set shape "circle" set size .5 ] if strength < 0 [ show-turtle set shape "x" set size .6 ] if strength = 0 [hide-turtle] if feature = "a" [ setxy ( [ xcor ] of one-of in-hold-neighbors - .5) ( [ ycor ] of one-of in-hold-neighbors + .5) ] if feature = "b" [ setxy ( [ xcor ] of one-of in-hold-neighbors + .5) ( [ ycor ] of one-of in-hold-neighbors + .5) ] color-code feature 1.5 end to adopt-technology create-technologies 1 [ set shape "box" set size 3 ;; create a blank table that will hold affordances set affordances table:make ;; fill in the table from the features selected by the user let instructions (sentence technology-affordances) while [instructions != [] ] [ table:put affordances first instructions 1 set instructions but-first instructions ] color-code (table:keys affordances) -2.5] end ;; color code expectations, usage and affordances to provide a visual indication of whether they match. to color-code [thing number] ;; I tried to let the number (i.e. the amount of color change) be set within this procedure (see below) but I couldn't ;; get it to work. When the procedure was called by something that didn't hold one of the possible "things" it would ;; stop during the if statements and return an error message. Not sure why it wouldn't just return false and keep going... ;; But anyway, I relented and made the number I want each element's color adjusted by its own input, that I just list ;; when I call the procedure. ;; It's still much more parsimonious this way than having entirely separate procedures to color code expectations, ;; usage, and affordances which is what I used to have... ;let number 1 ;if thing = usage ;[set number .8] ;if thing = (table:keys affordances) ;[set number -2.5] ;if thing = feature ;[set number 1.5] if member? "a" thing and not member? "b" thing [ set color blue + number ] if member? "b" thing and not member? "a" thing [ set color yellow + number ] if member? "a" thing and member? "b" thing [ set color green + number] if not member? "a" thing and not member? "b" thing [ set color gray + number ] end to go ;; stop conditions if all? people [persistence = 0] [ stop ] if ticks > 99 and (all? people [usage = []] or all? people [usage = ["a"]] or all? people [usage = ["b"]] or all? people [usage = ["a" "b"] or usage = ["b" "a"]]) [ stop ] ;; running the model ask people [ move interact update-expectations ] update-influences tick end to move let path random-normal 0 30 rt path fd 1 ;; bring visual expectations along with ask out-hold-neighbors [ rt path fd 1 ] end to interact set influencer nobody if persistence > 0 ;; if I am near the technology or a person, pick one of those entities to influence me [ let potential-influencers (turtle-set technologies in-radius 3 other people in-radius 1) set influencer one-of potential-influencers ;; if I am being influenced by a person (social interaction), then learn from their expectations if is-person? influencer [ learn-from ([understanding] of influencer) 1 .2] ;; if I am being influenced by the technology (material interaction), then if I have some expectation of ;; what the technology is for I will try to use it accordingly. ;; otherwise I will learn from the technology if is-technology? influencer [ ifelse table:length understanding > 0 [ use-technology ] [ learn-from ([affordances] of influencer) tech-transparency 1 ] ;; increment my persistence down set persistence persistence - 1 ] ] end to learn-from [source chance influence] ;; set probability of learning ;; if the influencer has any features to learn from, ;; pick one to be the insight I learn if table:length source > 0 and random-float 1 < chance [ let insight one-of table:keys source ;; if that feature is new to me, put the insight into my table of understandings if not table:has-key? understanding insight [ table:put understanding insight 0 ] ;; determine whether this is going to be learning something positive or negative let direction 1 if table:get source insight > 0 [ set direction 1 ] if table:get source insight < 0 [ set direction -1 ] ;; change expectation to be more positive/more negative ;; (amount of change is .2 for people influencers, 1 for technology influencer) table:put understanding insight table:get understanding insight + influence * direction ;; cap expectation strength at >= -1 and <= 1 if abs table:get understanding insight > 1 [table:put understanding insight direction] ;; adjust visual version of expectations to match understanding ask out-hold-neighbors with [feature = insight ] [ set strength [table:get understanding insight] of myself ] ] end to use-technology ;; if can-learn-unexpectly is on, give a 5% chance of trying to learn from the technology before trying to use it if can-learn-unexpectedly [ if random-float 1 < .05 [ learn-from ([affordances] of influencer) tech-transparency 1 ] ] ;; if I have any positive expectations, pick one of those to be the way I try to use the technology if any? out-hold-neighbors with [strength > 0] [ let use [feature] of one-of out-hold-neighbors with [ strength > 0 ] ;; if use-can-fail is on, set the chance that use will be successful down to 95% let chance-use-works 1 if use-can-fail [ set chance-use-works .95 ] ;; if the feature I'm trying to use is one of the technology's affordances, then put that feature into my usage (if use is successful) ;; and set my expectation for that feature fully to 1 ;; if not, set my expectation for that feature fully negative and remove it from my usage ifelse table:has-key? [affordances] of influencer use and random-float 1 < chance-use-works [ table:put understanding use 1 set usage lput use usage set usage remove-duplicates usage color-code usage .8 ] [ table:put understanding use -1 set usage remove use usage color-code usage .8 ] ;;ask my visual expectation network to adjust accordingly ask out-hold-neighbors with [feature = use ] [ set strength [table:get understanding use] of myself ] ] end to update-influences ;; list the proportion of people experiencing social and material influences at each tick if any? people with [persistence > 0] [ set social-influence fput (count people with [is-person? influencer] / count people with [persistence > 0]) social-influence set material-influence fput (count people with [is-technology? influencer] / count people with [persistence > 0]) material-influence ] end to-report total-# ;; report the total number of people in the world report #-expecting-a + #-expecting-b + #-expecting-both + #-no-expectations end to-report %-open-to-influence ;; report the % of people who are still open to being influenced out of the total report count people with [persistence > 0 ] / total-# end to-report %-being-influenced ;; report the % of people currently being influenced, out of the total (or out of the number open to being influenced) report count people with [influencer != nobody] / total-# ;count people with [persistence > 0] end to-report average-social-influence ;; report the average % of people influenced by other people out of the number open to being influenced at each tick report sum social-influence / (length social-influence) end to-report average-material-influence ;; report the average % of people influenced by the technology out of the number open to being influenced at each tick report sum material-influence / (length material-influence) end
There are 2 versions of this model.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Leonardi Model 2.png | preview | Preview for 'Leonardi Model 2' | over 10 years ago, by Eleanor Anderson | Download |
This model does not have any ancestors.
This model does not have any descendants.