Leadership
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
This section could give a general understanding of what the model is trying to show or explain.
HOW IT WORKS
Each node has a binary value of leadaership? and follower?. If both these values are false, the node is neutral. The program returns an error message if both are true. If one is true the node changes color to indicate it is either a leader (purple) or a follower (white).
HOW TO USE IT
This section could explain how to use the model, including a description of each of the items in the interface tab.
THINGS TO NOTICE
This section could give some ideas of things for the user to notice while running the model.
THINGS TO TRY
This section could give some ideas of things for the user to try to do (move sliders, switches, etc.) with the model.
EXTENDING THE MODEL
This section could give some ideas of things to add or change in the procedures tab to make the model more complicated, detailed, accurate, etc.
NETLOGO FEATURES
This section could point out any especially interesting or unusual features of NetLogo that the model makes use of, particularly in the Procedures tab. It might also point out places where workarounds were needed because of missing features.
RELATED MODELS
This section could give the names of models in the NetLogo Models Library or elsewhere which are of related interest.
CREDITS AND REFERENCES
This section could contain a reference to the model's URL on the web if it has one, as well as any other necessary credits or references.
Comments and Questions
breed [ nodes node ] nodes-own [ leadership-value follower? leader? neutral? num-votes] globals [ total-num-votes ] to setup clear-all set-default-shape nodes "person" repeat num-nodes [ ask patch random-xcor random-ycor [ sprout-nodes 1 [ set leadership-value random 100 set follower? false set leader? false set neutral? true set num-votes 0 ] ] ] recolor end to go ask nodes [ vote-for-leader move ] ask nodes [ update-globals ] recolor tick end ; recolors nodes according to their characteristics: leader, follower or neutral to recolor ask nodes [ ifelse leader? [ set color violet ] [ ifelse follower? [ set color white ] [ ifelse neutral? [ set color gray - 3 ] [ set color pink ] ;this is the error flag, if there are any nodes that are pink - there is an error in code ] ] ] end to move ask nodes [ rt random 30 lt random 30 fd .01 ] end to vote-for-leader ask nodes in-radius vision [ if leadership-value > [ leadership-value ] of myself [ set num-votes num-votes + 1 ] ] end to update-globals set total-num-votes sum [num-votes] of nodes ifelse show-num-votes? [ set label word (num-votes) " " ] [ set label "" ] end to follow-the-leader end ;; I'd like to add several functionalities to this model ;; 1- i want nodes to be labeled as leaders once they exceed a certain number of votes ;; 2- i want the nodes that have voted for these leaders more than a certain value to ;; be labeled as followers. (A link can be formed between the follower and the leader to ;; indicate connectivity.) ;; 3- I want the agents to change color accordingly, and the model to stop once there are ;; no neutral nodes left.
There is only one version of this model, created almost 13 years ago by Mert Iseri.
Attached files
No files