[{"data":1,"prerenderedAt":193},["ShallowReactive",2],{"/nw/generate-watts-strogatz":3,"/nw/generate-watts-strogatz-surround":182},{"id":4,"title":5,"body":6,"description":149,"extension":150,"meta":151,"navigation":168,"path":178,"seo":179,"stem":180,"__hash__":181},"content/nw/generate-watts-strogatz.md","Networks Extension Dictionary: generate-watts-strogatz",{"type":7,"value":8,"toc":138},"minimark",[9],[10,11,15,16,15,26,63,74,84,95],"div",{"className":12,"id":14},[13],"dict_entry","generate-watts-strogatz","\n  ",[17,18,20,21,15],"h3",{"id":19},"nwgenerate-watts-strogatz","\n    ",[22,23,25],"a",{"href":24},"#generate-watts-strogatz","nw:generate-watts-strogatz",[27,28,32],"h4",{"id":29,"className":30},"nwgenerate-watts-strogatz-turtle-breed-link-breed-num-nodes-neighborhood-size-rewire-probability-optional-command-block",[31],"section-heading",[22,33,20,37,15],{"className":34,"href":36},[35],"section-anchor","#----nwgenerate-watts-strogatz-turtle-breed-link-breed-num-nodes-neighborhood-size-rewire-probability-optional-command-block--",[38,39,42,43,47,48,47,51,47,54,47,57,47,60],"span",{"className":40},[41],"prim_example","nw:generate-watts-strogatz ",[44,45,46],"i",{},"turtle-breed"," ",[44,49,50],{},"link-breed",[44,52,53],{},"num-nodes",[44,55,56],{},"neighborhood-size",[44,58,59],{},"rewire-probability",[44,61,62],{},"optional-command-block",[64,65,66,67,73],"p",{},"Generates a new ",[22,68,72],{"href":69,"rel":70},"https://en.wikipedia.org/wiki/Watts_and_Strogatz_model",[71],"nofollow","Watts-Strogatz small-world network",".",[64,75,76,77,80,81,73],{},"The algorithm begins by creating a ring of nodes, where each node is connected to ",[78,79,56],"code",{}," nodes on either side. Then, each link is rewired with probability ",[78,82,83],{},"rewire-prob",[64,85,86,87,90,91,94],{},"If you specify an ",[88,89,62],"em",{},", it is executed for each turtle in the newly created network. Furthermore, the turtles are generated in the order they appear as in ",[78,92,93],{},"create-ordered-turtles",". So, in order to lay the ring out as a ring, you can do something like:",[96,97,98],"pre",{},[78,99,100,47,105,47,110,47,114,47,119,47,123,127,128,47,133,137],{},[38,101,25],{"className":102},[103,104],"token","variable",[38,106,109],{"className":107},[103,108],"reporter","turtles",[38,111,113],{"className":112},[103,108],"links",[38,115,118],{"className":116},[103,117],"number","50",[38,120,122],{"className":121},[103,117],"2",[38,124,126],{"className":125},[103,117],"0.1"," [ ",[38,129,132],{"className":130},[103,131],"command","fd",[38,134,136],{"className":135},[103,117],"10"," ]",{"title":139,"searchDepth":140,"depth":141,"links":142},"",5,3,[143],{"id":19,"depth":141,"text":144,"children":145},"\n    nw:generate-watts-strogatz\n  ",[146],{"id":29,"depth":147,"text":148},4,"\n    nw:generate-watts-strogatz turtle-breed link-breed num-nodes neighborhood-size rewire-probability optional-command-block\n  ","Documentation for the generate-watts-strogatz primitive.","md",{"source":152,"metadataOutputPath":153,"projectConfig":154,"language":161,"inheritFrom":169,"output":168,"version":155,"layout":170,"dictionaryDisplayName":171,"dictionaryHomeDirectory":172,"indexFileURI":173,"currentItemId":14,"currentItemLabel":25,"primRoot":174,"icon":175,"extensionName":176,"assetsRoot":156},"../../external/extensions/nw/nw/generate-watts-strogatz.md","content/nw/generate-watts-strogatz.metadata.yaml",{"version":155,"projectRoot":73,"scanRoot":156,"outputRoot":157,"defaults":158,"engine":164,"partials":165,"dedupeIdenticalDiskWrites":168},"7.0.4","/home/runner/work/Helio/Helio/external/extensions/nw","content",{"inheritFrom":159,"language":161,"output":162,"extension":150,"title":163,"version":155},[160],0,"en",false,"NetLogo User Manual","mustache",{"directoryPaths":166,"extensions":167},[73],[164,150],true,[160],"catalog","Networks Extension Dictionary","/nw.html","/_index/extensions/nw.txt","nw","i-lucide-network",{"shortName":174,"fullName":177},"Networks","/nw/generate-watts-strogatz",{"title":5,"description":149},"nw/generate-watts-strogatz","mCOqrKoNB8jQs6-2-LT6nJt709ClRXooQ_LdjmmMX8k",[183,188],{"title":184,"path":185,"stem":186,"description":187},"Networks Extension Dictionary: generate-star","/nw/generate-star","nw/generate-star","Documentation for the generate-star primitive.",{"title":189,"path":190,"stem":191,"description":192},"Networks Extension Dictionary: generate-wheel","/nw/generate-wheel","nw/generate-wheel","Documentation for the generate-wheel primitive.",1777657883236]