[{"data":1,"prerenderedAt":303},["ShallowReactive",2],{"/nw/generate-small-world":3,"/nw/generate-small-world-surround":292},{"id":4,"title":5,"body":6,"description":258,"extension":259,"meta":260,"navigation":278,"path":288,"seo":289,"stem":290,"__hash__":291},"content/nw/generate-small-world.md","Networks Extension Dictionary: generate-small-world",{"type":7,"value":8,"toc":247},"minimark",[9],[10,11,15,16,15,26,66,91,109,115,165,168],"div",{"className":12,"id":14},[13],"dict_entry","generate-small-world","\n  ",[17,18,20,21,15],"h3",{"id":19},"nwgenerate-small-world","\n    ",[22,23,25],"a",{"href":24},"#generate-small-world","nw:generate-small-world",[27,28,32],"h4",{"id":29,"className":30},"nwgenerate-small-world-turtle-breed-link-breed-row-count-column-count-clustering-exponent-is-toroidal-optional-command-block",[31],"section-heading",[22,33,20,37,15],{"className":34,"href":36},[35],"section-anchor","#----nwgenerate-small-world-turtle-breed-link-breed-row-count-column-count-clustering-exponent-is-toroidal-optional-command-block--",[38,39,42,43,47,48,47,51,47,54,47,57,47,60,47,63],"span",{"className":40},[41],"prim_example","nw:generate-small-world ",[44,45,46],"i",{},"turtle-breed"," ",[44,49,50],{},"link-breed",[44,52,53],{},"row-count",[44,55,56],{},"column-count",[44,58,59],{},"clustering-exponent",[44,61,62],{},"is-toroidal",[44,64,65],{},"optional-command-block",[67,68,69,70,76,77,82,83,90],"p",{},"Generates a new ",[22,71,75],{"href":72,"rel":73},"https://en.wikipedia.org/wiki/Small-world_network",[74],"nofollow","small-world network"," using the ",[22,78,81],{"href":79,"rel":80},"https://en.wikipedia.org/wiki/Small_world_routing#The_Kleinberg_Model",[74],"Kleinberg Model",". Note that ",[22,84,86],{"href":85},"/nw/generate-watts-strogatz",[87,88,89],"code",{},"nw:generate-watts-strogatz"," generates a more traditional small-world network.",[67,92,93,94,97,98,101,102,104,105,108],{},"The algorithm proceeds by generating a lattice of the given number of rows and columns (the lattice will wrap around itself if ",[95,96,62],"em",{}," is ",[87,99,100],{},"true","). The “small world effect” is created by adding additional links between the nodes in the lattice. The higher the ",[95,103,59],{},", the more the algorithm will favor already close-by nodes when adding new links. A clustering exponent of ",[87,106,107],{},"2.0"," is typically used.",[67,110,111,112,114],{},"If you specify an ",[95,113,65],{},", it is executed for each turtle in the newly created network. For example:",[116,117,118],"pre",{},[87,119,120,47,125,47,130,47,134,47,139,47,142,47,145,150,151,47,156,47,160,164],{},[38,121,25],{"className":122},[123,124],"token","variable",[38,126,129],{"className":127},[123,128],"reporter","turtles",[38,131,133],{"className":132},[123,128],"links",[38,135,138],{"className":136},[123,137],"number","10",[38,140,138],{"className":141},[123,137],[38,143,107],{"className":144},[123,137],[38,146,149],{"className":147},[123,148],"constant","false"," [ ",[38,152,155],{"className":153},[123,154],"command","set",[38,157,159],{"className":158},[123,128],"color",[38,161,163],{"className":162},[123,148],"red"," ]",[67,166,167],{},"The turtles are generated in the order that they appear in the lattice. So, for instance, to generate a kleinberg lattice accross the entire world, and lay it out accordingly, try the following:",[116,169,170],{},[87,171,172,47,175,47,178,47,181,47,185,47,189,47,192,195,198,199,203,204,47,208,211,212,47,215,219,220,47,224,227,228,47,232,47,236,150,239,47,243,246],{},[38,173,25],{"className":174},[123,124],[38,176,129],{"className":177},[123,128],[38,179,133],{"className":180},[123,128],[38,182,184],{"className":183},[123,128],"world-width",[38,186,188],{"className":187},[123,128],"world-height",[38,190,107],{"className":191},[123,137],[38,193,149],{"className":194},[123,148],[196,197],"br",{},"(",[38,200,202],{"className":201},[123,154],"foreach"," (",[38,205,207],{"className":206},[123,128],"sort",[38,209,129],{"className":210},[123,128],") (",[38,213,207],{"className":214},[123,128],[38,216,218],{"className":217},[123,128],"patches",") [ [",[38,221,223],{"className":222},[123,124],"t",[38,225,67],{"className":226},[123,124],"] ",[38,229,231],{"className":230},[123,128],"->",[38,233,235],{"className":234},[123,154],"ask",[38,237,223],{"className":238},[123,124],[38,240,242],{"className":241},[123,154],"move-to",[38,244,67],{"className":245},[123,124]," ] ])",{"title":248,"searchDepth":249,"depth":250,"links":251},"",5,3,[252],{"id":19,"depth":250,"text":253,"children":254},"\n    nw:generate-small-world\n  ",[255],{"id":29,"depth":256,"text":257},4,"\n    nw:generate-small-world turtle-breed link-breed row-count column-count clustering-exponent is-toroidal optional-command-block\n  ","Documentation for the generate-small-world primitive.","md",{"source":261,"metadataOutputPath":262,"projectConfig":263,"language":271,"inheritFrom":279,"output":278,"version":264,"layout":280,"dictionaryDisplayName":281,"dictionaryHomeDirectory":282,"indexFileURI":283,"currentItemId":14,"currentItemLabel":25,"primRoot":284,"icon":285,"extensionName":286,"assetsRoot":266},"../../external/extensions/nw/nw/generate-small-world.md","content/nw/generate-small-world.metadata.yaml",{"version":264,"projectRoot":265,"scanRoot":266,"outputRoot":267,"defaults":268,"engine":274,"partials":275,"dedupeIdenticalDiskWrites":278},"7.0.4",".","/home/runner/work/Helio/Helio/external/extensions/nw","content",{"inheritFrom":269,"language":271,"output":272,"extension":259,"title":273,"version":264},[270],0,"en",false,"NetLogo User Manual","mustache",{"directoryPaths":276,"extensions":277},[265],[274,259],true,[270],"catalog","Networks Extension Dictionary","/nw.html","/_index/extensions/nw.txt","nw","i-lucide-network",{"shortName":284,"fullName":287},"Networks","/nw/generate-small-world",{"title":5,"description":258},"nw/generate-small-world","b8WFS-T5Ysp0nAjux7_k0RroIi4JGDUH3ikenLp3smA",[293,298],{"title":294,"path":295,"stem":296,"description":297,"children":-1},"Networks Extension Dictionary: generate-ring","/nw/generate-ring","nw/generate-ring","Documentation for the generate-ring primitive.",{"title":299,"path":300,"stem":301,"description":302,"children":-1},"Networks Extension Dictionary: generate-star","/nw/generate-star","nw/generate-star","Documentation for the generate-star primitive.",1777657777606]