Word-of-mouth with Information Seeking
Model was written in NetLogo 6.0.3
•
Viewed 561 times
•
Downloaded 29 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 [nw] globals [ ticks-for-peak-A ;; the tick for the max of Awareness (was never higher later) last-max-peak-A ticks-for-peak-AK ;; the tick for the max of AK (was never higher later) last-max-peak-AK ticks-last-activity ; the last tick when something happened ] ;; defines the type used for links undirected-link-breed [edges edge] ;; "turtles" (in the good old netlogo terminology) ;; represent individuals holding states for awareness and an expertise ;; they are also nodes in the social network turtles-own [ unaware? ;; state on the awareness dimension: if true, the turtle is unaware seeking? ;; state on the awareness dimension: if true, the turtle is seeking (aware and search for info) aware? ;; state on the awareness dimension: if true, the turtle is aware (and not seeking) ignorant? ;; state on the expertise dimension: if true, the turtle is ignorant proactive? ;; state on the expertise dimension: if true, the turtle is knowledgeable and proactively passing the word knowledgeable? ;; state on the expertise dimension: if true, the turtle is knowledgeable but passive ; characteristics which remain constant curious? ;; if true, this individual would like to seek actively information enthusiastic? ;; if true, thisindividual would ike to promote his knowledge supporter? time ; if > 0, the time to remain in this step ] ;; "links" represent social links. ;; their states are just used to understand what happens during the simulation ;; (visualisation) but not for computations. links-own [ cascade-awareness? cascade-expertise? chain-retrieval? ] to-report result-A report (count turtles with [not unaware?] / count turtles) end to-report result-AK report count turtles with [(not unaware?) and (not ignorant?)] / count turtles end to-report genlab-outputs report ["result-AK" "result-A" ] end to setup-network-load ;; load the network from the file and also initialize their state show "creating network" nw:generate-watts-strogatz turtles links count-individuals count-neighboors 0.1 [ ; for visual reasons, we don't put any turtles *too* close to the edges setxy (random-xcor * 0.8) (random-ycor * 0.8) set size 1.5 set unaware? true set seeking? false set aware? false set ignorant? true set proactive? false set knowledgeable? false set time 0 ] show "loaded links and turtles" show count edges show count turtles ;; also layout it for beauty purpose if (with-gui) [ ifelse (count-individuals < 1500) [ show "network graphical layout..." layout-radial turtles links (turtle 0) repeat 200 [layout-spring turtles links 0.1 5 5] ] [ show "too many nodes for a beautiful layout, doing a quick layout, sorry" layout-radial turtles links (turtle 0) ] ] show "end of init, let's play!" end to setup clear-all setup-network-load setup-turtles ; init the characteristics ask turtles [ set curious? false set enthusiastic? false set supporter? false ] ask n-of (proportion-curious * count turtles) turtles [ set curious? true ] ask n-of (proportion-enthusiastic * count turtles) turtles [ set enthusiastic? true ] ask n-of (proportion-supporters * count turtles) turtles [ set supporter? true ] ask turtles [ set shape "circle" if curious? [ set shape "triangle" ] if enthusiastic? or supporter? [ set shape "square"] if curious? and (enthusiastic? or supporter?) [set shape "pentagon"] if (with-gui) [ set-color ] ] set ticks-for-peak-A 0 set ticks-for-peak-AK 0 set last-max-peak-A 0 set last-max-peak-AK 0 set ticks-last-activity 0 ask n-of (initial-proportion-knowledgeable * count turtles) turtles [ become-knowledgeable ] ask links [ set chain-retrieval? false set cascade-expertise? false set cascade-awareness? false set color gray ] reset-ticks end to setup-turtles if (with-gui) [ set-default-shape turtles "circle" ] end to go ; stopping condition if ( ((ticks < advertisement-duration) and not (any? turtles with [ proactive? or seeking? or unaware?])) or ((ticks >= advertisement-duration) and not (any? turtles with [ proactive? or seeking?])) ) [ stop ] ; change the state of agents which are in timeout manage-timeouts ; inform with advertisement if (ticks < advertisement-duration) [ ask n-of (advertisement-proportion-per-step * count turtles) turtles [ receive-advertisement ] ] ; change from proactive to knowledage, or seeking to aware exchange-info ; detect outputs related to time update-ticks-detection tick end to update-ticks-detection let prop_A (count turtles with [aware?] / count turtles) if (prop_A > last-max-peak-A) [ set ticks-for-peak-A ticks set last-max-peak-A prop_A ] let prop_AK (count turtles with [not unaware? and not ignorant?] / count turtles) if (prop_AK > last-max-peak-AK) [ set ticks-for-peak-AK ticks set last-max-peak-AK prop_AK ] set ticks-last-activity max list ticks-for-peak-A ticks-for-peak-AK end to set-color if (with-gui) [ if (unaware? and ignorant?) [ set color gray set label "UI"] if (unaware? and proactive?) [ set color orange set label "UP"] if (unaware? and knowledgeable?) [ set color brown set label "UK"] if (seeking? and ignorant?) [ set color green set label "SI"] if (aware? and ignorant?) [ set color gray set label "AI"] if (aware? and proactive?) [ set color red set label "AP"] if (aware? and knowledgeable?) [ set color violet set label "AK"] ; these cases are errors if (seeking? and proactive?) [ set color green set label "!SP" print "illegal SP" print who] if (seeking? and knowledgeable?) [ set color green set label "!SK" print "illegal SK" print who] ] end to become-unaware ;; turtle procedure set unaware? true set seeking? false set aware? false set time 0 set-color end to become-seeking ;; turtle procedure if (unaware?) [ set unaware? false set seeking? true set aware? false set time duration-seek set-color ] end to become-aware ;; turtle procedure set unaware? false set seeking? false set aware? true set time 0 set-color end to become-ignorant ;; turtle procedure set ignorant? true set proactive? false set knowledgeable? false set time 0 set-color end to become-proactive ;; turtle procedure ;show "becoming proactive" set ignorant? false set proactive? true set knowledgeable? false set time duration-proactive if (seeking?) [ set seeking? false set aware? true ] set-color end to become-knowledgeable ;; turtle procedure set ignorant? false set proactive? false set knowledgeable? true set time 0 if (seeking?) [ set seeking? false set aware? true ] set-color end to inform-someone ask one-of turtles [ become-proactive ] end to advertise-someone ask one-of turtles [ receive-advertisement ] end to receive-advertisement if unaware? [ if (ignorant?) [ ifelse (curious?) [ become-seeking] [ become-aware] ] if (knowledgeable?) [ become-aware if (supporter?) [ become-proactive] ] ] end to receive-knowledge ;show "receive knowledge" if ignorant? [ ;show "receive knowledge 2" ifelse enthusiastic? [ become-proactive ] [ become-knowledgeable ] ] end to manage-timeouts ask turtles with [time > 0 and (seeking? or proactive?)] [ set time (time - 1) ] ask turtles with [proactive? and time = 0] [ become-knowledgeable ] ask turtles with [seeking? and time = 0] [ become-aware ] end ; when agent a1 meets a2, then a2 will receive any piece of unknown information from a1 to-report exchange-info-agents [ a1 a2 ] let exchange false if ( (not [unaware?] of a1) and ([unaware?] of a2)) [ ask a2 [receive-advertisement] set exchange true ] if ( (not [ignorant?] of a1) and ([ignorant?] of a2)) [ ask a2 [receive-knowledge] set exchange true ] report exchange end to exchange-info ; by default, all the links are gray ; drive a given number of links ask n-of (probability-link-meeting * count links) links [ ; so these links are at least active ; set color white if ( ( [seeking?] of end1 ) or ( [seeking?] of end2) or ( [proactive?] of end1 ) or ( [proactive?] of end2 )) [ ; the interaction takes place let ignorant-before? [ignorant?] of end1 or [ignorant?] of end2 let unaware-before? [unaware?] of end1 or [unaware?] of end2 let seeking-before? [seeking?] of end1 or [seeking?] of end2 let exchange12 (exchange-info-agents end1 end2) let exchange21 (exchange-info-agents end2 end1) if [not ignorant?] of end1 and [not ignorant?] of end2 and ignorant-before? [ set cascade-expertise? true if seeking-before? [ set chain-retrieval? true ] ] if [not unaware?] of end1 and [not unaware?] of end2 and unaware-before? [ set cascade-awareness? true ] set color gray if chain-retrieval? [ set color violet set thickness 0.4 ] if color = gray and cascade-awareness? [ set color green set thickness 0.4 ] if color = gray and cascade-expertise? [ set color orange set thickness 0.4 ] ] ] end ; Copyright 2016 Samuel Thiriot. ; See Info tab for full copyright and license.
There is only one version of this model, created about 6 years ago by Samuel Thiriot.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Word-of-mouth with Information Seeking.png | preview | Preview for 'Word-of-mouth with Information Seeking' | about 6 years ago, by Samuel Thiriot | Download |
This model does not have any ancestors.
This model does not have any descendants.