[{"data":1,"prerenderedAt":4050},["ShallowReactive",2],{"/transition":3,"/transition-surround":4039},{"id":4,"title":5,"body":6,"description":4005,"extension":4006,"meta":4007,"navigation":4025,"path":4035,"seo":4036,"stem":4037,"__hash__":4038},"content/transition.md","Transition Guide",{"type":7,"value":8,"toc":3922},"minimark",[9,21,25,28,38,111,119,127,139,146,156,193,204,221,230,279,285,319,326,335,345,354,382,389,398,435,484,487,512,518,527,546,549,552,614,617,620,630,641,650,657,666,675,678,687,690,699,735,744,759,768,789,795,915,929,938,983,1004,1016,1024,1033,1040,1043,1063,1072,1089,1102,1118,1125,1134,1146,1158,1167,1170,1178,1185,1192,1201,1204,1207,1210,1352,1355,1427,1430,1485,1488,1497,1500,1509,1525,1530,1541,1555,1565,1583,1595,1604,1607,1610,1613,1616,1619,1628,1631,1634,1637,1646,1649,1652,1655,1662,1671,1674,1691,1699,1702,1725,1734,1737,1740,1749,1760,1769,1779,1793,1808,1817,1820,1827,1842,1845,1867,1873,1892,1895,1967,1970,1994,1997,2019,2027,2030,2052,2055,2089,2092,2120,2132,2139,2148,2177,2186,2221,2229,2243,2282,2291,2325,2328,2356,2359,2382,2385,2388,2391,2403,2462,2471,2474,2477,2480,2487,2519,2534,2537,2557,2560,2583,2611,2623,2642,2714,2717,2850,2855,2875,2884,2906,2947,2953,2963,2974,2987,2997,3009,3031,3034,3064,3070,3073,3081,3084,3117,3131,3134,3143,3163,3173,3176,3197,3200,3203,3213,3222,3225,3259,3262,3334,3343,3346,3349,3352,3355,3358,3361,3370,3379,3382,3385,3489,3492,3495,3595,3598,3601,3610,3651,3660,3685,3693,3702,3737,3763,3770,3777,3786,3810,3819,3827,3836,3866,3872,3875,3903,3906],[10,11,15],"h1",{"id":12,"className":13},"transition-guide",[14],"section-heading",[16,17,5],"a",{"className":18,"href":20},[19],"section-anchor","#transition-guide",[22,23,24],"p",{},"Many models created in earlier versions of NetLogo also work in NetLogo 7.0.\nHowever, some models will need changes. If an old model isn’t working, this\nsection of the User Manual may be able to help you.",[22,26,27],{},"What issues may arise depends on what version of NetLogo the model was created\nwith.",[22,29,30,31,37],{},"This guide only covers changes most likely to cause issues for users. See the\n",[16,32,36],{"href":33,"rel":34},"https://github.com/NetLogo/NetLogo/wiki/Release-notes",[35],"nofollow","release notes"," for more\ncomplete details on differences between versions.",[39,40,43,53],"div",{"className":41},[42],"toc",[44,45,48],"h4",{"id":46,"className":47},"table-of-contents",[14],[16,49,52],{"className":50,"href":51},[19],"#table-of-contents","Table of Contents",[54,55,56,63,69,75,81,87,93,99,105],"ul",{},[57,58,59],"li",{},[16,60,62],{"href":61},"#changes-for-netlogo-700","Changes for NetLogo 7.0.0",[57,64,65],{},[16,66,68],{"href":67},"#changes-for-netlogo-610","Changes for NetLogo 6.1.0",[57,70,71],{},[16,72,74],{"href":73},"#changes-for-netlogo-603","Changes for NetLogo 6.0.3",[57,76,77],{},[16,78,80],{"href":79},"#changes-for-netlogo-60","Changes for NetLogo 6.0",[57,82,83],{},[16,84,86],{"href":85},"#changes-for-netlogo-52","Changes for NetLogo 5.2",[57,88,89],{},[16,90,92],{"href":91},"#changes-for-netlogo-50","Changes for NetLogo 5.0",[57,94,95],{},[16,96,98],{"href":97},"#changes-for-netlogo-41","Changes for NetLogo 4.1",[57,100,101],{},[16,102,104],{"href":103},"#changes-for-netlogo-40","Changes for NetLogo 4.0",[57,106,107],{},[16,108,110],{"href":109},"#changes-for-netlogo-31","Changes for NetLogo 3.1",[112,113,116],"h2",{"id":114,"className":115},"changes-for-netlogo-700",[14],[16,117,62],{"className":118,"href":61},[19],[22,120,121,122,126],{},"See the following page for a list of important changes since NetLogo 6.4:\n",[16,123,125],{"href":124},"netlogo7intro","NetLogo 7.0.0 Changes Overview",".",[22,128,129,130,134,135,126],{},"Changes directly affecting models are\n",[16,131,133],{"href":132},"netlogo7intro#new-file-format","the new file format"," and\n",[16,136,138],{"href":137},"netlogo7intro#widget-sizes","widget size conversion",[112,140,143],{"id":141,"className":142},"changes-for-netlogo-610",[14],[16,144,68],{"className":145,"href":67},[19],[147,148,151],"h3",{"id":149,"className":150},"cf-extension-removal",[14],[16,152,155],{"className":153,"href":154},[19],"#cf-extension-removal","CF Extension Removal",[22,157,158,159,163,164,167,168,163,180,188,189,192],{},"The CF extension is no longer bundled with NetLogo. The multi-conditional\n",[160,161,162],"code",{},"cf:ifelse"," and ",[160,165,166],{},"cf:ifelse-value"," primitives are now now supported directly in\nNetLogo without an extension by ",[169,170,172],"primitive",{"displayText":171,"permalink":171},"ifelse",[16,173,171],{"href":174,"rel":175,"className":177,"dataDisplayText":171,"target":179,"title":171},"/dictionary#ifelse",[176],"noopener",[178],"netlogo-wiki-link","_self",[169,181,183],{"displayText":182,"permalink":182},"ifelse-value",[16,184,182],{"href":185,"rel":186,"className":187,"dataDisplayText":182,"target":179,"title":182},"/dictionary#ifelse-value",[176],[178],". Simply remove\nthe ",[160,190,191],{},"cf:"," from the primitives in your models and they should work as they did\nbefore with CF.",[147,194,197],{"id":195,"className":196},"ifelse-value-precedence-change-with-infix-operators",[14],[16,198,201,203],{"className":199,"href":200},[19],"#ifelse-value-precedence-change-with-infix-operators",[160,202,182],{}," Precedence Change with Infix Operators",[22,205,206,207,209,210,213,214,217,218,220],{},"In previous versions, ",[160,208,182],{}," expressions would be parsed before infix\nexpressions they were a part of, like ",[160,211,212],{},"+"," or ",[160,215,216],{},"-",". Now ",[160,219,182],{}," has a lower\nprecedence to let it work with a variable number of clauses.",[22,222,223,224,226,227,229],{},"This used to work, but will now complain about finding a block or list where it\nwanted a number, since the ",[160,225,212],{}," is parsed before the ",[160,228,182],{},":",[231,232,233],"pre",{},[160,234,235,241,242,247,248,253,254,258,259,262,263,241,266,247,270,253,274,278],{},[236,237,182],"span",{"className":238},[239,240],"token","reporter"," (",[236,243,246],{"className":244},[239,245],"constant","true",") [",[236,249,252],{"className":250},[239,251],"number","10","] [",[236,255,257],{"className":256},[239,251],"3","] ",[236,260,212],{"className":261},[239,240]," ",[236,264,182],{"className":265},[239,240],[236,267,269],{"className":268},[239,245],"false",[236,271,273],{"className":272},[239,251],"5",[236,275,277],{"className":276},[239,251],"7","]",[22,280,281,282,284],{},"Now you just need to wrap your ",[160,283,182],{}," in parenthesis to tell NetLogo\nthat you want to add the separate expressions:",[231,286,287],{},[160,288,289,290,241,293,247,296,253,299,302,303,241,306,241,309,247,312,253,315,318],{},"(",[236,291,182],{"className":292},[239,240],[236,294,246],{"className":295},[239,245],[236,297,252],{"className":298},[239,251],[236,300,257],{"className":301},[239,251],"]) ",[236,304,212],{"className":305},[239,240],[236,307,182],{"className":308},[239,240],[236,310,269],{"className":311},[239,245],[236,313,273],{"className":314},[239,251],[236,316,277],{"className":317},[239,251],"])",[112,320,323],{"id":321,"className":322},"changes-for-netlogo-603",[14],[16,324,74],{"className":325,"href":73},[19],[147,327,330],{"id":328,"className":329},"arduino-extension-changes",[14],[16,331,334],{"className":332,"href":333},[19],"#arduino-extension-changes","Arduino Extension Changes",[22,336,337,338,341,342,344],{},"The ",[160,339,340],{},"arduino"," extension has substantially changed the way it receives values\nfrom Arduino boards. Please consult the arduino example sketch (included within\nthe “models” folder under Chapter 8 of the IABM textbook) for an updated sketch\ncompatible with the Arduino example model. If you have an existing arduino\nsketch, you will need to adjust the format used to send values to NetLogo. Old\nsketches will have code which sends back messages like “;A,2.5;”. For the new\nversion of the ",[160,343,340],{}," extension to receive the same message, sketches should\nsend “;A,D,2.5;” instead. The added ‘D,’ informs Netlogo that the value being\nsent is a number and not a string.",[147,346,349],{"id":347,"className":348},"cf-extension-changes",[14],[16,350,353],{"className":351,"href":352},[19],"#cf-extension-changes","CF Extension Changes",[22,355,356,357,360,361,163,363,365,366,368,369,163,371,373,374,378,379,381],{},"All primitives have been removed from the ",[160,358,359],{},"cf"," extension and replaced by the\n",[160,362,162],{},[160,364,166],{}," multi-branch primitives. We encourage existing\n",[160,367,359],{}," users to adjust their code to use these new primitives. Over time, we hope\nto use these primitives as an example on which to remodel NetLogo’s existing\n",[160,370,171],{},[160,372,182],{}," primitives. Because this would be a relatively large\nlanguage change, we would love to hear any\n",[16,375,377],{"href":376},"mailto:netlogo@northwestern.edu","feedback address"," you may have from\nusing these ",[160,380,359],{}," extension primitives.",[112,383,386],{"id":384,"className":385},"changes-for-netlogo-60",[14],[16,387,80],{"className":388,"href":79},[19],[147,390,393],{"id":391,"className":392},"tasks-replaced-by-anonymous-procedures",[14],[16,394,397],{"className":395,"href":396},[19],"#tasks-replaced-by-anonymous-procedures","Tasks replaced by Anonymous Procedures",[22,399,400,401,404,405,409,410,413,414,417,418,421,422,134,425,428,429,134,432,126],{},"In NetLogo 6.0, tasks have been replaced by anonymous procedures. This means\nthat ",[160,402,403],{},"task"," is no longer a primitive, it’s been replaced by the new\n",[16,406,408],{"href":407},"dictionary#arrow","arrow syntax"," for creating anonymous procedures.\nSimilarly, question mark variables like ",[160,411,412],{},"?",", ",[160,415,416],{},"?1",", and ",[160,419,420],{},"?2"," are now just\nordinary names in NetLogo and can be used to name procedure variables, let\nvariables, or anonymous procedure variables. Finally, ",[160,423,424],{},"is-reporter-task?",[160,426,427],{},"is-command-task?"," have been replaced by ",[160,430,431],{},"is-anonymous-reporter?",[160,433,434],{},"is-anonymous-command?",[22,436,437,438,454,455,478,479,483],{},"To make this transition easier, we’ve added an automatic conversion step which\nshould allow most models saved in NetLogo 5 to be converted to use the new\nsyntax automatically. The autoconverter has been a substantial piece of effort\nand we’ve tested it on all the models in the models library. To use it, ensure\nthe model compiles and run properly in NetLogo 5 or later, then save it from\nNetLogo 5 or later. Then, simply open the model in NetLogo 6. If all goes well,\nyou’ll see the converter has changed code like ",[160,439,440,443,444,262,448,262,451,278],{},[236,441,403],{"className":442},[239,240]," [",[236,445,416],{"className":446},[239,447],"variable",[236,449,212],{"className":450},[239,240],[236,452,420],{"className":453},[239,447]," to\n",[160,456,457,458,262,461,258,464,262,468,262,471,262,474,477],{},"[ [",[236,459,416],{"className":460},[239,447],[236,462,420],{"className":463},[239,447],[236,465,467],{"className":466},[239,240],"->",[236,469,416],{"className":470},[239,447],[236,472,212],{"className":473},[239,240],[236,475,420],{"className":476},[239,447]," ]",". The question marks are meant to serve as temporary\nplaceholders for conversion. They enable your model to run, but you can (and\nshould) replace these variables with meaningful names. If you open a model with\ntasks and it has ",[480,481,482],"em",{},"not"," been converted, the autoconverter wasn’t able to convert\nyour model. Rather than attempt to autoconvert your model and break something,\nthe model will open, you will be shown the appropriate errors and given a chance\nto edit your model.",[22,485,486],{},"While we have tested the autoconverter thoroughly, we expect there to be some\ncases it doesn’t cover.",[54,488,489,492],{},[57,490,491],{},"If you make use of extensions that aren’t yet compiled for NetLogo 6, the\nautoconverter will not work until those extensions have been updated.",[57,493,494,495,213,498,501,502,163,504,506,507,213,509,511],{},"If your code uses ",[160,496,497],{},"run",[160,499,500],{},"runresult"," to evaluate strings containing tasks,\nthe autoconverter will not change those strings to be anonymous procedures. To\nmake ",[160,503,497],{},[160,505,500],{}," work as expected, look at strings in your model and\nchange any which rely on ",[160,508,403],{},[160,510,412],{},"-variables to instead rely on anonymous\nprocedures",[22,513,514,515,517],{},"If your model doesn’t fall into the above categories and doesn’t convert or\nconverts incorrectly, please email our\n",[16,516,377],{"href":376}," and we’ll be happy\nto offer whatever assistance we can.",[147,519,522],{"id":520,"className":521},"link-reporters-overhauled-to-be-more-consistent-and-flexible",[14],[16,523,526],{"className":524,"href":525},[19],"#link-reporters-overhauled-to-be-more-consistent-and-flexible","Link reporters overhauled to be more consistent and flexible",[22,528,529,530,533,534,537,538,541,542,545],{},"In previous versions of NetLogo, link reporters have had a number of\ninconsistencies regarding directed and undirected links. For example, ",[160,531,532],{},"my-links","\nwould report ",[480,535,536],{},"all"," links connected to a turtle, whereas ",[160,539,540],{},"link-neighbors"," would\nonly report neighbors connected by ",[480,543,544],{},"undirected"," links. Furthermore, it was quite\ndifficult to work with models where the links could either be directed or\nundirected.",[22,547,548],{},"To alleviate these issues, the link primitives have been overhauled in 6.0.\nThese changes only affect existing models that use both directed and undirected\nlinks while also using the unbreeded link primitives.",[22,550,551],{},"The changes are as follows:",[54,553,554,584,608],{},[57,555,556,557,560,561,563,564,583],{},"Link reporters that contain the word “out” now utilize both directed, outgoing\nlinks and undirected links. That is, they now specify links that can be used\nto get from the current node to other nodes. For example, ",[160,558,559],{},"out-link-neighbor?","\nwill report ",[160,562,246],{}," if the current turtle is connected to the given turtle by\neither an outgoing directed link or an undirected link. If you only want\ndirected, outgoing links, you can use a breed-specific reporter or\n",[160,565,566,262,570,574,575,262,579,477],{},[236,567,569],{"className":568},[239,240],"my-out-links",[236,571,573],{"className":572},[239,240],"with"," [ ",[236,576,578],{"className":577},[239,447],"is-directed?",[236,580,582],{"className":581},[239,240],"self",". Generally, when working with models\nthat have both directed and undirected links, you will probably want to use\nthe “out” primitives for most things now.",[57,585,586,587,560,590,592,593,126],{},"Link reporters that contain the word “in” now utilize both directed, incoming\nlinks and undirected links. That is, they now specify links that can be used\nto get to the current node from other nodes. For example, ",[160,588,589],{},"in-link-neighbor?",[160,591,246],{}," if the current turtle is connected to the given turtle by\neither an incoming directed link or an undirected link. If you only want\ndirected, incoming links, you can use a breed-specific reporter or\n",[160,594,595,262,599,574,602,262,605,477],{},[236,596,598],{"className":597},[239,240],"my-in-links",[236,600,573],{"className":601},[239,240],[236,603,578],{"className":604},[239,447],[236,606,582],{"className":607},[239,240],[57,609,610,611,613],{},"Link reporters that do not specify “out” or “in” utilize ",[480,612,536],{}," links.",[22,615,616],{},"Furthermore, there are no longer restrictions regarding which reporters can be\nused with which breeds. For unbreeded links, this makes it possible to use the\nsame primitives regardless of whether your network ends up being directed or\nundirected.",[22,618,619],{},"The new behavior (including all changed primitives) is summarized by the\nfollowing table, where “un” refers to undirected links, “out” refers to\ndirected, outgoing links, and “in” refers to directed, incoming links.",[621,622,625],"h5",{"id":623,"className":624},"new-link-reporter-behavior",[14],[16,626,629],{"className":627,"href":628},[19],"#new-link-reporter-behavior","New link reporter behavior",[22,631,632],{},[633,634],"img",{"alt":635,"src":636,"width":637,"height":638,"style":639},"Table showing new link behavior","/_content/images/transition/new-link-behavior.png",511,401,{"aspectRatio":640},"511/401",[621,642,645],{"id":643,"className":644},"old-link-reporter-behavior",[14],[16,646,649],{"className":647,"href":648},[19],"#old-link-reporter-behavior","Old link reporter behavior",[22,651,652],{},[633,653],{"alt":654,"src":655,"width":637,"height":638,"style":656},"Table showing old link behavior","/_content/images/transition/old-link-behavior.png",{"aspectRatio":640},[147,658,661],{"id":659,"className":660},"removal-of-applets",[14],[16,662,665],{"className":663,"href":664},[19],"#removal-of-applets","Removal of Applets",[22,667,668,669,674],{},"Oracle, the company behind Java, has announced that Java applets are deprecated\n(see\n",[16,670,673],{"href":671,"rel":672},"https://blogs.oracle.com/java-platform-group/entry/moving_to_a_plugin_free",[35],"this blog post","\nfor more information). This comes as the major browsers have removed support for\nplug-ins (like java applets) or announced that they plan to do so.",[22,676,677],{},"Instead of using applets to distribute your model, NetLogo offers the option to\nexport to NetLogo Web. While NetLogo Web doesn’t yet offer the full\nfunctionality of desktop NetLogo (in particular, extensions aren’t supported),\nit is now capable of running most of the models in the NetLogo models library\nand we hope that most model distributors will find that it meets their needs. To\nexport to NetLogo Web, choose the “Save As NetLogo Web” option from the “File”\nmenu.",[147,679,682],{"id":680,"className":681},"changes-to-the-netlogo-user-interface",[14],[16,683,686],{"className":684,"href":685},[19],"#changes-to-the-netlogo-user-interface","Changes to the NetLogo User Interface",[22,688,689],{},"Users will notice several tweaks to the NetLogo User interface when opening\nNetLogo 6 for the first time. We’ve removed the bar border above the view. To\nopen the 3D View in 6.0, you can right click on the view and choose “Switch to\n3D View”, or choose the same option from the “Tools” menu. Ticks are now\ndisplayed in the interface tab toolbar beneath the speed slider. To adjust the\nlabel used for “ticks” and other view properties, you can choose the “Settings”\nbutton at the far right of the interface tab toolbar or right-click on the view\nand choose “Edit…” from the context menu that appears.",[147,691,694],{"id":692,"className":693},"nobody-not-permitted-as-a-chooser-value",[14],[16,695,698],{"className":696,"href":697},[19],"#nobody-not-permitted-as-a-chooser-value","Nobody Not Permitted as a Chooser Value",[22,700,701,702,705,706,213,716,413,719,721,722,724,725,727,728,730,731,734],{},"In NetLogo 6.0, ",[160,703,704],{},"nobody"," is no longer a valid chooser value. Just as you can’t\nput ",[160,707,708,262,712],{},[236,709,711],{"className":710},[239,240],"turtle",[236,713,715],{"className":714},[239,251],"0",[160,717,718],{},"turtles",[160,720,704],{}," refers to a non-literal value which isn’t\nsupported in choosers. As part of this transition, choosers containing ",[160,723,704],{},"\n(or ",[160,726,704],{}," within a nested list) will have all uses of ",[160,729,704],{}," changed to\n",[160,732,733],{},"\"nobody\""," when opened in NetLogo 6.0.",[147,736,739],{"id":737,"className":738},"breeds-must-have-singular-and-plural-names",[14],[16,740,743],{"className":741,"href":742},[19],"#breeds-must-have-singular-and-plural-names","Breeds must have singular and plural names",[22,745,746,747,758],{},"In NetLogo 6.0, you must specify both plural and singular breed names. In prior\nversions, declarations like ",[160,748,749,443,754,278],{},[236,750,753],{"className":751},[239,752],"keyword","breed",[236,755,757],{"className":756},[239,447],"mice"," were legal, but this support has been\nremoved in 6.0. If you have models which use only plural breed names, it is\nrecommended that you convert them to specify both names before opening in 6.0\nsince doing so will permit the NetLogo converter to work most effectively on any\nother code in your model which needs conversion.",[147,760,763],{"id":761,"className":762},"removal-of-movie-prims",[14],[16,764,767],{"className":765,"href":766},[19],"#removal-of-movie-prims","Removal of “Movie” Prims",[22,769,770,771,774,775,777,778,781,782,784,785,788],{},"The NetLogo movie prims hadn’t been updated in quite some time and generated\ninvalid quicktime movie files. They have been replaced by prims in the new ",[160,772,773],{},"vid","\nextension. The full documentation for the ",[160,776,773],{}," extension is available in the\n",[16,779,780],{"href":773},"Vid Extension"," section of the manual. As with all extensions, users\nwill need to include ",[160,783,773],{}," in the ",[160,786,787],{},"extensions"," section of their NetLogo model.",[22,790,791,792,794],{},"Many of the movie primitives have direct parallels in the ",[160,793,773],{}," extension which\ncan be found in the following table:",[39,796,799],{"className":797},[798],"table-container",[800,801,802,815],"table",{},[803,804,805],"thead",{},[806,807,808,812],"tr",{},[809,810,811],"th",{},"movie prim",[809,813,814],{},"vid prim",[816,817,818,831,850,862,874,903],"tbody",{},[806,819,820,826],{},[821,822,823],"td",{},[160,824,825],{},"movie-cancel",[821,827,828],{},[160,829,830],{},"vid:reset-recorder",[806,832,833,838],{},[821,834,835],{},[160,836,837],{},"movie-close",[821,839,840],{},[160,841,842,262,846],{},[236,843,845],{"className":844},[239,447],"vid:save-recording",[236,847,849],{"className":848},[239,447],"*file-name*",[806,851,852,857],{},[821,853,854],{},[160,855,856],{},"movie-grab-view",[821,858,859],{},[160,860,861],{},"vid:record-view",[806,863,864,869],{},[821,865,866],{},[160,867,868],{},"movie-grab-interface",[821,870,871],{},[160,872,873],{},"vid:record-interface",[806,875,876,887],{},[821,877,878],{},[160,879,880,262,884],{},[236,881,883],{"className":882},[239,447],"movie-start",[236,885,849],{"className":886},[239,447],[821,888,889],{},[160,890,891,262,895,262,899],{},[236,892,894],{"className":893},[239,447],"vid:start-recorder",[236,896,898],{"className":897},[239,447],"*optional-width*",[236,900,902],{"className":901},[239,447],"*optional-height*",[806,904,905,910],{},[821,906,907],{},[160,908,909],{},"movie-status",[821,911,912],{},[160,913,914],{},"vid:recorder-status",[22,916,917,918,921,922,924,925,928],{},"When you first open a file in NetLogo 6.0, your file will be automatically\nconverted to use the new primitives. This will include adding a new global\nvariable - ",[160,919,920],{},"_recording-save-file-name"," to track the name of the active\nrecording, as well as adding the ",[160,923,773],{}," extension to the model. You should verify\nthat the conversion took place correctly. There is no replacement for\n",[160,926,927],{},"movie-set-frame-rate",". The vid extension records frames at 25 per second,\nslightly more than the default 15 frames-per-second of the movie prims. If your\nrecording is sensitive to framerate, consider recording each existing frame\ntwice (2/25 is fairly close to 1/15) or consider using a postprocessing tool\n(like gstreamer or ffmpeg) to adjust the video playback speed.",[147,930,933],{"id":931,"className":932},"improved-name-collision-detection",[14],[16,934,937],{"className":935,"href":936},[19],"#improved-name-collision-detection","Improved Name Collision Detection",[22,939,940,941,955,956,970,971,213,974,977,978,213,980,982],{},"In NetLogo 6.0, expanded error-checking in the NetLogo compiler causes models\nwhich define ",[160,942,943,574,947,262,951,477],{},[236,944,946],{"className":945},[239,752],"undirected-link-breed",[236,948,950],{"className":949},[239,447],"undirected-links",[236,952,954],{"className":953},[239,447],"undirected-link"," and/or\n",[160,957,958,574,962,262,966,477],{},[236,959,961],{"className":960},[239,752],"directed-link-breed",[236,963,965],{"className":964},[239,447],"directed-links",[236,967,969],{"className":968},[239,447],"directed-link"," to error for redefining a\nprimitive reporter (either ",[160,972,973],{},"is-directed-link?",[160,975,976],{},"is-undirected-link?","). If\nyour model doesn’t use ",[160,979,973],{},[160,981,976],{}," at all,\nsimply changing the breed names should resolve the error.",[22,984,985,986,989,990,955,992,994,995,997,998,1000,1001,126],{},"If you used either of the ",[160,987,988],{},"is-\u003Cdirectedness>-link?"," prim, there are several ways\nyou might modify your model to account for this change. If your model has no\nother breeded links, consider removing the link breed and using the built-in\nlink primitives. If your model has other breeded links, but only of different\ndirectedness, simply changing the breed name (and all related primitive names)\nshould resolve the problem. Note that in this case ",[160,991,973],{},[160,993,976],{}," continue to behave the same as before. If your model has\nother breeded links of the same directedness, the change will vary depending on\nyour model. The breed name(s) must be changed, but you must decide whether you\nused ",[160,996,973],{}," / ",[160,999,976],{}," to check link directedness or\nto check that link breed membership. If you used it to check link directedness\nleaving it as-is should keep the current behavior of the model. Otherwise, it\ncan simply be replaced by ",[160,1002,1003],{},"is-\u003Cbreed>?",[147,1005,1008],{"id":1006,"className":1007},"removal-of-hubnet-set-client-interface",[14],[16,1009,1012,1013],{"className":1010,"href":1011},[19],"#removal-of-hubnet-set-client-interface","Removal of ",[160,1014,1015],{},"hubnet-set-client-interface",[22,1017,337,1018,1020,1021,1023],{},[160,1019,1015],{}," primitive was rendered obsolete by the\nintroduction of the HubNet client editor and end of support for calculator\nHubNet. We have found it used in very few models and have decided to remove it\nfrom the language. On opening an existing model in 6.0, the autoconverter should\nremove all uses of ",[160,1022,1015],{}," from your code.",[147,1025,1028],{"id":1026,"className":1027},"improved-updated-extensions-api",[14],[16,1029,1032],{"className":1030,"href":1031},[19],"#improved--updated-extensions-api","Improved & Updated Extensions API",[22,1034,1035,1036,1039],{},"One of our goals in NetLogo 6.0 has been to make it easier to develop extensions\nand easy to develop more ",[480,1037,1038],{},"powerful"," extensions. To that end, we’ve bumped the\nextension API from 5.0 to 6.0. Existing extensions will need to recompile\nchanging the “NetLogo-Extension-API-Version” in their jar’s MANIFEST.MF from 5.0\nto 6.0.",[22,1041,1042],{},"Some of the changes we’ve made to the extensions API include:",[54,1044,1045,1054,1060],{},[57,1046,1047,1050,1051,126],{},[160,1048,1049],{},"org.nlogo.api.Context"," now allows access to the current world and workspace\nobjects without requiring a cast to an ",[160,1052,1053],{},"org.nlogo.nvm.ExtensionContext",[57,1055,1056,1059],{},[160,1057,1058],{},"org.nlogo.api.Workspace"," has been introduced as a stable API for extensions\nto depend on.",[57,1061,1062],{},"A NetLogo jar is now available from BinTray.",[22,1064,1065,1066,1071],{},"For a full list of changes between 5.0 and 6.0, please visit our\n",[16,1067,1070],{"href":1068,"rel":1069},"https://github.com/NetLogo/NetLogo/wiki/6.0-Extension-and-Controlling-API-Transition-Guide",[35],"Extension Transition Guide","\non GitHub.",[22,1073,1074,1075,1080,1081,1088],{},"In service of making it easier to build extensions, we’ve expanded and improved\nthe\n",[16,1076,1079],{"href":1077,"rel":1078},"https://github.com/NetLogo/NetLogo-Extension-Plugin",[35],"NetLogo Extension Plugin","\nfor ",[16,1082,1085],{"href":1083,"rel":1084},"http://www.scala-sbt.org/",[35],[160,1086,1087],{},"sbt",", the Scala Build Tool. Sbt is a powerful\ntool for building JVM projects and can be used in projects that use Scala, Java,\nor a combination of the two. We’re now using the Extension Plugin to build all\nof the bundled extensions and we strongly recommend extension authors take\nadvantage of the plugin as it makes configuring a NetLogo extension build\nextremely straightforward. The plugin handles fetching the NetLogo jar which\nextensions compile against as well as generation of a jar for the extension\ncontaining the appropriate metadata.",[147,1090,1093],{"id":1091,"className":1092},"add-range-primitive",[14],[16,1094,1097,1098,1101],{"className":1095,"href":1096},[19],"#add-range-primitive","Add ",[160,1099,1100],{},"range"," primitive",[22,1103,1104,1105,1107,1108,1110,1111,1114,1115,1117],{},"A new ",[160,1106,1100],{}," primitive was added in NetLogo 6. As “range” may appear in\nexisting models as a procedure or variable name, we have added an autoconversion\nstep which will ensure that these models continue to operate immediately upon\nopening in NetLogo 6. Existing uses of ",[160,1109,1100],{}," in models authored before NetLogo\n6 will be converted to ",[160,1112,1113],{},"_range"," upon first opening in NetLogo 6. Once the model\nopens, you can rename ",[160,1116,1113],{}," to suit your model.",[112,1119,1122],{"id":1120,"className":1121},"changes-for-netlogo-52",[14],[16,1123,86],{"className":1124,"href":85},[19],[147,1126,1129],{"id":1127,"className":1128},"hsb-primitives",[14],[16,1130,1133],{"className":1131,"href":1132},[19],"#hsb-primitives","hsb primitives",[22,1135,1136,1137,413,1140,163,1143,126],{},"In 5.2, the hsb primitives have been changed to work with the standard scale\nvalues of 360 for hue, and 100 for saturation and brightness. This affects the\nprimitives ",[160,1138,1139],{},"hsb",[160,1141,1142],{},"extract-hsb",[160,1144,1145],{},"approximate-hsb",[22,1147,1148,1149,413,1152,163,1155,126],{},"The old primitives, scaled to 255, are automatically transitioned to and have\nbeen renamed ",[160,1150,1151],{},"__hsb-old",[160,1153,1154],{},"__extract-hsb-old",[160,1156,1157],{},"__approximate-hsb-old",[147,1159,1162],{"id":1160,"className":1161},"gogo-extension",[14],[16,1163,1166],{"className":1164,"href":1165},[19],"#gogo-extension","GoGo extension",[22,1168,1169],{},"The GoGo extension has been upgraded to use newer GoGo boards with the HID\ninterface. Many of the older primitives no longer work, and will alert you to\nupgrading your GoGo board’s firmware.",[22,1171,1172,1173,126],{},"If you need to continue to use a serial interface, you can use the bundled\ngogo-serial extension. Change your model to use gogo-serial as opposed to gogo.\nMore details ",[16,1174,1177],{"href":1175,"rel":1176},"https://github.com/NetLogo/NetLogo/wiki/GoGo-Upgrade",[35],"here",[22,1179,1180,1181],{},"If you cannot upgrade to use the new HID extension nor the new serial extension,\nthe original extension can be found at\n",[16,1182,1183],{"href":1183,"rel":1184},"https://github.com/NetLogo/GoGo-RXTX-Extension",[35],[112,1186,1189],{"id":1187,"className":1188},"changes-for-netlogo-50",[14],[16,1190,92],{"className":1191,"href":91},[19],[147,1193,1196],{"id":1194,"className":1195},"plotting",[14],[16,1197,1200],{"className":1198,"href":1199},[19],"#plotting","Plotting",[22,1202,1203],{},"In 5.0, you don’t have to put your plotting code in the Code tab anymore.\nInstead, you can put it inside the plots themselves, in the Interface tab.",[22,1205,1206],{},"Nonetheless, the old style and all of the existing plotting primitives are still\nsupported. We recommend changing your model to use the new style, but if you\ndon’t, it should still work.",[22,1208,1209],{},"The following example shows how to change a model to use the new style. Suppose\nyou have a typical NetLogo 4.1 model with one plot called “populations” and two\npens called “robots” and “humans”. The old code might look like:",[231,1211,1212],{},[160,1213,1214,262,1218,1222,1225,1226,1231,1225,1233,1237,1225,1239,1243,1249,1251,262,1256,1260,1225,1262,1265,1225,1267,1271,1225,1273,1276,1281,1283,262,1288,1291,1225,1293,262,1297,1302,1225,1304,262,1308,1312,1225,1314,262,1318,262,1322,1326,1225,1328,262,1331,1335,1225,1337,262,1340,262,1343,1347],{},[236,1215,1217],{"className":1216},[239,752],"to",[236,1219,1221],{"className":1220},[239,447],"setup",[1223,1224],"br",{},"  ",[236,1227,1230],{"className":1228},[239,1229],"command","clear-all",[1223,1232],{},[236,1234,1236],{"className":1235},[239,447],"...",[1223,1238],{},[236,1240,1242],{"className":1241},[239,447],"do-plotting",[236,1244,1246,1248],{"className":1245},[239,752],[1223,1247],{},"end",[1223,1250],{},[236,1252,1254,1217],{"className":1253},[239,752],[1223,1255],{},[236,1257,1259],{"className":1258},[239,447],"go",[1223,1261],{},[236,1263,1236],{"className":1264},[239,447],[1223,1266],{},[236,1268,1270],{"className":1269},[239,1229],"tick",[1223,1272],{},[236,1274,1242],{"className":1275},[239,447],[236,1277,1279,1248],{"className":1278},[239,752],[1223,1280],{},[1223,1282],{},[236,1284,1286,1217],{"className":1285},[239,752],[1223,1287],{},[236,1289,1242],{"className":1290},[239,447],[1223,1292],{},[236,1294,1296],{"className":1295},[239,1229],"set-current-plot",[236,1298,1301],{"className":1299},[239,1300],"string","\"populations\"",[1223,1303],{},[236,1305,1307],{"className":1306},[239,1229],"set-current-plot-pen",[236,1309,1311],{"className":1310},[239,1300],"\"robots\"",[1223,1313],{},[236,1315,1317],{"className":1316},[239,1229],"plot",[236,1319,1321],{"className":1320},[239,240],"count",[236,1323,1325],{"className":1324},[239,447],"robots",[1223,1327],{},[236,1329,1307],{"className":1330},[239,1229],[236,1332,1334],{"className":1333},[239,1300],"\"humans\"",[1223,1336],{},[236,1338,1317],{"className":1339},[239,1229],[236,1341,1321],{"className":1342},[239,240],[236,1344,1346],{"className":1345},[239,447],"humans",[236,1348,1350,1248],{"className":1349},[239,752],[1223,1351],{},[22,1353,1354],{},"Here are the steps to make the transition:",[54,1356,1357,1375,1389,1395],{},[57,1358,1359,1360,1371,1372,1374],{},"Copy the ",[160,1361,1362,262,1365,262,1368],{},[236,1363,1317],{"className":1364},[239,1229],[236,1366,1321],{"className":1367},[239,240],[236,1369,1325],{"className":1370},[239,447]," command and paste it into the Update Commands\nfield for the robots pen in the plot edit dialog. Remove it from the\n",[160,1373,1242],{}," procedure.",[57,1376,337,1377,1388],{},[160,1378,1379,262,1382,262,1385],{},[236,1380,1317],{"className":1381},[239,1229],[236,1383,1321],{"className":1384},[239,240],[236,1386,1346],{"className":1387},[239,447]," command can be moved in the same way for the humans\npen.",[57,1390,1391,1392,1394],{},"After those lines are removed from the ",[160,1393,1242],{}," procedure, it doesn’t\nactually do anything anymore! Remove it.",[57,1396,1397,1398,1400,1401,134,1403,1405,1406,1408,1409,1411,1412,1415,1416,1418,1419,1421,1422,134,1424,1426],{},"The final step is to replace the ",[160,1399,1242],{}," procedure calls in ",[160,1402,1221],{},[160,1404,1259],{},". In ",[160,1407,1221],{},", the ",[160,1410,1242],{}," call should be changed to ",[160,1413,1414],{},"reset-ticks",".\nIn ",[160,1417,1259],{},", the do-plotting call should be changed to ",[160,1420,1270],{},". ",[160,1423,1414],{},[160,1425,1270],{}," will both cause plotting to happen automatically.",[22,1428,1429],{},"The resulting (much simpler) code looks like this:",[231,1431,1432],{},[160,1433,1434,262,1437,1440,1225,1442,1445,1225,1447,1450,1225,1452,1455,1460,1462,262,1467,1470,1225,1472,1475,1225,1477,1480],{},[236,1435,1217],{"className":1436},[239,752],[236,1438,1221],{"className":1439},[239,447],[1223,1441],{},[236,1443,1230],{"className":1444},[239,1229],[1223,1446],{},[236,1448,1236],{"className":1449},[239,447],[1223,1451],{},[236,1453,1414],{"className":1454},[239,1229],[236,1456,1458,1248],{"className":1457},[239,752],[1223,1459],{},[1223,1461],{},[236,1463,1465,1217],{"className":1464},[239,752],[1223,1466],{},[236,1468,1259],{"className":1469},[239,447],[1223,1471],{},[236,1473,1236],{"className":1474},[239,447],[1223,1476],{},[236,1478,1270],{"className":1479},[239,1229],[236,1481,1483,1248],{"className":1482},[239,752],[1223,1484],{},[22,1486,1487],{},"For more details on how plotting works in NetLogo 5.0, see the Plotting Sections\nof the Programming Guide and the Interface Guide. For details on how plotting\ninteracts with the tick counter, read on.",[147,1489,1492],{"id":1490,"className":1491},"tick-counter",[14],[16,1493,1496],{"className":1494,"href":1495},[19],"#tick-counter","Tick counter",[22,1498,1499],{},"The way the tick counter works has changed in 5.0. Instead of being initially\nset to 0, the tick counter is initially blank.",[44,1501,1503],{"id":1414,"className":1502},[14],[16,1504,1507],{"className":1505,"href":1506},[19],"#reset-ticks",[160,1508,1414],{},[22,1510,1511,1512,1514,1515,1518,1519,213,1521,1524],{},"You must use ",[160,1513,1414],{}," to start the tick counter at 0 before using ",[160,1516,1517],{},"ticks",",\n",[160,1520,1270],{},[160,1522,1523],{},"tick-advance"," for the first time.",[22,1526,1527,1529],{},[160,1528,1414],{}," should go at the end of your setup procedure. Putting it there\nwill allow your model to work with 5.0’s new plotting features.",[44,1531,1534],{"id":1532,"className":1533},"reset-ticks-and-plotting",[14],[16,1535,1538,1540],{"className":1536,"href":1537},[19],"#reset-ticks-and-plotting",[160,1539,1414],{}," and plotting",[22,1542,1543,1544,163,1546,1548,1549,1551,1552,1554],{},"In 5.0, you don’t have to put your plotting code in the Code tab anymore.\nInstead, you can put it inside the plots themselves, in the Interface tab. Code\ninside plots is triggered by ",[160,1545,1414],{},[160,1547,1270],{},". Resetting the tick\ncounter runs plot setup code, and then it also runs plot update code to plot the\ninitial state of the model. The initial state of the model won’t be in place\nuntil the end of ",[160,1550,1221],{},", so that’s why ",[160,1553,1414],{}," should go at the end.",[44,1556,1559],{"id":1557,"className":1558},"__clear-all-and-reset-ticks",[14],[16,1560,1563],{"className":1561,"href":1562},[19],"#__clear-all-and-reset-ticks",[160,1564,1557],{},[22,1566,1567,1568,1570,1571,1574,1575,1577,1578,163,1580,1582],{},"In order for models from previous NetLogo versions to work in 5.0 without\nchanges, when an old model is opened in 5.0, any occurrences of ",[160,1569,1230],{}," (or\n",[160,1572,1573],{},"ca",") are automatically changed to ",[160,1576,1557],{},", which combines\nthe effects of ",[160,1579,1230],{},[160,1581,1414],{},". The two underscores on the name\nindicate that this is not a normal primitive, but exists only for backwards\ncompatibility.",[22,1584,1585,1586,1588,1589,1591,1592,1594],{},"You should remove ",[160,1587,1557],{}," from your code, replace it with\n",[160,1590,1230],{},", and put ",[160,1593,1414],{}," at the end of your setup procedure. (This\ndoesn’t happen automatically because the structure of NetLogo models is too\nfree-form for an automatic converter to reliably make the change for you.)",[147,1596,1599],{"id":1597,"className":1598},"unicode-characters",[14],[16,1600,1603],{"className":1601,"href":1602},[19],"#unicode-characters","Unicode characters",[22,1605,1606],{},"NetLogo 5.0 fully supports international characters cross-platform, using the\nUnicode character set. NetLogo 5.0 model files always represent Unicode\ncharacters using the UTF-8 encoding.",[22,1608,1609],{},"Previous versions of NetLogo allowed Unicode characters to be used in some\ncontexts. However, model files were saved in the platform’s default encoding,\nwhich on most systems was something other than UTF-8. Characters were handled\ncorrectly on the same platform (e.g. two Windows machines), but could be altered\nif the model was moved between platforms (e.g. from Windows to Mac or vice\nversa).",[22,1611,1612],{},"When opening an existing model in NetLogo 5.0, if the model contains\ninternational or other non-ASCII characters, the characters may be interpreted\nincorrectly, because they were originally written in a platform-specific\nencoding, but then read back in in UTF-8.",[22,1614,1615],{},"If only a few characters are affected, you might find it easiest just to fix\nthem manually.",[22,1617,1618],{},"But if you expect a large number of characters to be affected, and you want them\ntranslated automatically, you can use a third party utility to re-encode your\n.nlogo file from its original encoding into UTF-8. After conversion, open the\nmodel in NetLogo 5.0 and all characters should be correct.",[147,1620,1623],{"id":1621,"className":1622},"info-tabs",[14],[16,1624,1627],{"className":1625,"href":1626},[19],"#info-tabs","Info tabs",[22,1629,1630],{},"NetLogo 5.0 uses the Markdown markup language to allow you to format your Info\ntab, including headers, bold and italics, images, and so forth.",[22,1632,1633],{},"Earlier versions of NetLogo used a custom markup language with much more limited\ncapabilities.",[22,1635,1636],{},"When opening a model from an older version, NetLogo 5.0 translates your old\nmarkup into Markdown. Most of the time this produces good results, but you may\nwant to check the results yourself and make sure that your Info tab still looks\ngood.",[147,1638,1641],{"id":1639,"className":1640},"model-speed",[14],[16,1642,1645],{"className":1643,"href":1644},[19],"#model-speed","Model speed",[22,1647,1648],{},"In NetLogo 5.0 every model has a “target frame rate” which affects the default\nspeed at which the model runs, when the speed slider is in the middle, on the\n“normal speed” setting.",[22,1650,1651],{},"The default target frame rate for new models, and for models that were created\nin earlier versions of NetLogo, is 30 frames per second. If you are using\ntick-based updates, as we recommend for most models, then that translates to 30\nticks per second.",[22,1653,1654],{},"If your model runs slower in 5.0 than it ran in 4.1, it’s probably just because\nits speed is being limited by this rate. If you want, you can press the Settings\nbutton in the Interface tab and change the frame rate to a higher number.",[22,1656,1657,1658,1661],{},"Some old models used the ",[160,1659,1660],{},"every"," command to set a default speed. In most case\nthis can be now removed from the code, and the target frame rate setting used\ninstead.",[147,1663,1666],{"id":1664,"className":1665},"list-performance",[14],[16,1667,1670],{"className":1668,"href":1669},[19],"#list-performance","List performance",[22,1672,1673],{},"The underlying data structure for NetLogo lists has changed.",[22,1675,1676,1677,134,1680,1683,1684,163,1687,1690],{},"In NetLogo 4.1, a NetLogo list was represented internally as a singly linked\nlist. Some operations on singly linked lists are fast (such as ",[160,1678,1679],{},"first",[160,1681,1682],{},"butfirst",") but others are slow because they could require traversing the whole\nlist (such as ",[160,1685,1686],{},"item",[160,1688,1689],{},"last",").",[22,1692,1693,1694,1698],{},"In NetLogo 5.0, lists are now actually trees internally. As a result, some\noperations are a little slower, but other operations are drastically faster on\nlong lists. See the\n",[16,1695,1697],{"href":1696},"/programming#lists","Lists section of the Programming Guide"," for details.",[22,1700,1701],{},"Some models may run a little slower with the new data structure, especially if\nyou make heavy use of short lists. But other models will run faster — perhaps\ndramatically faster.",[22,1703,1704,1705,1708,1709,1712,1713,1715,1716,1719,1720,163,1722,1724],{},"Some special ways of writing list-processing code that were useful in NetLogo\n4.1 are no longer needed in 5.0. For example, since in 4.1 ",[160,1706,1707],{},"fput"," was fast and\n",[160,1710,1711],{},"lput"," was slow, modelers sometimes built up lists in reverse order using\n",[160,1714,1707],{},", perhaps calling ",[160,1717,1718],{},"reverse"," later to restore the intended order. In\nNetLogo 5.0, you don’t need to code that way anymore. ",[160,1721,1707],{},[160,1723,1711],{}," are the\nsame speed.",[147,1726,1729],{"id":1727,"className":1728},"extensions-api",[14],[16,1730,1733],{"className":1731,"href":1732},[19],"#extensions-api","Extensions API",[22,1735,1736],{},"If you are the author of an extension, you will need to recompile it against the\n5.0 NetLogo.jar and lib directory for it to work with 5.0.",[22,1738,1739],{},"You may also need to be aware of the following changes:",[44,1741,1744],{"id":1742,"className":1743},"syntax-constants",[14],[16,1745,1748],{"className":1746,"href":1747},[19],"#syntax-constants","Syntax constants",[22,1750,1751,1752,1755,1756,1759],{},"The code for specifying the syntax of a primitive has changed slightly, for\nexample ",[160,1753,1754],{},"Syntax.TYPE_STRING"," is now ",[160,1757,1758],{},"Syntax.StringType()",". (From Java, the pair\nof parentheses at the end is required. In Scala, you can omit them.)",[44,1761,1764],{"id":1762,"className":1763},"logolist-construction",[14],[16,1765,1768],{"className":1766,"href":1767},[19],"#logolist-construction","LogoList construction",[22,1770,1771,1772,1775,1776,126],{},"One significant change is that ",[160,1773,1774],{},"org.nlogo.api.LogoList"," no longer has a public\nconstructor. Instead, there are two new ways to construct a ",[160,1777,1778],{},"LogoList",[22,1780,1781,1782,1785,1786,1788,1789,1792],{},"If you have a ",[160,1783,1784],{},"java.lang.Iterable",", you can copy the contents into a fresh\n",[160,1787,1778],{}," by passing it to the static method ",[160,1790,1791],{},"LogoList.fromJava()",". See the\narray extension source code for a sample usage.",[22,1794,1795,1796,1799,1800,1804,1805,126],{},"Or, to build up a new list one item a time, use ",[160,1797,1798],{},"org.nlogo.api.LogoListBuilder",".\nThe ",[16,1801,1803],{"href":1802},"/extensions","Extensions Guide"," has sample code showing the use of\n",[160,1806,1807],{},"LogoListBuilder",[44,1809,1812],{"id":1810,"className":1811},"primitive-classes",[14],[16,1813,1816],{"className":1814,"href":1815},[19],"#primitive-classes","Primitive classes",[22,1818,1819],{},"In prior NetLogo versions, the extensions API required that each extension\nprimitive have its own separate top-level class with a no-argument constructor.\nThese limitations have now been lifted. Also, api.Primitive objects are now made\nonly once, when the extension is loaded, instead of every time the Code tab was\nrecompiled.",[112,1821,1824],{"id":1822,"className":1823},"changes-for-netlogo-41",[14],[16,1825,98],{"className":1826,"href":97},[19],[147,1828,1831],{"id":1829,"className":1830},"combining-set-and-of",[14],[16,1832,1835,1836,163,1839],{"className":1833,"href":1834},[19],"#combining-set-and-of","Combining ",[160,1837,1838],{},"set",[160,1840,1841],{},"of",[22,1843,1844],{},"The following syntax is no longer supported:",[231,1846,1847],{},[160,1848,1849,443,1852,258,1856,262,1859,262,1863],{},[236,1850,1838],{"className":1851},[239,1229],[236,1853,1855],{"className":1854},[239,447],"\u003Cvariable>",[236,1857,1841],{"className":1858},[239,240],[236,1860,1862],{"className":1861},[239,447],"\u003Cagent>",[236,1864,1866],{"className":1865},[239,447],"\u003Cvalue>",[22,1868,1869,1870,229],{},"Commands of this form must be rewritten using ",[160,1871,1872],{},"ask",[231,1874,1875],{},[160,1876,1877,262,1880,574,1883,262,1886,262,1889,477],{},[236,1878,1872],{"className":1879},[239,1229],[236,1881,1862],{"className":1882},[239,447],[236,1884,1838],{"className":1885},[239,1229],[236,1887,1855],{"className":1888},[239,447],[236,1890,1866],{"className":1891},[239,447],[22,1893,1894],{},"Or, if the new value must be computed by the asking agent and not by the agent\nwhose variable is being set:",[231,1896,1897],{},[160,1898,1899,1904,1906,262,1910,262,1914,1917,1919,262,1922,574,1925,262,1928,262,1931,477,1934,1936,1938,1942,1944,262,1947,574,1950,262,1953,443,1956,258,1960,262,1963,477],{},[236,1900,1903],{"className":1901},[239,1902],"comment",";; OPTION #1 (using let):",[1223,1905],{},[236,1907,1909],{"className":1908},[239,1229],"let",[236,1911,1913],{"className":1912},[239,447],"new-value",[236,1915,1866],{"className":1916},[239,447],[1223,1918],{},[236,1920,1872],{"className":1921},[239,1229],[236,1923,1862],{"className":1924},[239,447],[236,1926,1838],{"className":1927},[239,1229],[236,1929,1855],{"className":1930},[239,447],[236,1932,1913],{"className":1933},[239,447],[1223,1935],{},[1223,1937],{},[236,1939,1941],{"className":1940},[239,1902],";; OPTION #2 (using myself):",[1223,1943],{},[236,1945,1872],{"className":1946},[239,1229],[236,1948,1862],{"className":1949},[239,447],[236,1951,1838],{"className":1952},[239,1229],[236,1954,1855],{"className":1955},[239,447],[236,1957,1959],{"className":1958},[239,447],"value",[236,1961,1841],{"className":1962},[239,240],[236,1964,1966],{"className":1965},[239,240],"myself",[22,1968,1969],{},"So for example, this:",[231,1971,1972],{},[160,1973,1974,443,1977,258,1981,262,1984,262,1987,262,1990],{},[236,1975,1838],{"className":1976},[239,1229],[236,1978,1980],{"className":1979},[239,240],"color",[236,1982,1841],{"className":1983},[239,240],[236,1985,711],{"className":1986},[239,240],[236,1988,715],{"className":1989},[239,251],[236,1991,1993],{"className":1992},[239,245],"red",[22,1995,1996],{},"Can be rewritten as:",[231,1998,1999],{},[160,2000,2001,262,2004,262,2007,574,2010,262,2013,262,2016,477],{},[236,2002,1872],{"className":2003},[239,1229],[236,2005,711],{"className":2006},[239,240],[236,2008,715],{"className":2009},[239,251],[236,2011,1838],{"className":2012},[239,1229],[236,2014,1980],{"className":2015},[239,240],[236,2017,1993],{"className":2018},[239,245],[22,2020,2021,2022,213,2024,2026],{},"It is not necessary to use ",[160,2023,1909],{},[160,2025,1966],{}," since red is red from the point of\nview of both agents.",[22,2028,2029],{},"However, this:",[231,2031,2032],{},[160,2033,2034,443,2037,258,2040,262,2043,262,2046,262,2049],{},[236,2035,1838],{"className":2036},[239,1229],[236,2038,1980],{"className":2039},[239,240],[236,2041,1841],{"className":2042},[239,240],[236,2044,711],{"className":2045},[239,240],[236,2047,715],{"className":2048},[239,251],[236,2050,1980],{"className":2051},[239,240],[22,2053,2054],{},"Must be rewritten as:",[231,2056,2057],{},[160,2058,2059,262,2062,262,2066,2069,2071,262,2074,262,2077,574,2080,262,2083,262,2086,477],{},[236,2060,1909],{"className":2061},[239,1229],[236,2063,2065],{"className":2064},[239,447],"new-color",[236,2067,1980],{"className":2068},[239,240],[1223,2070],{},[236,2072,1872],{"className":2073},[239,1229],[236,2075,711],{"className":2076},[239,240],[236,2078,715],{"className":2079},[239,251],[236,2081,1838],{"className":2082},[239,1229],[236,2084,1980],{"className":2085},[239,240],[236,2087,2065],{"className":2088},[239,447],[22,2090,2091],{},"or",[231,2093,2094],{},[160,2095,2096,262,2099,262,2102,574,2105,262,2108,443,2111,258,2114,262,2117,477],{},[236,2097,1872],{"className":2098},[239,1229],[236,2100,711],{"className":2101},[239,240],[236,2103,715],{"className":2104},[239,251],[236,2106,1838],{"className":2107},[239,1229],[236,2109,1980],{"className":2110},[239,240],[236,2112,1980],{"className":2113},[239,240],[236,2115,1841],{"className":2116},[239,240],[236,2118,1966],{"className":2119},[239,240],[22,2121,2122,2123,2125,2126,2128,2129,2131],{},"in order not to change the meaning, since the two agents may have different\nstarting values for ",[160,2124,1980],{},". The form using ",[160,2127,1966],{}," is briefer, but the former\nusing ",[160,2130,1909],{}," may be considered clearer, depending on context and individual\npreference.",[112,2133,2136],{"id":2134,"className":2135},"changes-for-netlogo-40",[14],[16,2137,104],{"className":2138,"href":103},[19],[147,2140,2143],{"id":2141,"className":2142},"who-numbering",[14],[16,2144,2147],{"className":2145,"href":2146},[19],"#who-numbering","Who numbering",[22,2149,2150,2151,2159,2160,2167,2168,2176],{},"Prior to NetLogo 4.0, a dead turtle’s who number (stored in the ",[169,2152,2154],{"displayText":2153,"permalink":2153},"who",[16,2155,2153],{"href":2156,"rel":2157,"className":2158,"dataDisplayText":2153,"target":179,"title":2153},"/dictionary#who",[176],[178]," turtle\nvariable) could be reassigned to a later newborn turtle. In NetLogo 4.0, who\nnumbers are never reused until who numbering is reset to 0 by the ",[169,2161,2162],{"displayText":1230,"permalink":1230},[16,2163,1230],{"href":2164,"rel":2165,"className":2166,"dataDisplayText":1230,"target":179,"title":1230},"/dictionary#clear-all",[176],[178],"\nor ",[169,2169,2171],{"displayText":2170,"permalink":2170},"clear-turtles",[16,2172,2170],{"href":2173,"rel":2174,"className":2175,"dataDisplayText":2170,"target":179,"title":2170},"/dictionary#clear-turtles",[176],[178]," command. This change in behavior may break a few old\nmodels.",[147,2178,2181],{"id":2179,"className":2180},"turtle-creation-randomized-vs-ordered",[14],[16,2182,2185],{"className":2183,"href":2184},[19],"#turtle-creation-randomized-vs-ordered","Turtle creation: randomized vs. “ordered”",[22,2187,2188,2189,241,2197,2204,2205,2213,2214,1690],{},"NetLogo 4.0 provides two different observer commands for creating turtles,\n",[169,2190,2192],{"displayText":2191,"permalink":2191},"create-turtles",[16,2193,2191],{"href":2194,"rel":2195,"className":2196,"dataDisplayText":2191,"target":179,"title":2191},"/dictionary#create-turtles",[176],[178],[169,2198,2200],{"displayText":2199,"permalink":2191},"crt",[16,2201,2199],{"href":2194,"rel":2202,"className":2203,"dataDisplayText":2199,"target":179,"title":2199},[176],[178],") and ",[169,2206,2208],{"displayText":2207,"permalink":2207},"create-ordered-turtles",[16,2209,2207],{"href":2210,"rel":2211,"className":2212,"dataDisplayText":2207,"target":179,"title":2207},"/dictionary#create-ordered-turtles",[176],[178],"\n(",[169,2215,2217],{"displayText":2216,"permalink":2207},"cro",[16,2218,2216],{"href":2210,"rel":2219,"className":2220,"dataDisplayText":2216,"target":179,"title":2216},[176],[178],[22,2222,2223,2225,2226,2228],{},[160,2224,2199],{}," gives the new turtles random colors and random integer headings. ",[160,2227,2216],{},"\nassigns colors sequentially and gives the turtles sequential equally spaced\nheadings, with the first turtle facing north (heading of 0).",[22,2230,2231,2232,2234,2235,2237,2238,2240,2241,126],{},"Prior to NetLogo 4.0, the ",[160,2233,2199],{}," command behaved the way ",[160,2236,2216],{}," does now. If your\nold model depends on the “ordered” behavior, you will need to change your code\nto use ",[160,2239,2216],{}," instead of ",[160,2242,2199],{},[22,2244,2245,2246,2248,2249,2263,2264,2279,2280,126],{},"It is common for old models that used ",[160,2247,2199],{}," to contain extra commands to\nrandomize the new turtles’ headings, for example ",[160,2250,2251,262,2255,262,2259],{},[236,2252,2254],{"className":2253},[239,1229],"rt",[236,2256,2258],{"className":2257},[239,240],"random",[236,2260,2262],{"className":2261},[239,251],"360"," or\n",[160,2265,2266,262,2269,262,2273,262,2276],{},[236,2267,1838],{"className":2268},[239,1229],[236,2270,2272],{"className":2271},[239,240],"heading",[236,2274,2258],{"className":2275},[239,240],[236,2277,2262],{"className":2278},[239,251],". These commands are no longer necessary when used\ninside ",[160,2281,2199],{},[147,2283,2286],{"id":2284,"className":2285},"adding-strings-and-lists",[14],[16,2287,2290],{"className":2288,"href":2289},[19],"#adding-strings-and-lists","Adding strings and lists",[22,2292,2231,2293,2301,2302,2304,2305,2313,2314,2322,2323,126],{},[169,2294,2296],{"displayText":212,"permalink":2295},"symbols",[16,2297,212],{"href":2298,"rel":2299,"className":2300,"dataDisplayText":212,"target":179,"title":212},"/dictionary#symbols",[176],[178]," (addition) operator could be used to\nconcatenate strings and join lists. In current NetLogo, ",[160,2303,212],{}," only works on\nnumbers. To concatenate strings, use the ",[169,2306,2308],{"displayText":2307,"permalink":2307},"word",[16,2309,2307],{"href":2310,"rel":2311,"className":2312,"dataDisplayText":2307,"target":179,"title":2307},"/dictionary#word",[176],[178]," primitive; to join lists\ntogether, use the ",[169,2315,2317],{"displayText":2316,"permalink":2316},"sentence",[16,2318,2316],{"href":2319,"rel":2320,"className":2321,"dataDisplayText":2316,"target":179,"title":2316},"/dictionary#sentence",[176],[178]," primitive. This language change was made to\nincrease the speed of code that uses ",[160,2324,212],{},[22,2326,2327],{},"Old code:",[231,2329,2330],{},[160,2331,2332,262,2336,262,2340,262,2343,262,2346,262,2349,262,2352],{},[236,2333,2335],{"className":2334},[239,1229],"print",[236,2337,2339],{"className":2338},[239,1300],"\"There are \"",[236,2341,212],{"className":2342},[239,240],[236,2344,1321],{"className":2345},[239,240],[236,2347,718],{"className":2348},[239,240],[236,2350,212],{"className":2351},[239,240],[236,2353,2355],{"className":2354},[239,1300],"\" turtles.\"",[22,2357,2358],{},"New code:",[231,2360,2361],{},[160,2362,2363,241,2366,262,2369,262,2372,262,2375,262,2378,2381],{},[236,2364,2335],{"className":2365},[239,1229],[236,2367,2307],{"className":2368},[239,240],[236,2370,2339],{"className":2371},[239,1300],[236,2373,1321],{"className":2374},[239,240],[236,2376,718],{"className":2377},[239,240],[236,2379,2355],{"className":2380},[239,1300],")",[22,2383,2384],{},"Likewise, if you need to concatenate lists, use SENTENCE.",[22,2386,2387],{},"This change is not handled automatically when converting old models; users will\nneed to change their code by hand.",[22,2389,2390],{},"We know this change will be awkward for users who are used to the old syntax. We\nhave made this change for efficiency and consistency. We can implement an\naddition operator that only adds numbers much more efficiently than one that\nhandles several different data types. Because addition is such a common\noperation, NetLogo’s overall speed is affected.",[147,2392,2395],{"id":2393,"className":2394},"the-at-primitives",[14],[16,2396,337,2399,2402],{"className":2397,"href":2398},[19],"#the--at-primitives",[160,2400,2401],{},"-at"," primitives",[22,2404,2405,2406,413,2414,2422,2423,2430,2431,413,2439,262,2447,2422,2449,262,2456,2458,2459,2461],{},"The observer may no longer use ",[169,2407,2409],{"displayText":2408,"permalink":2408},"patch-at",[16,2410,2408],{"href":2411,"rel":2412,"className":2413,"dataDisplayText":2408,"target":179,"title":2408},"/dictionary#patch-at",[176],[178],[169,2415,2417],{"displayText":2416,"permalink":2416},"turtles-at",[16,2418,2416],{"href":2419,"rel":2420,"className":2421,"dataDisplayText":2416,"target":179,"title":2416},"/dictionary#turtles-at",[176],[178],", and\n",[169,2424,2426],{"displayText":2425,"permalink":2416},"BREEDS-at",[16,2427,2425],{"href":2419,"rel":2428,"className":2429,"dataDisplayText":2425,"target":179,"title":2425},[176],[178],". Use ",[169,2432,2434],{"displayText":2433,"permalink":2433},"patch",[16,2435,2433],{"href":2436,"rel":2437,"className":2438,"dataDisplayText":2433,"target":179,"title":2433},"/dictionary#patch",[176],[178],[169,2440,2442],{"displayText":2441,"permalink":2441},"turtles-on",[16,2443,2441],{"href":2444,"rel":2445,"className":2446,"dataDisplayText":2441,"target":179,"title":2441},"/dictionary#turtles-on",[176],[178],[160,2448,2433],{},[169,2450,2452],{"displayText":2451,"permalink":2441},"BREEDS-on",[16,2453,2451],{"href":2444,"rel":2454,"className":2455,"dataDisplayText":2451,"target":179,"title":2451},[176],[178],[160,2457,2433],{}," instead. Note that ",[160,2460,2433],{}," now rounds its\ninputs (before it only accepted integer inputs).",[147,2463,2466],{"id":2464,"className":2465},"links",[14],[16,2467,2470],{"className":2468,"href":2469},[19],"#links","Links",[22,2472,2473],{},"NetLogo 3.1 had supports for using links to connect turtles to make networks,\ngraphs, and geometric figures. The links were themselves turtles.",[22,2475,2476],{},"In NetLogo 4.0, instead of links being turtles, links are now an independent\nfourth agent type, right alongside observer, turtles, patches. The primitives\ninvolving links are no longer considered experimental; they are now fully part\nof the language.",[22,2478,2479],{},"Models that use the old, experimental turtle-based link primitives will need to\nbe updated to use link agents. The differences are not huge, but hand updating\nis required.",[22,2481,2482,2483,2486],{},"Links are documented in the ",[16,2484,2470],{"href":2485},"/programming#links"," section of the\nProgramming Guide, and in the NetLogo Dictionary entries for the link\nprimitives. See the Networks section of the Models Library for example models\nthat use links. There are also some link-based Code Examples.",[22,2488,2489,2490,134,2497,2504,2505,2508,2509,2518],{},"First you will need to remove any breeds called “links” if you are only using\none type of links then you will not have to use breeds at all. If you are using\nmultiple types of links see ",[169,2491,2492],{"displayText":946,"permalink":946},[16,2493,946],{"href":2494,"rel":2495,"className":2496,"dataDisplayText":946,"target":179,"title":946},"/dictionary#undirected-link-breed",[176],[178],[169,2498,2499],{"displayText":961,"permalink":961},[16,2500,961],{"href":2501,"rel":2502,"className":2503,"dataDisplayText":961,"target":179,"title":961},"/dictionary#directed-link-breed",[176],[178],". Commands and reporters that contain the word “links”\n(like ",[160,2506,2507],{},"__create-links-with",", etc.) will automatically be converted to the new\nform without underscores (",[169,2510,2513],{"displayText":2511,"permalink":2512},"create-links-with","create-link",[16,2514,2511],{"href":2515,"rel":2516,"className":2517,"dataDisplayText":2511,"target":179,"title":2511},"/dictionary#create-link",[176],[178],"). However,\nprimitives that use a different breed name (such as “edges”) will not be\nconverted. You will need to remove the underscores by hand and unless you are\ndeclaring a link breed with that name you will need to change the breed\ndesignation to “links”.",[22,2520,2521,2522,2525,2526,126],{},"The commands ",[160,2523,2524],{},"remove-link(s)-with/from/to"," no longer exist. Instead you should\nask the links in question to ",[169,2527,2529],{"displayText":2528,"permalink":2528},"die",[16,2530,2528],{"href":2531,"rel":2532,"className":2533,"dataDisplayText":2528,"target":179,"title":2528},"/dictionary#die",[176],[178],[22,2535,2536],{},"For example:",[231,2538,2539],{},[160,2540,2541,262,2544,262,2547,574,2550,262,2554,477],{},[236,2542,1872],{"className":2543},[239,1229],[236,2545,711],{"className":2546},[239,240],[236,2548,715],{"className":2549},[239,251],[236,2551,2553],{"className":2552},[239,447],"__remove-links-with",[236,2555,540],{"className":2556},[239,240],[22,2558,2559],{},"becomes",[231,2561,2562],{},[160,2563,2564,262,2567,262,2570,574,2573,262,2576,574,2579,2582],{},[236,2565,1872],{"className":2566},[239,1229],[236,2568,711],{"className":2569},[239,240],[236,2571,715],{"className":2572},[239,251],[236,2574,1872],{"className":2575},[239,1229],[236,2577,532],{"className":2578},[239,240],[236,2580,2528],{"className":2581},[239,1229]," ] ]",[22,2584,2585,2586,413,2594,2602,2603],{},"Several of the layout commands have slightly different inputs, the first two\ninputs are generally a turtle agentset and a link agentset to perform the layout\non. See the dictionary entries for details. ",[169,2587,2589],{"displayText":2588,"permalink":2588},"layout-spring",[16,2590,2588],{"href":2591,"rel":2592,"className":2593,"dataDisplayText":2588,"target":179,"title":2588},"/dictionary#layout-spring",[176],[178],[169,2595,2597],{"displayText":2596,"permalink":2596},"layout-radial",[16,2598,2596],{"href":2599,"rel":2600,"className":2601,"dataDisplayText":2596,"target":179,"title":2596},"/dictionary#layout-radial",[176],[178],"\nand ",[169,2604,2606],{"displayText":2605,"permalink":2605},"layout-tutte",[16,2607,2605],{"href":2608,"rel":2609,"className":2610,"dataDisplayText":2605,"target":179,"title":2605},"/dictionary#layout-tutte",[176],[178],[22,2612,2613,2614,2622],{},"You may also need to rearrange the declaration of turtles-own variables, since\nlinks were once actually turtles. Any variables that apply to links should be\nmoved into a ",[169,2615,2617],{"displayText":2616,"permalink":2616},"links-own",[16,2618,2616],{"href":2619,"rel":2620,"className":2621,"dataDisplayText":2616,"target":179,"title":2616},"/dictionary#links-own",[176],[178]," block.",[22,2624,2625,2626,134,2633,2641],{},"Since links are no longer turtles they no longer have the built-in turtle\nvariables (though some of the link variables are the same such as ",[169,2627,2628],{"displayText":1980,"permalink":1980},[16,2629,1980],{"href":2630,"rel":2631,"className":2632,"dataDisplayText":1980,"target":179,"title":1980},"/dictionary#color",[176],[178],[169,2634,2636],{"displayText":2635,"permalink":2635},"label",[16,2637,2635],{"href":2638,"rel":2639,"className":2640,"dataDisplayText":2635,"target":179,"title":2635},"/dictionary#label",[176],[178],". If you formerly used the location of link turtles you will now need\nto calculate the midpoint of the link. This is fairly simple in a non-wrapping\nworld.",[231,2643,2644],{},[160,2645,2646,262,2650,2654,1225,2656,262,2660,443,2664,258,2668,262,2671,2675,2680,2682,262,2687,2691,1225,2693,262,2696,443,2699,258,2703,262,2706,2709],{},[236,2647,2649],{"className":2648},[239,752],"to-report",[236,2651,2653],{"className":2652},[239,447],"link-xcor",[1223,2655],{},[236,2657,2659],{"className":2658},[239,1229],"report",[236,2661,2663],{"className":2662},[239,240],"mean",[236,2665,2667],{"className":2666},[239,240],"xcor",[236,2669,1841],{"className":2670},[239,240],[236,2672,2674],{"className":2673},[239,240],"both-ends",[236,2676,2678,1248],{"className":2677},[239,752],[1223,2679],{},[1223,2681],{},[236,2683,2685,2649],{"className":2684},[239,752],[1223,2686],{},[236,2688,2690],{"className":2689},[239,447],"link-ycor",[1223,2692],{},[236,2694,2659],{"className":2695},[239,1229],[236,2697,2663],{"className":2698},[239,240],[236,2700,2702],{"className":2701},[239,240],"ycor",[236,2704,1841],{"className":2705},[239,240],[236,2707,2674],{"className":2708},[239,240],[236,2710,2712,1248],{"className":2711},[239,752],[1223,2713],{},[22,2715,2716],{},"it is a little bit trickier in a wrapping world but still fairly\nstraightforward.",[231,2718,2719],{},[160,2720,2721,262,2724,2727,1225,2729,262,2732,262,2736,2740,1225,2742,262,2745,262,2749,2752,1225,2754,262,2757,2761,2763,2764,2766,2767,262,2771,2775,2777,2778,2780,2781,262,2785,2788,2780,2790,443,2794,262,2798,258,2801,262,2804,262,2807,262,2811,2815,2780,2817,262,2820,262,2823,2826,2780,2828,2831,2833,2834,2836,2837,1225,2839,262,2842,2845],{},[236,2722,2649],{"className":2723},[239,752],[236,2725,2653],{"className":2726},[239,447],[1223,2728],{},[236,2730,1909],{"className":2731},[239,1229],[236,2733,2735],{"className":2734},[239,447],"other-guy",[236,2737,2739],{"className":2738},[239,240],"end2",[1223,2741],{},[236,2743,1909],{"className":2744},[239,1229],[236,2746,2748],{"className":2747},[239,447],"x",[236,2750,715],{"className":2751},[239,251],[1223,2753],{},[236,2755,1872],{"className":2756},[239,1229],[236,2758,2760],{"className":2759},[239,240],"end1",[1223,2762],{},"  [",[1223,2765],{},"    ",[236,2768,2770],{"className":2769},[239,1229],"hatch",[236,2772,2774],{"className":2773},[239,251],"1",[1223,2776],{},"    [",[1223,2779],{},"      ",[236,2782,2784],{"className":2783},[239,1229],"face",[236,2786,2735],{"className":2787},[239,447],[1223,2789],{},[236,2791,2793],{"className":2792},[239,1229],"fd",[236,2795,2797],{"className":2796},[239,240],"distance",[236,2799,2735],{"className":2800},[239,447],[236,2802,1841],{"className":2803},[239,240],[236,2805,1966],{"className":2806},[239,240],[236,2808,2810],{"className":2809},[239,240],"/",[236,2812,2814],{"className":2813},[239,251],"2",[1223,2816],{},[236,2818,1838],{"className":2819},[239,1229],[236,2821,2748],{"className":2822},[239,447],[236,2824,2667],{"className":2825},[239,240],[1223,2827],{},[236,2829,2528],{"className":2830},[239,1229],[1223,2832],{},"    ]",[1223,2835],{},"  ]",[1223,2838],{},[236,2840,2659],{"className":2841},[239,1229],[236,2843,2748],{"className":2844},[239,447],[236,2846,2848,1248],{"className":2847},[239,752],[1223,2849],{},[22,2851,2852,2853,126],{},"and similarly for ",[160,2854,2702],{},[22,2856,2857,2858,163,2866,2874],{},"If you used either the size or heading of the link turtles you can use the\nreporters ",[169,2859,2861],{"displayText":2860,"permalink":2860},"link-length",[16,2862,2860],{"href":2863,"rel":2864,"className":2865,"dataDisplayText":2860,"target":179,"title":2860},"/dictionary#link-length",[176],[178],[169,2867,2869],{"displayText":2868,"permalink":2868},"link-heading",[16,2870,2868],{"href":2871,"rel":2872,"className":2873,"dataDisplayText":2868,"target":179,"title":2868},"/dictionary#link-heading",[176],[178]," instead.",[147,2876,2879],{"id":2877,"className":2878},"new-of-syntax",[14],[16,2880,2883],{"className":2881,"href":2882},[19],"#new-of-syntax","New “of” syntax",[22,2885,2886,2887,2890,2891,417,2894,2897,2898,2905],{},"We have replaced three different language constructs, ",[160,2888,2889],{},"-of"," (with hyphen),\n",[160,2892,2893],{},"value-from",[160,2895,2896],{},"values-from"," with a single ",[169,2899,2900],{"displayText":1841,"permalink":1841},[16,2901,1841],{"href":2902,"rel":2903,"className":2904,"dataDisplayText":1841,"target":179,"title":1841},"/dictionary#of",[176],[178]," construct (no hyphen).",[39,2907,2909],{"className":2908},[798],[800,2910,2912],{"border":2911},"",[816,2913,2914,2923,2931,2939],{},[806,2915,2916,2917,2920],{},"\n  ",[809,2918,2919],{},"old\n  ",[809,2921,2922],{},"new\n",[806,2924,2916,2925,2928],{},[821,2926,2927],{},"`color-of turtle 0`\n  ",[821,2929,2930],{},"`[color] of turtle 0`\n",[806,2932,2916,2933,2936],{},[821,2934,2935],{},"`value-from turtle 0 [size * size]`\n  ",[821,2937,2938],{},"`[size * size] of turtle 0`\n",[806,2940,2916,2941,2944],{},[821,2942,2943],{},"`mean values-from turtles [size]`\n  ",[821,2945,2946],{},"`mean [size] of turtles`\n",[22,2948,2949,2950,2952],{},"When ",[160,2951,1841],{}," is used with a single agent, it reports a single value. When used with\nan agentset, it reports a list of values (in random order, since agentsets are\nalways in random order).",[22,2954,2955,2956,413,2958,2422,2960,2962],{},"Note that when opening old models in the new version, ",[160,2957,2889],{},[160,2959,2893],{},[160,2961,2896],{}," will automatically be converted to use “of” instead, but some\nnested uses of these constructs are too complex for the converter and must be\nconverted by hand.",[147,2964,2967],{"id":2965,"className":2966},"serial-ask",[14],[16,2968,2971,2972],{"className":2969,"href":2970},[19],"#serial-ask","Serial ",[160,2973,1872],{},[22,2975,337,2976,2983,2984,2986],{},[169,2977,2978],{"displayText":1872,"permalink":1872},[16,2979,1872],{"href":2980,"rel":2981,"className":2982,"dataDisplayText":1872,"target":179,"title":1872},"/dictionary#ask",[176],[178]," command is now serial rather than concurrent. In other words, the\nasked agents will run one at a time. Not until one agent completely finishes the\nentire body of the ",[160,2985,1872],{}," does the next agent start.",[22,2988,2989,2990,2996],{},"Note that even the old ",[169,2991,2992],{"displayText":1872,"permalink":1872},[16,2993,1872],{"href":2980,"rel":2994,"className":2995,"dataDisplayText":1872,"target":179,"title":1872},[176],[178]," was never truly concurrent; we simulated\nconcurrent execution by interleaving execution among the agents using a\nturn-taking mechanism described in the NetLogo FAQ.",[22,2998,2999,3000,3008],{},"We have made this change because in our experience, users often wrote models\nthat behaved in unexpected ways due to the simulated concurrency, but rarely\nwrote models that benefited from the simulated concurrency. Models exhibiting\nunexpected behavior could usually be fixed by adding the\n",[169,3001,3003],{"displayText":3002,"permalink":3002},"without-interruption",[16,3004,3002],{"href":3005,"rel":3006,"className":3007,"dataDisplayText":3002,"target":179,"title":3002},"/dictionary#without-interruption",[176],[178]," command in the right places, but it was difficult for\nusers to know whether that command was needed and if so, where.",[22,3010,3011,3012,3018,3019,3027,3028,3030],{},"In NetLogo 4.0, ",[169,3013,3014],{"displayText":3002,"permalink":3002},[16,3015,3002],{"href":3005,"rel":3016,"className":3017,"dataDisplayText":3002,"target":179,"title":3002},[176],[178]," is no longer necessary unless your\nmodel uses ",[169,3020,3022],{"displayText":3021,"permalink":3021},"ask-concurrent",[16,3023,3021],{"href":3024,"rel":3025,"className":3026,"dataDisplayText":3021,"target":179,"title":3021},"/dictionary#ask-concurrent",[176],[178]," (or a turtle or patch forever button containing\ncode that depends on simulated concurrency). In most models, all uses of\n",[160,3029,3002],{}," can be removed.",[22,3032,3033],{},"The simulated concurrency formerly employed by “ask” is still accessible in\nthree ways:",[54,3035,3036,3053,3058],{},[57,3037,3038,3039,3045,3046,3052],{},"You may use the ",[169,3040,3041],{"displayText":3021,"permalink":3021},[16,3042,3021],{"href":3024,"rel":3043,"className":3044,"dataDisplayText":3021,"target":179,"title":3021},[176],[178]," primitive instead of ",[169,3047,3048],{"displayText":1872,"permalink":1872},[16,3049,1872],{"href":2980,"rel":3050,"className":3051,"dataDisplayText":1872,"target":179,"title":1872},[176],[178]," to get the old\nsimulated concurrency. (We don’t recommend this, though.)",[57,3054,3055,3056,126],{},"Commands issued in the Command Center directly to turtles, patches, or links\nhave an implied ",[160,3057,3021],{},[57,3059,3060,3061,3063],{},"Turtle, patch, and link forever buttons have an implied ",[160,3062,3021],{}," as\nwell.",[22,3065,3066,3067,3069],{},"Note that ",[160,3068,1872],{}," itself is always serial regardless of the context in which it is\nused, however.",[22,3071,3072],{},"In our own Models Library, models that make use of this concurrency are rare. A\nprominent example, though, is Termites, which uses a concurrent turtle forever\nbutton.",[147,3074,3077],{"id":3075,"className":3076},"tick-counter-1",[14],[16,3078,1496],{"className":3079,"href":3080},[19],"#tick-counter-1",[22,3082,3083],{},"NetLogo now has a built-in tick counter for representing the passage of\nsimulated time.",[22,3085,3086,3087,3094,3095,3102,3103,3109,3110,126],{},"You advance the counter by one using the ",[169,3088,3089],{"displayText":1270,"permalink":1270},[16,3090,1270],{"href":3091,"rel":3092,"className":3093,"dataDisplayText":1270,"target":179,"title":1270},"/dictionary#tick",[176],[178]," command. If you need to read\nits value, there’s a reporter called ",[169,3096,3097],{"displayText":1517,"permalink":1517},[16,3098,1517],{"href":3099,"rel":3100,"className":3101,"dataDisplayText":1517,"target":179,"title":1517},"/dictionary#ticks",[176],[178],". The ",[169,3104,3105],{"displayText":1230,"permalink":1230},[16,3106,1230],{"href":2164,"rel":3107,"className":3108,"dataDisplayText":1230,"target":179,"title":1230},[176],[178]," command resets\nthe tick counter; so does ",[169,3111,3112],{"displayText":1414,"permalink":1414},[16,3113,1414],{"href":3114,"rel":3115,"className":3116,"dataDisplayText":1414,"target":179,"title":1414},"/dictionary#reset-ticks",[176],[178],[22,3118,3119,3120,3127,3128,3130],{},"In most models the tick counter will be integer-valued, but if you want to use\nsmaller increments of time, you can use the ",[169,3121,3122],{"displayText":1523,"permalink":1523},[16,3123,1523],{"href":3124,"rel":3125,"className":3126,"dataDisplayText":1523,"target":179,"title":1523},"/dictionary#tick-advance",[176],[178]," command to advance\nthe tick counter by any positive amount, including fractional amounts. Some\nModels Library models that use ",[160,3129,1523],{}," are Vector Fields and the GasLab\nmodels.",[22,3132,3133],{},"The value of the tick counter is displayed in the toolbar at the top of the\nInterface tab. (You can use the Settings… button in the toolbar to hide the\ntick counter, or change the word “ticks” to something else.)",[147,3135,3138],{"id":3136,"className":3137},"view-update-modes",[14],[16,3139,3142],{"className":3140,"href":3141},[19],"#view-update-modes","View update modes",[22,3144,3145,3146,163,3154,3162],{},"In the past, NetLogo always tried to update the view about 20 times a second.\nWe’re now calling that “continuous” view updates. The biggest problem with it\nwas that you usually want updates to happen between model ticks, not in the\nmiddle of a tick, so we had a checkbox on buttons that (by default) forced a\ndisplay update after every button iteration. That made sure updates happened\nbetween ticks, but it didn’t get rid of the intermediate updates. You had to use\n",[169,3147,3149],{"displayText":3148,"permalink":3148},"no-display",[16,3150,3148],{"href":3151,"rel":3152,"className":3153,"dataDisplayText":3148,"target":179,"title":3148},"/dictionary#no-display",[176],[178],[169,3155,3157],{"displayText":3156,"permalink":3156},"display",[16,3158,3156],{"href":3159,"rel":3160,"className":3161,"dataDisplayText":3156,"target":179,"title":3156},"/dictionary#display",[176],[178]," to lock them out.",[22,3164,3165,3166,3172],{},"We still support continuous updates. They are the default when you start up\nNetLogo. But most Models Library models now use tick-based updates. With\ntick-based updates, updates happen only when the tick counter advances. (The\n",[169,3167,3168],{"displayText":3156,"permalink":3156},[16,3169,3156],{"href":3159,"rel":3170,"className":3171,"dataDisplayText":3156,"target":179,"title":3156},[176],[178]," command can be used to force additional updates; see below.)",[22,3174,3175],{},"The advantages of tick-based updates as we see them are as follows:",[3177,3178,3179,3182,3185,3188,3191],"ol",{},[57,3180,3181],{},"Consistent, predictable view update behavior which does not vary from\ncomputer to computer or from run to run.",[57,3183,3184],{},"Intermediate updates can confuse the user of your model by letting them see\nthings they aren’t supposed to see, which may be misleading.",[57,3186,3187],{},"Increased speed. Updating the view takes time, so if one update per tick is\nenough, then enforcing than there is only one update per tick will make your\nmodel faster.",[57,3189,3190],{},"Instead of having a “force view update” checkbox in every button like in\nNetLogo 3.1, we only need one choice which applies to the entire model.",[57,3192,3193,3194,3196],{},"Using the speed slider to slow down a model now just inserts pauses between\nticks. So with tick-based updates, ",[160,3195,1221],{}," buttons are no longer affected by\nthe speed slider. This was a real annoyance with the old speed slider. (The\nannoyance persists for models that use continuous updates, though.)",[22,3198,3199],{},"As mentioned above, most models in our Models Library now use tick-based\nupdates.",[22,3201,3202],{},"Even for models that would normally be set to tick-based updates, it may be\nuseful to switch to continuous updates temporarily for debugging purposes.\nSeeing what’s going on within a tick, instead of only seeing the end result of a\ntick, could help with troubleshooting.",[22,3204,3205,3206,3212],{},"If you switch your model to use tick-based updates, you’ll also need to add the\n",[169,3207,3208],{"displayText":1270,"permalink":1270},[16,3209,1270],{"href":3091,"rel":3210,"className":3211,"dataDisplayText":1270,"target":179,"title":1270},[176],[178]," command to your code, otherwise the view won’t update. (Note that the\nview still always updates when a button pops up or a command entered in the\ncommand center finishes, though. So it’s not like the view will just stay frozen\nindefinitely.)",[44,3214,3217],{"id":3215,"className":3216},"how-to-make-a-model-use-ticks-and-tick-based-updates",[14],[16,3218,3221],{"className":3219,"href":3220},[19],"#how-to-make-a-model-use-ticks-and-tick-based-updates","How to make a model use ticks and tick-based updates",[22,3223,3224],{},"Here are the steps to follow to convert your model to use ticks and tick-based\nupdates in NetLogo 4.0:",[3177,3226,3227,3230],{},[57,3228,3229],{},"In the Interface tab toolbar, on the right hand side where it says “update\nview:”, change the setting from “continuously” to “on ticks”.",[57,3231,3232,3233,3239,3240,3242,3243,3255,3256,3258],{},"Add the ",[169,3234,3235],{"displayText":1270,"permalink":1270},[16,3236,1270],{"href":3091,"rel":3237,"className":3238,"dataDisplayText":1270,"target":179,"title":1270},[176],[178]," command to your go procedure, at or near the end. In Models\nLibrary models we always put ",[160,3241,1270],{}," after the agents move but before any\nplotting commands. That’s because the plotting commands might contain\nsomething like ",[160,3244,3245,262,3249,262,3252],{},[236,3246,3248],{"className":3247},[239,1229],"plotxy",[236,3250,1517],{"className":3251},[239,240],[236,3253,1236],{"className":3254},[239,447]," and we want the new value of the tick\ncounter used, not the old one. Most models don’t refer to the tick counter in\ntheir plotting commands, but nonetheless, for consistency and to avoid\nmistakes we suggest always putting ",[160,3257,1270],{}," before the plotting commands.",[22,3260,3261],{},"Some models will require some additional changes:",[3177,3263,3264,3291,3308,3324],{},[57,3265,3266,3267,3273,3274,3280,3281,3287,3288,3290],{},"If your model already has a global “ticks” or “clock” or “time” variable, get\nrid of it. Use the ",[169,3268,3269],{"displayText":1270,"permalink":1270},[16,3270,1270],{"href":3091,"rel":3271,"className":3272,"dataDisplayText":1270,"target":179,"title":1270},[176],[178]," command and ",[169,3275,3276],{"displayText":1517,"permalink":1517},[16,3277,1517],{"href":3099,"rel":3278,"className":3279,"dataDisplayText":1517,"target":179,"title":1517},[176],[178]," reporter instead. (If your\nmodel uses fractional increments of time, use ",[169,3282,3283],{"displayText":1523,"permalink":1523},[16,3284,1523],{"href":3124,"rel":3285,"className":3286,"dataDisplayText":1523,"target":179,"title":1523},[176],[178]," instead of\n",[160,3289,1270],{},".) If you had a monitor for that variable, you can get rid of it;\nthere’s now a tick counter in the toolbar.",[57,3292,3293,3297,3298,3300,3301,3307],{},[236,3294,3295],{},[236,3296,1230],{}," resets the tick counter to zero. If you don’t use ",[160,3299,1230],{},"\nin your setup procedure, then you may need to add ",[169,3302,3303],{"displayText":1414,"permalink":1414},[16,3304,1414],{"href":3114,"rel":3305,"className":3306,"dataDisplayText":1414,"target":179,"title":1414},[176],[178]," to reset\nthe counter to zero.",[57,3309,3310,3311,163,3317,3323],{},"If you used ",[169,3312,3313],{"displayText":3148,"permalink":3148},[16,3314,3148],{"href":3151,"rel":3315,"className":3316,"dataDisplayText":3148,"target":179,"title":3148},[176],[178],[169,3318,3319],{"displayText":3156,"permalink":3156},[16,3320,3156],{"href":3159,"rel":3321,"className":3322,"dataDisplayText":3156,"target":179,"title":3156},[176],[178]," to prevent view updates from\nhappening in the middle of go, you can get rid of them.",[57,3325,3326,3327,3333],{},"If your model needs to update the view without advancing the tick counter\n(examples: Party, Dice Stalagmite, network models with animated layout,\nmodels with mouse interaction buttons), use the ",[169,3328,3329],{"displayText":3156,"permalink":3156},[16,3330,3156],{"href":3159,"rel":3331,"className":3332,"dataDisplayText":3156,"target":179,"title":3156},[176],[178]," command to force\nadditional view updates so the user can see what is going on.",[147,3335,3338],{"id":3336,"className":3337},"speed-slider",[14],[16,3339,3342],{"className":3340,"href":3341},[19],"#speed-slider","Speed slider",[22,3344,3345],{},"Previous versions of NetLogo had a speed slider that could be used to make\nmodels run slower, so you can see what’s going on.",[22,3347,3348],{},"In NetLogo 4.0, the slider can be used to speed up models as well. It does this\nby updating the view less frequently. Updating the view takes time, so the fewer\nupdates, the faster the model runs.",[22,3350,3351],{},"The default position of the slider is in the center. When you’re at the center,\nthe slider says “normal speed”.",[22,3353,3354],{},"As you move the slider away from the center position, the model will gradually\nrun faster or slower.",[22,3356,3357],{},"At very high speeds, view updates become very infrequent and may be separated by\nseveral seconds. It may feel like the model is actually running slower, since\nthe updates are so infrequent. But watch the tick counter, or other indicators\nsuch as plots, and you’ll see that yes, the model really is running faster. If\nthe infrequent updates are disconcerting, don’t push the slider so far over.",[22,3359,3360],{},"When using tick-based updates, slowing the model down does not cause additional\nview updates. Rather, NetLogo simply pauses after each tick.",[22,3362,3363,3364,3366,3367,3369],{},"When using continuous updates, slowing the model down means view updates become\nmore closely spaced. If you push the speed slider more than halfway to the left,\nthe model will be running so slowly that you can watch turtles moving one at a\ntime! This is new in NetLogo 4.0; in previous NetLogo versions, no matter how\nslowly you ran a model, you would never see the agents in an ",[160,3365,1872],{}," moving one at\na time; all the agents in an ",[160,3368,1872],{}," always appeared to move together.",[147,3371,3374],{"id":3372,"className":3373},"numbers",[14],[16,3375,3378],{"className":3376,"href":3377},[19],"#numbers","Numbers",[22,3380,3381],{},"NetLogo no longer maintains an internal distinction between integers and\nfloating point numbers. So for example:",[22,3383,3384],{},"Old:",[231,3386,3387],{},[160,3388,3389,262,3393,262,3396,3399,3401,3404,3406,262,3409,262,3412,3416,3418,3421,3423,262,3426,262,3429,262,3432,262,3435,3438,3440,3443,3445,262,3448,262,3451,262,3455,262,3458,3461,3463,3466,3468,262,3471,262,3474,262,3477,262,3481,3484,3486],{},[236,3390,3392],{"className":3391},[239,447],"observer>",[236,3394,2335],{"className":3395},[239,1229],[236,3397,257],{"className":3398},[239,251],[1223,3400],{},[236,3402,257],{"className":3403},[239,251],[1223,3405],{},[236,3407,3392],{"className":3408},[239,447],[236,3410,2335],{"className":3411},[239,1229],[236,3413,3415],{"className":3414},[239,251],"3.0",[1223,3417],{},[236,3419,3415],{"className":3420},[239,251],[1223,3422],{},[236,3424,3392],{"className":3425},[239,447],[236,3427,2335],{"className":3428},[239,1229],[236,3430,2774],{"className":3431},[239,251],[236,3433,212],{"className":3434},[239,240],[236,3436,2814],{"className":3437},[239,251],[1223,3439],{},[236,3441,257],{"className":3442},[239,251],[1223,3444],{},[236,3446,3392],{"className":3447},[239,447],[236,3449,2335],{"className":3450},[239,1229],[236,3452,3454],{"className":3453},[239,251],"1.5",[236,3456,212],{"className":3457},[239,240],[236,3459,3454],{"className":3460},[239,251],[1223,3462],{},[236,3464,3415],{"className":3465},[239,251],[1223,3467],{},[236,3469,3392],{"className":3470},[239,447],[236,3472,2335],{"className":3473},[239,1229],[236,3475,257],{"className":3476},[239,251],[236,3478,3480],{"className":3479},[239,240],"=",[236,3482,3415],{"className":3483},[239,251],[1223,3485],{},[236,3487,246],{"className":3488},[239,245],[22,3490,3491],{},"(The last line shows that although the distinction between integer 3 and\nfloating point 3.0 was maintained, the two numbers were still considered equal.)",[22,3493,3494],{},"New:",[231,3496,3497],{},[160,3498,3499,262,3502,262,3505,3508,3510,3513,3515,262,3518,262,3521,3524,3526,3529,3531,262,3534,262,3537,262,3540,262,3543,3546,3548,3551,3553,262,3556,262,3559,262,3562,262,3565,3568,3570,3573,3575,262,3578,262,3581,262,3584,262,3587,3590,3592],{},[236,3500,3392],{"className":3501},[239,447],[236,3503,2335],{"className":3504},[239,1229],[236,3506,257],{"className":3507},[239,251],[1223,3509],{},[236,3511,257],{"className":3512},[239,251],[1223,3514],{},[236,3516,3392],{"className":3517},[239,447],[236,3519,2335],{"className":3520},[239,1229],[236,3522,3415],{"className":3523},[239,251],[1223,3525],{},[236,3527,257],{"className":3528},[239,251],[1223,3530],{},[236,3532,3392],{"className":3533},[239,447],[236,3535,2335],{"className":3536},[239,1229],[236,3538,2774],{"className":3539},[239,251],[236,3541,212],{"className":3542},[239,240],[236,3544,2814],{"className":3545},[239,251],[1223,3547],{},[236,3549,257],{"className":3550},[239,251],[1223,3552],{},[236,3554,3392],{"className":3555},[239,447],[236,3557,2335],{"className":3558},[239,1229],[236,3560,3454],{"className":3561},[239,251],[236,3563,212],{"className":3564},[239,240],[236,3566,3454],{"className":3567},[239,251],[1223,3569],{},[236,3571,257],{"className":3572},[239,251],[1223,3574],{},[236,3576,3392],{"className":3577},[239,447],[236,3579,2335],{"className":3580},[239,1229],[236,3582,257],{"className":3583},[239,251],[236,3585,3480],{"className":3586},[239,240],[236,3588,3415],{"className":3589},[239,251],[1223,3591],{},[236,3593,246],{"className":3594},[239,245],[22,3596,3597],{},"We expect that only rare models will be negatively impacted by this change.",[22,3599,3600],{},"A benefit of this change is that NetLogo now supports a much larger range of\nintegers. The old range was -2,147,483,648 to 2,147,483,647 (around +/- 2\nbillion); the new range is +/-9,007,199,254,740,992 (around +/- 9 quadrillion).",[147,3602,3605],{"id":3603,"className":3604},"agentset-building",[14],[16,3606,3609],{"className":3607,"href":3608},[19],"#agentset-building","Agentset building",[22,3611,3612,3613,163,3616,3619,3620,163,3628,3636,3637,3645,3646,134,3648,3650],{},"NetLogo 3.1 (and some earlier versions) included primitives called\n",[160,3614,3615],{},"turtles-from",[160,3617,3618],{},"patches-from"," that were occasionally useful for building\nagentsets. In NetLogo 4.0, these primitives have been replaced with new\nprimitives called ",[169,3621,3623],{"displayText":3622,"permalink":3622},"turtle-set",[16,3624,3622],{"href":3625,"rel":3626,"className":3627,"dataDisplayText":3622,"target":179,"title":3622},"/dictionary#turtle-set",[176],[178],[169,3629,3631],{"displayText":3630,"permalink":3630},"patch-set",[16,3632,3630],{"href":3633,"rel":3634,"className":3635,"dataDisplayText":3630,"target":179,"title":3630},"/dictionary#patch-set",[176],[178]," that are much more flexible\nand powerful. (",[169,3638,3640],{"displayText":3639,"permalink":3639},"link-set",[16,3641,3639],{"href":3642,"rel":3643,"className":3644,"dataDisplayText":3639,"target":179,"title":3639},"/dictionary#link-set",[176],[178]," exists as well.) See the entries for these\nprimitives in the NetLogo Dictionary. Models that use the old ",[160,3647,3615],{},[160,3649,3618],{}," will need to be altered by hand to use the new primitives.",[147,3652,3655],{"id":3653,"className":3654},"rgb-colors",[14],[16,3656,3659],{"className":3657,"href":3658},[19],"#rgb-colors","RGB Colors",[22,3661,3662,3663,163,3666,3668,3669,2602,3677,3684],{},"In NetLogo 3.1 RGB and HSB colors could be approximated as NetLogo colors using\nthe ",[160,3664,3665],{},"rgb",[160,3667,1139],{}," primitives. These have been renamed to ",[169,3670,3672],{"displayText":3671,"permalink":3671},"approximate-rgb",[16,3673,3671],{"href":3674,"rel":3675,"className":3676,"dataDisplayText":3671,"target":179,"title":3671},"/dictionary#approximate-rgb",[176],[178],[169,3678,3679],{"displayText":1145,"permalink":1145},[16,3680,1145],{"href":3681,"rel":3682,"className":3683,"dataDisplayText":1145,"target":179,"title":1145},"/dictionary#approximate-hsb",[176],[178]," and now expect inputs in the range 0-255, not 0-1.",[22,3686,3687,3688,3692],{},"The full RGB spectrum is now available in NetLogo so it may no longer be\nnecessary to use these primitives at all. You can set any color variable to a\nthree-item RGB list, with values in the 0-255 range, and get that exact color.\nSee the ",[16,3689,3691],{"href":3690},"/programming#colors","Color"," section of the Programming Guide for\ndetails.",[147,3694,3697],{"id":3695,"className":3696},"tie",[14],[16,3698,3701],{"className":3699,"href":3700},[19],"#tie","Tie",[22,3703,3704,3705,3708,3709,3717,3718,1518,3721,3724,3725,3728,3729,3736],{},"In previous versions ",[160,3706,3707],{},"__tie"," was provided as an experimental feature. As of\nNetLogo 4.0 links have a ",[169,3710,3712],{"displayText":3711,"permalink":3711},"tie-mode",[16,3713,3711],{"href":3714,"rel":3715,"className":3716,"dataDisplayText":3711,"target":179,"title":3711},"/dictionary#tie-mode",[176],[178]," variable which can be set to ",[160,3719,3720],{},"\"none\"",[160,3722,3723],{},"\"free\"",", or ",[160,3726,3727],{},"\"fixed\"",". In 4.0 ",[169,3730,3731],{"displayText":3695,"permalink":3695},[16,3732,3695],{"href":3733,"rel":3734,"className":3735,"dataDisplayText":3695,"target":179,"title":3695},"/dictionary#tie",[176],[178]," is now a link-only primitive. This means\nthat to tie turtle 1 to turtle 0 you write:",[231,3738,3739],{},[160,3740,3741,262,3744,262,3747,574,3750,262,3754,262,3757,574,3760,2582],{},[236,3742,1872],{"className":3743},[239,1229],[236,3745,711],{"className":3746},[239,240],[236,3748,715],{"className":3749},[239,251],[236,3751,3753],{"className":3752},[239,1229],"create-link-to",[236,3755,711],{"className":3756},[239,240],[236,3758,2774],{"className":3759},[239,251],[236,3761,3695],{"className":3762},[239,1229],[22,3764,3765,3766,3769],{},"See the ",[16,3767,3701],{"href":3768},"/programming#tie"," section of the programming guide for\ndetails.",[112,3771,3774],{"id":3772,"className":3773},"changes-for-netlogo-31",[14],[16,3775,110],{"className":3776,"href":109},[19],[147,3778,3781],{"id":3779,"className":3780},"agentsets",[14],[16,3782,3785],{"className":3783,"href":3784},[19],"#agentsets","Agentsets",[22,3787,3788,3789,213,3797,3805,3806,3809],{},"If your model is behaving strangely or incorrectly, it may be because since\nNetLogo 3.1, agentsets are now always in random order. In prior versions of\nNetLogo, agentsets were always in a fixed order. If your code depended on that\nfixed order, then it won’t work anymore. How to fix your model to work with\nrandomized agentsets depends on the details of what your code is doing. In some\nsituations, it is helpful to use the ",[169,3790,3792],{"displayText":3791,"permalink":3791},"sort",[16,3793,3791],{"href":3794,"rel":3795,"className":3796,"dataDisplayText":3791,"target":179,"title":3791},"/dictionary#sort",[176],[178],[169,3798,3800],{"displayText":3799,"permalink":3799},"sort-by",[16,3801,3799],{"href":3802,"rel":3803,"className":3804,"dataDisplayText":3799,"target":179,"title":3799},"/dictionary#sort-by",[176],[178]," primitives to\nconvert an agentset (random order) into a list of agents (fixed order). See\n“Lists of agents” in the ",[16,3807,3808],{"href":1696},"Lists"," section of the\nProgramming Guide.",[147,3811,3814],{"id":3812,"className":3813},"wrapping",[14],[16,3815,3818],{"className":3816,"href":3817},[19],"#wrapping","Wrapping",[22,3820,3821,3822,3826],{},"If you are seeing pieces of turtle shapes wrapping around the view edges, it’s\nbecause NetLogo 3.0 allowed you to turn off such wrapping in the view without\naffecting the behavior of the model. Since NetLogo 3.1, if you don’t want the\nview to wrap you must make it so the world doesn’t wrap, using the new topology\nfeature. Making this change may require other changes to your model, though. See\nthe ",[16,3823,3825],{"href":3824},"/programming#topology","Topology"," section of the Programming Guide for a\nthorough discussion of how to convert your model to take advantage of this new\nfeature.",[147,3828,3831],{"id":3829,"className":3830},"random-turtle-coordinates",[14],[16,3832,3835],{"className":3833,"href":3834},[19],"#random-turtle-coordinates","Random turtle coordinates",[22,3837,3838,3839,3859,3860,213,3862,3865],{},"Many models made in NetLogo 3.0 or earlier use\n",[160,3840,3841,262,3845,262,3848,262,3852,262,3855],{},[236,3842,3844],{"className":3843},[239,1229],"setxy",[236,3846,2258],{"className":3847},[239,240],[236,3849,3851],{"className":3850},[239,240],"world-width",[236,3853,2258],{"className":3854},[239,240],[236,3856,3858],{"className":3857},[239,240],"world-height"," to scatter turtles randomly,\nusing either ",[160,3861,2258],{},[160,3863,3864],{},"random-float",". It only works if world wrapping is on.",[22,3867,3868,3869,3871],{},"(Why? Because when wrapping is on, you can set coordinates of turtles to numbers\nbeyond the edge of the world and NetLogo will wrap the turtle to the other side.\nBut in worlds that don’t wrap setting the x or y coordinates of a turtle to a\npoint outside the bounds of the world causes a runtime error. The world wrap\nsettings were added in NetLogo 3.1. See the\n",[16,3870,3825],{"href":3824}," section of the Programming Guide for more\ninformation.)",[22,3873,3874],{},"To fix your model so that it works regardless of the wrapping settings, use one\nof these two commands instead:",[231,3876,3877],{},[160,3878,3879,262,3882,262,3886,3890,3892,262,3895,262,3899],{},[236,3880,3844],{"className":3881},[239,1229],[236,3883,3885],{"className":3884},[239,240],"random-xcor",[236,3887,3889],{"className":3888},[239,240],"random-ycor",[1223,3891],{},[236,3893,3844],{"className":3894},[239,1229],[236,3896,3898],{"className":3897},[239,240],"random-pxcor",[236,3900,3902],{"className":3901},[239,240],"random-pycor",[22,3904,3905],{},"The two commands are a bit different. The first command puts the turtle on a\nrandom point in the world. The second command puts the turtle on the center of a\nrandom patch. An even more concise way to put a turtle on the center of a random\npatch is:",[231,3907,3908],{},[160,3909,3910,262,3914,262,3918],{},[236,3911,3913],{"className":3912},[239,1229],"move-to",[236,3915,3917],{"className":3916},[239,240],"one-of",[236,3919,3921],{"className":3920},[239,240],"patches",{"title":2911,"searchDepth":3923,"depth":3924,"links":3925},5,3,[3926,3928,3930,3935,3939,3954,3958,3976,3980,4000],{"id":46,"depth":3927,"text":52},4,{"id":114,"depth":3929,"text":62},2,{"id":141,"depth":3929,"text":68,"children":3931},[3932,3933],{"id":149,"depth":3924,"text":155},{"id":195,"depth":3924,"text":3934},"ifelse-value Precedence Change with Infix Operators",{"id":321,"depth":3929,"text":74,"children":3936},[3937,3938],{"id":328,"depth":3924,"text":334},{"id":347,"depth":3924,"text":353},{"id":384,"depth":3929,"text":80,"children":3940},[3941,3942,3943,3944,3945,3946,3947,3948,3949,3951,3952],{"id":391,"depth":3924,"text":397},{"id":520,"depth":3924,"text":526},{"id":659,"depth":3924,"text":665},{"id":680,"depth":3924,"text":686},{"id":692,"depth":3924,"text":698},{"id":737,"depth":3924,"text":743},{"id":761,"depth":3924,"text":767},{"id":931,"depth":3924,"text":937},{"id":1006,"depth":3924,"text":3950},"Removal of hubnet-set-client-interface",{"id":1026,"depth":3924,"text":1032},{"id":1091,"depth":3924,"text":3953},"Add range primitive",{"id":1120,"depth":3929,"text":86,"children":3955},[3956,3957],{"id":1127,"depth":3924,"text":1133},{"id":1160,"depth":3924,"text":1166},{"id":1187,"depth":3929,"text":92,"children":3959},[3960,3961,3967,3968,3969,3970,3971],{"id":1194,"depth":3924,"text":1200},{"id":1490,"depth":3924,"text":1496,"children":3962},[3963,3964,3966],{"id":1414,"depth":3927,"text":1414},{"id":1532,"depth":3927,"text":3965},"reset-ticks and plotting",{"id":1557,"depth":3927,"text":1557},{"id":1597,"depth":3924,"text":1603},{"id":1621,"depth":3924,"text":1627},{"id":1639,"depth":3924,"text":1645},{"id":1664,"depth":3924,"text":1670},{"id":1727,"depth":3924,"text":1733,"children":3972},[3973,3974,3975],{"id":1742,"depth":3927,"text":1748},{"id":1762,"depth":3927,"text":1768},{"id":1810,"depth":3927,"text":1816},{"id":1822,"depth":3929,"text":98,"children":3977},[3978],{"id":1829,"depth":3924,"text":3979},"Combining set and of",{"id":2134,"depth":3929,"text":104,"children":3981},[3982,3983,3984,3985,3987,3988,3989,3991,3992,3995,3996,3997,3998,3999],{"id":2141,"depth":3924,"text":2147},{"id":2179,"depth":3924,"text":2185},{"id":2284,"depth":3924,"text":2290},{"id":2393,"depth":3924,"text":3986},"The -at primitives",{"id":2464,"depth":3924,"text":2470},{"id":2877,"depth":3924,"text":2883},{"id":2965,"depth":3924,"text":3990},"Serial ask",{"id":3075,"depth":3924,"text":1496},{"id":3136,"depth":3924,"text":3142,"children":3993},[3994],{"id":3215,"depth":3927,"text":3221},{"id":3336,"depth":3924,"text":3342},{"id":3372,"depth":3924,"text":3378},{"id":3603,"depth":3924,"text":3609},{"id":3653,"depth":3924,"text":3659},{"id":3695,"depth":3924,"text":3701},{"id":3772,"depth":3929,"text":110,"children":4001},[4002,4003,4004],{"id":3779,"depth":3924,"text":3785},{"id":3812,"depth":3924,"text":3818},{"id":3829,"depth":3924,"text":3835},"Guide to transitioning between different versions of NetLogo, including migration tips and information about breaking changes.","md",{"source":4008,"metadataOutputPath":4009,"projectConfig":4010,"language":4017,"inheritFrom":4026,"output":4025,"version":4011,"keywords":4027,"tags":4032,"icon":4033,"assetsRoot":4034},"autogen/transition.md","content/transition.metadata.yaml",{"version":4011,"projectRoot":126,"scanRoot":4012,"outputRoot":4013,"defaults":4014,"engine":4020,"partials":4021,"dedupeIdenticalDiskWrites":4025},"7.0.4","autogen","content",{"inheritFrom":4015,"language":4017,"output":4018,"extension":4006,"title":4019,"version":4011},[4016],0,"en",false,"NetLogo User Manual","handlebars",{"directoryPaths":4022,"extensions":4023},[126],[4024,4006],"mustache",true,[4016],[4028,4029,4030,4031],"Transition","Migration","Version Changes","NetLogo",[4028,4029,4030],"i-lucide-circle-fading-arrow-up","/home/runner/work/Helio/Helio/apps/docs/autogen","/transition",{"title":5,"description":4005},"transition","1W64OwkkGst_N8mZV6qxOz8L26QB-9o-PZrqqHz6HbQ",[4040,4045],{"title":4041,"path":4042,"stem":4043,"description":4044},"Time Extension Dictionary: dictionary","/time/dictionary","time/dictionary","Documentation for the dictionary primitive.",{"title":4046,"path":4047,"stem":4048,"description":4049},"Tutorial #1: Models","/tutorial1","tutorial1","First tutorial in the NetLogo learning series, introducing basic concepts of exploring and running NetLogo models.",1777657788930]