[{"data":1,"prerenderedAt":3196},["ShallowReactive",2],{"/faq":3,"/faq-surround":3188},{"id":4,"title":5,"body":6,"description":3155,"extension":3156,"meta":3157,"navigation":3175,"path":3184,"seo":3185,"stem":3186,"__hash__":3187},"content/faq.md","Frequently Asked Questions",{"type":7,"value":8,"toc":3063},"minimark",[9,14,26,35,538,546,554,557,560,567,570,583,594,601,604,611,614,621,624,631,634,637,644,653,663,678,687,701,707,716,719,727,734,748,755,758,767,776,779,782,789,792,799,805,812,815,818,825,851,862,869,872,898,905,908,911,918,921,924,931,938,945,948,951,958,973,980,983,1004,1056,1095,1107,1114,1121,1124,1131,1134,1137,1140,1148,1155,1162,1165,1180,1187,1193,1196,1203,1210,1219,1222,1230,1233,1236,1243,1250,1253,1256,1264,1271,1277,1305,1324,1327,1354,1361,1368,1376,1383,1390,1393,1396,1399,1407,1413,1420,1427,1436,1443,1450,1453,1456,1463,1466,1475,1482,1485,1492,1499,1525,1532,1535,1546,1553,1560,1567,1570,1573,1576,1583,1586,1593,1600,1603,1610,1613,1619,1622,1720,1741,1748,1751,1754,1823,1835,1846,1849,1856,1863,1870,1877,1884,1887,1901,1912,1920,1928,1939,1946,1949,1952,1959,1962,1969,1976,1983,1990,1997,2004,2012,2019,2022,2060,2063,2070,2076,2079,2093,2096,2103,2114,2117,2143,2146,2152,2192,2195,2208,2211,2214,2230,2233,2239,2246,2253,2265,2272,2275,2282,2285,2292,2299,2315,2318,2325,2353,2374,2381,2384,2410,2438,2489,2492,2565,2572,2575,2582,2592,2620,2627,2646,2653,2656,2667,2676,2679,2686,2689,2696,2701,2710,2713,2720,2729,2732,2747,2750,2763,2770,2773,2848,2860,2867,2881,2889,2896,2904,2911,2919,2926,2938,2958,2961,2968,2975,2978,3012,3020,3023,3030,3037,3040,3047,3056],[10,11,13],"style",{"type":12},"text/css","\n  /* The following is about making the nested lists look like headings with lists inside */\n\n  #questions > ul {\n    padding-left: 0px;\n  }\n\n  #questions > ul > li {\n    list-style-type: none;\n  }\n\n  #questions > ul > li > a {\n    display: block;\n    clear: both;\n    margin: 1em 0em;\n    padding: 0.2em;\n    font-size: 125%;\n    font-weight: bold;\n    text-decoration: none;\n    background: rgb(175,175,175);\n    color: inherit;\n  }\n\n  #questions > ul > li > ul > li {\n    list-style-type: disc;\n    font-size: 80%;\n    font-weight: bold;\n  }\n",[15,16,20],"h1",{"id":17,"className":18},"frequently-asked-questions",[19],"section-heading",[21,22,5],"a",{"className":23,"href":25},[24],"section-anchor","#frequently-asked-questions",[27,28,29,30,34],"p",{},"Feedback from users is very valuable to us in designing and improving NetLogo.\nWe’d like to hear from you. (See ",[21,31,33],{"href":32},"/contact","Contacting Us",".)",[36,37,40,50],"div",{"className":38},[39],"toc",[41,42,45],"h4",{"id":43,"className":44},"table-of-contents",[19],[21,46,49],{"className":47,"href":48},[24],"#table-of-contents","Table of Contents",[51,52,53,152,178,270,332,480,506,520],"ul",{},[54,55,56,60],"li",{},[21,57,59],{"href":58},"#general","General",[51,61,62,68,74,80,86,92,98,104,110,116,122,128,134,140,146],{},[54,63,64],{},[21,65,67],{"href":66},"#why-is-it-called-netlogo","Why is it called NetLogo?",[54,69,70],{},[21,71,73],{"href":72},"#how-do-i-cite-netlogo-or-hubnet-in-a-publication","How do I cite NetLogo or HubNet in a publication?",[54,75,76],{},[21,77,79],{"href":78},"#how-do-i-cite-a-model-from-the-models-library-in-a-publication","How do I cite a model from the Models Library in a publication?",[54,81,82],{},[21,83,85],{"href":84},"#where-and-when-was-netlogo-created","Where and when was NetLogo created?",[54,87,88],{},[21,89,91],{"href":90},"#what-programming-language-was-netlogo-written-in","What programming language was NetLogo written in?",[54,93,94],{},[21,95,97],{"href":96},"#whats-the-relationship-between-starlogo-and-netlogo","What’s the relationship between StarLogo and NetLogo?",[54,99,100],{},[21,101,103],{"href":102},"#under-what-license-is-netlogo-released-is-the-source-code-available","Under what license is NetLogo released? Is the source code available?",[54,105,106],{},[21,107,109],{"href":108},"#do-you-offer-any-workshops-or-other-training-opportunities-for-netlogo","Do you offer any workshops or other training opportunities for NetLogo?",[54,111,112],{},[21,113,115],{"href":114},"#are-there-any-netlogo-textbooks","Are there any NetLogo textbooks?",[54,117,118],{},[21,119,121],{"href":120},"#is-netlogo-available-in-other-languages-besides-english","Is NetLogo available in other languages besides English?",[54,123,124],{},[21,125,127],{"href":126},"#is-netlogo-compiled-or-interpreted","Is NetLogo compiled or interpreted?",[54,129,130],{},[21,131,133],{"href":132},"#has-anyone-built-a-model-of-x","Has anyone built a model of \u003Cx>?",[54,135,136],{},[21,137,139],{"href":138},"#are-netlogo-models-runs-scientifically-reproducible","Are NetLogo models runs scientifically reproducible?",[54,141,142],{},[21,143,145],{"href":144},"#will-netlogo-and-netlogo-3d-remain-separate","Will NetLogo and NetLogo 3D remain separate?",[54,147,148],{},[21,149,151],{"href":150},"#can-i-run-netlogo-on-my-phone-or-tablet","Can I run NetLogo on my phone or tablet?",[54,153,154,158],{},[21,155,157],{"href":156},"#downloading","Downloading",[51,159,160,166,172],{},[54,161,162],{},[21,163,165],{"href":164},"#can-i-have-multiple-versions-of-netlogo-installed-at-the-same-time","Can I have multiple versions of NetLogo installed at the same time?",[54,167,168],{},[21,169,171],{"href":170},"#im-on-a-unix-system-and-i-cant-untar-the-download-why","I’m on a UNIX system and I can’t untar the download. Why?",[54,173,174],{},[21,175,177],{"href":176},"#how-do-i-install-netlogo-unattended","How do I install NetLogo unattended?",[54,179,180,184],{},[21,181,183],{"href":182},"#running","Running",[51,185,186,192,198,204,210,216,222,228,234,240,246,252,258,264],{},[54,187,188],{},[21,189,191],{"href":190},"#can-i-run-netlogo-from-a-cd-a-network-drive-or-a-usb-drive","Can I run NetLogo from a CD, a network drive, or a USB drive?",[54,193,194],{},[21,195,197],{"href":196},"#why-is-netlogo-so-much-slower-when-i-unplug-my-windows-laptop","Why is NetLogo so much slower when I unplug my Windows laptop?",[54,199,200],{},[21,201,203],{"href":202},"#why-does-netlogo-bundle-java","Why does NetLogo bundle Java?",[54,205,206],{},[21,207,209],{"href":208},"#how-come-netlogo-wont-start-up-on-my-linux-machine","How come NetLogo won’t start up on my Linux machine?",[54,211,212],{},[21,213,215],{"href":214},"#when-i-try-to-install-netlogo-on-windows-i-see-windows-protected-your-pc","When I try to install NetLogo on Windows, I see “Windows protected your PC”",[54,217,218],{},[21,219,221],{"href":220},"#when-i-try-to-start-netlogo-on-windows-i-get-an-error-the-jvm-could-not-be-started-help","When I try to start NetLogo on Windows I get an error “The JVM could not be started”. Help!",[54,223,224],{},[21,225,227],{"href":226},"#netlogo-wont-start-on-mac-os-sierra-or-later","NetLogo won’t start on Mac OS Sierra (or later)",[54,229,230],{},[21,231,233],{"href":232},"#netlogo-wont-start-on-windows-or-crashes-suddenly-on-mac-os-sierra","NetLogo won’t start on Windows or crashes suddenly on Mac OS Sierra",[54,235,236],{},[21,237,239],{"href":238},"#how-can-i-speed-up-the-launching-of-netlogo-on-a-remote-server-that-is-behind-a-proxy","How can I speed up the launching of NetLogo on a remote server that is behind a proxy?",[54,241,242],{},[21,243,245],{"href":244},"#can-i-run-netlogo-from-the-command-line-without-the-gui","Can I run NetLogo from the command line, without the GUI?",[54,247,248],{},[21,249,251],{"href":250},"#does-netlogo-take-advantage-of-multiple-processors","Does NetLogo take advantage of multiple processors?",[54,253,254],{},[21,255,257],{"href":256},"#can-i-distribute-netlogo-model-runs-across-a-cluster-or-grid-of-computers","Can I distribute NetLogo model runs across a cluster or grid of computers?",[54,259,260],{},[21,261,263],{"href":262},"#is-there-any-way-to-recover-lost-work-if-netlogo-crashes-or-freezes","Is there any way to recover lost work if NetLogo crashes or freezes?",[54,265,266],{},[21,267,269],{"href":268},"#why-is-hubnet-discovery-not-working","Why is HubNet Discovery Not Working?",[54,271,272,276],{},[21,273,275],{"href":274},"#usage","Usage",[51,277,278,284,290,296,302,308,314,320,326],{},[54,279,280],{},[21,281,283],{"href":282},"#when-i-move-the-speed-slider-all-the-way-to-the-right-why-does-my-model-seem-to-stop","When I move the speed slider all the way to the right, why does my model seem to stop?",[54,285,286],{},[21,287,289],{"href":288},"#can-i-use-the-mouse-to-paint-in-the-view","Can I use the mouse to “paint” in the view?",[54,291,292],{},[21,293,295],{"href":294},"#how-big-can-my-model-be-how-many-turtles-patches-procedures-buttons-and-so-on-can-my-model-contain","How big can my model be? How many turtles, patches, procedures, buttons, and so on can my model contain?",[54,297,298],{},[21,299,301],{"href":300},"#where-are-the-netlogo-configuration-files","Where are the NetLogo Configuration Files?",[54,303,304],{},[21,305,307],{"href":306},"#can-i-use-gis-data-in-netlogo","Can I use GIS data in NetLogo?",[54,309,310],{},[21,311,313],{"href":312},"#my-model-runs-slowly-how-can-i-speed-it-up","My model runs slowly. How can I speed it up?",[54,315,316],{},[21,317,319],{"href":318},"#can-i-have-more-than-one-model-open-at-a-time","Can I have more than one model open at a time?",[54,321,322],{},[21,323,325],{"href":324},"#can-i-change-the-choices-in-a-chooser-on-the-fly","Can I change the choices in a chooser on the fly?",[54,327,328],{},[21,329,331],{"href":330},"#can-i-divide-the-code-for-my-model-up-into-several-files","Can I divide the code for my model up into several files?",[54,333,334,338],{},[21,335,337],{"href":336},"#programming","Programming",[51,339,340,346,352,358,364,370,392,398,404,410,426,432,438,444,450,456,462,468,474],{},[54,341,342],{},[21,343,345],{"href":344},"#how-does-the-netlogo-language-differ-from-other-logos","How does the NetLogo language differ from other Logos?",[54,347,348],{},[21,349,351],{"href":350},"#how-come-my-model-from-an-earlier-netlogo-doesnt-work-right","How come my model from an earlier NetLogo doesn’t work right?",[54,353,354],{},[21,355,357],{"href":356},"#how-do-i-take-the-negative-of-a-number","How do I take the negative of a number?",[54,359,360],{},[21,361,363],{"href":362},"#my-turtle-moved-forward-1-but-its-still-on-the-same-patch-why","My turtle moved forward 1, but it’s still on the same patch. Why?",[54,365,366],{},[21,367,369],{"href":368},"#how-do-i-keep-my-turtles-on-patch-centers","How do I keep my turtles on patch centers?",[54,371,372],{},[21,373,375,391],{"href":374},"#codespan-classtoken-reporterpatch-aheadspan-span-classtoken-number1spancode-is-reporting-the-same-patch-my-turtle-is-already-standing-on-why",[376,377,378,385,386],"code",{},[379,380,384],"span",{"className":381},[382,383],"token","reporter","patch-ahead"," ",[379,387,390],{"className":388},[382,389],"number","1"," is reporting the same patch my turtle is already standing on. Why?",[54,393,394],{},[21,395,397],{"href":396},"#how-do-i-give-my-turtles-vision","How do I give my turtles “vision”?",[54,399,400],{},[21,401,403],{"href":402},"#can-agents-sense-whats-in-the-drawing-layer","Can agents sense what’s in the drawing layer?",[54,405,406],{},[21,407,409],{"href":408},"#im-getting-numbers-like-010000000004-and-0799999999999-instead-of-01-and-08-why","I’m getting numbers like 0.10000000004 and 0.799999999999 instead of 0.1 and 0.8. Why?",[54,411,412],{},[21,413,415,416,425],{"href":414},"#the-documentation-says-that-codespan-classtoken-reporterrandom-floatspan-span-classtoken-number1spancode-might-return-0-but-will-never-return-1-what-if-i-want-1-to-be-included","The documentation says that ",[376,417,418,385,422],{},[379,419,421],{"className":420},[382,383],"random-float",[379,423,390],{"className":424},[382,389]," might return 0 but will never return 1. What if I want 1 to be included?",[54,427,428],{},[21,429,431],{"href":430},"#why-is-the-number-value-in-my-monitor-widget-changing-even-though-nothing-is-happening-in-my-model","Why is the number value in my monitor widget changing even though nothing is happening in my model?",[54,433,434],{},[21,435,437],{"href":436},"#how-can-i-keep-two-turtles-from-occupying-the-same-patch","How can I keep two turtles from occupying the same patch?",[54,439,440],{},[21,441,443],{"href":442},"#how-can-i-find-out-if-a-turtle-is-dead","How can I find out if a turtle is dead?",[54,445,446],{},[21,447,449],{"href":448},"#does-netlogo-have-arrays","Does NetLogo have arrays?",[54,451,452],{},[21,453,455],{"href":454},"#does-netlogo-have-hash-tables-or-associative-arrays","Does NetLogo have hash tables or associative arrays?",[54,457,458],{},[21,459,461],{"href":460},"#how-can-i-use-different-patch-neighborhoods-circular-von-neumann-moore-etc","How can I use different patch “neighborhoods” (circular, Von Neumann, Moore, etc.)?",[54,463,464],{},[21,465,467],{"href":466},"#how-can-i-convert-an-agentset-to-a-list-of-agents-or-vice-versa","How can I convert an agentset to a list of agents, or vice versa?",[54,469,470],{},[21,471,473],{"href":472},"#how-do-i-stop-foreach","How do I stop foreach?",[54,475,476],{},[21,477,479],{"href":478},"#im-trying-to-make-a-list-why-do-i-keep-getting-the-error-expected-a-literal-value","I’m trying to make a list. Why do I keep getting the error “Expected a literal value”?",[54,481,482,486],{},[21,483,485],{"href":484},"#behaviorspace","BehaviorSpace",[51,487,488,494,500],{},[54,489,490],{},[21,491,493],{"href":492},"#why-are-the-rows-in-my-behaviorspace-table-results-out-of-order","Why are the rows in my BehaviorSpace table results out of order?",[54,495,496],{},[21,497,499],{"href":498},"#how-do-i-measure-runs-every-n-ticks","How do I measure runs every n ticks?",[54,501,502],{},[21,503,505],{"href":504},"#im-varying-a-global-variable-i-declared-in-the-code-tab-but-it-doesnt-work-why","I’m varying a global variable I declared in the Code tab, but it doesn’t work. Why?",[54,507,508,512],{},[21,509,511],{"href":510},"#netlogo-3d","NetLogo 3D",[51,513,514],{},[54,515,516],{},[21,517,519],{"href":518},"#does-netlogo-work-with-my-stereoscopic-device","Does NetLogo work with my stereoscopic device?",[54,521,522,526],{},[21,523,525],{"href":524},"#extensions","Extensions",[51,527,528],{},[54,529,530],{},[21,531,533,534,537],{"href":532},"#im-writing-an-extension-why-does-the-compiler-say-it-cant-find-orgnlogoapi","I’m writing an extension. Why does the compiler say it can’t find ",[376,535,536],{},"org.nlogo.api","?",[539,540,543],"h2",{"id":541,"className":542},"general",[19],[21,544,59],{"className":545,"href":58},[24],[547,548,551],"h3",{"id":549,"className":550},"why-is-it-called-netlogo",[19],[21,552,67],{"className":553,"href":66},[24],[27,555,556],{},"The “Logo” part is because NetLogo is a dialect of the Logo language.",[27,558,559],{},"“Net” is meant to evoke the decentralized, interconnected nature of the\nphenomena you can model with NetLogo, including network phenomena. It also\nrefers to HubNet, the multiuser participatory simulation environment included in\nNetLogo.",[547,561,564],{"id":562,"className":563},"how-do-i-cite-netlogo-or-hubnet-in-a-publication",[19],[21,565,73],{"className":566,"href":72},[24],[27,568,569],{},"If you use or refer to NetLogo, HubNet or a model from the NetLogo models\nlibrary, we ask that you cite it as follows:",[27,571,572,576,577,582],{},[573,574,575],"em",{},"NetLogo itself:"," Wilensky, U. 1999. NetLogo.\n",[21,578,579],{"href":579,"rel":580},"http://ccl.northwestern.edu/netlogo/",[581],"nofollow",". Center for Connected Learning and\nComputer-Based Modeling, Northwestern University. Evanston, IL.",[27,584,585,588,589,593],{},[573,586,587],{},"HubNet:"," Wilensky, U. & Stroup, W., 1999. HubNet.\n",[21,590,591],{"href":591,"rel":592},"http://ccl.northwestern.edu/netlogo/hubnet",[581],". Center for Connected Learning\nand Computer-Based Modeling, Northwestern University. Evanston, IL.",[547,595,598],{"id":596,"className":597},"how-do-i-cite-a-model-from-the-models-library-in-a-publication",[19],[21,599,79],{"className":600,"href":78},[24],[27,602,603],{},"The correct citation is included in the “Credits and References” section of each\nmodel’s Info tab.",[547,605,608],{"id":606,"className":607},"where-and-when-was-netlogo-created",[19],[21,609,85],{"className":610,"href":84},[24],[27,612,613],{},"NetLogo was first created in 1999 by Uri Wilensky at the Center for Connected\nLearning and Computer-Based Modeling, then at Tufts University in the Boston\narea. NetLogo grew out of StarLogoT, which was authored by Wilensky in 1997. In\n2000, the CCL moved to Northwestern University, in the Chicago area. NetLogo 1.0\ncame out in 2002, 2.0 in 2003, 3.0 in 2005, 4.0 in 2007, 4.1 in 2009, and 5.0\nin 2012.",[547,615,618],{"id":616,"className":617},"what-programming-language-was-netlogo-written-in",[19],[21,619,91],{"className":620,"href":90},[24],[27,622,623],{},"NetLogo is written mostly in Scala, with some parts in Java. (Scala code\ncompiles to Java byte code and is fully interoperable with Java and other JVM\nlanguages.)",[547,625,628],{"id":626,"className":627},"whats-the-relationship-between-starlogo-and-netlogo",[19],[21,629,97],{"className":630,"href":96},[24],[27,632,633],{},"The original StarLogo began at the MIT Media Lab in 1989 and ran on the\nConnection Machine. Later versions were developed for Macintosh computers:\nMacStarLogo (1994, MIT) and StarLogoT (1997, Tufts).",[27,635,636],{},"Today there are two StarLogo descendants under active development: NetLogo (from\nthe CCL at Northwestern University) and StarLogo TNG (from MIT). NetLogo is the\nmost widely used agent-based modeling environment in both education and\nresearch. StarLogo TNG is distinguished by its programming interface based on\ncolored blocks.",[547,638,641],{"id":639,"className":640},"under-what-license-is-netlogo-released-is-the-source-code-available",[19],[21,642,103],{"className":643,"href":102},[24],[27,645,646,647,652],{},"NetLogo is free, open source software under the\n",[21,648,651],{"href":649,"rel":650},"http://www.gnu.org/licenses/gpl-2.0",[581],"GPL (GNU General Public License), version 2",",\nor (at your option) any later version.",[27,654,655,656,659,662],{},"Commercial licenses are also available. To inquire about commercial licenses,\nplease contact Uri Wilensky at\n",[21,657],{"href":658},"mailto:netlogo@northwestern.edu",[21,660,661],{"href":658},"netlogo@northwestern.edu",".",[27,664,665,666,671,672,677],{},"The source code is ",[21,667,670],{"href":668,"rel":669},"https://github.com/NetLogo/NetLogo",[581],"on GitHub, here",".\nDevelopment discussion is on the\n",[21,673,676],{"href":674,"rel":675},"https://groups.google.com/group/netlogo-devel",[581],"netlogo-devel"," group.",[27,679,680,681,686],{},"The User Manual is published under a Creative Commons Attribution-ShareAlike\nlicense (",[21,682,685],{"href":683,"rel":684},"https://creativecommons.org/licenses/by-sa/3.0/",[581],"CC BY-SA 3.0",").",[27,688,689,690,694,695,700],{},"Source code for all of the extensions bundled with NetLogo is\n",[21,691,670],{"href":692,"rel":693},"https://github.com/NetLogo/",[581],". Most of the extensions are in\nthe public domain (",[21,696,699],{"href":697,"rel":698},"https://creativecommons.org/about/cc0",[581],"CC0 notice","). Other\nextensions are released under open source licenses. See each extension’s README\nfor details.",[27,702,703,704,686],{},"The Code Examples in the Models Library are in the public domain\n(",[21,705,699],{"href":697,"rel":706},[581],[27,708,709,710,715],{},"The rest of the models in the Models Library are provided under a variety of\nlicenses. Some are public domain and some are open source, but most are under\nthe Creative Commons Attribution-ShareAlike license\n(",[21,711,714],{"href":712,"rel":713},"https://creativecommons.org/licenses/by-nc-sa/3.0/",[581],"CC BY-NC-SA","), which is\nnot an open source license, though the models are free for noncommercial\ndistribution and use.",[27,717,718],{},"See each model’s Info tab to check its particular license.",[27,720,721,722,662],{},"The models are in a public Git repository\n",[21,723,726],{"href":724,"rel":725},"https://github.com/NetLogo/models",[581],"here",[547,728,731],{"id":729,"className":730},"do-you-offer-any-workshops-or-other-training-opportunities-for-netlogo",[19],[21,732,109],{"className":733,"href":108},[24],[27,735,736,737,742,743,662],{},"We offer workshops from time to time. If a workshop has been scheduled, we will\nannounce it on the ",[21,738,741],{"href":739,"rel":740},"https://forum.netlogo.org/",[581],"NetLogo Forum"," and the\n",[21,744,747],{"href":745,"rel":746},"http://groups.google.com/d/forum/netlogo-users",[581],"NetLogo Users Group",[547,749,752],{"id":750,"className":751},"are-there-any-netlogo-textbooks",[19],[21,753,115],{"className":754,"href":114},[24],[27,756,757],{},"The CCL has published a textbook (written by the author of NetLogo) that gives\nan introduction to agent-based modeling methods using NetLogo. It goes step by\nstep with coding examples how to design, build, revise, and analyze models. And\nit presents some advanced techniques.",[27,759,760,761,766],{},"See ",[21,762,765],{"href":763,"rel":764},"http://www.intro-to-abm.com",[581],"www.intro-to-abm.com"," for more information on\nthat textbook.",[27,768,769,770,775],{},"See the Textbooks section of our\n",[21,771,774],{"href":772,"rel":773},"http://ccl.northwestern.edu/netlogo/resources.shtml",[581],"Resources"," page.",[27,777,778],{},"We at the CCL have hoped to write several more NetLogo textbooks. These could be\naimed at different audiences, such as: middle school, high school, undergraduate\ncourse in modeling or complexity, practical guide for interested adults.",[27,780,781],{},"Unfortunately, we have not yet been able to find the time to make these happen.\nIf anyone from the user community would like to collaborate on such a venture,\nplease let us know. We would welcome it.",[547,783,786],{"id":784,"className":785},"is-netlogo-available-in-other-languages-besides-english",[19],[21,787,121],{"className":788,"href":120},[24],[27,790,791],{},"So far, the NetLogo user interface has been localized in English, Spanish,\nChinese, Portuguese, Russian, and Japanese. All six languages are included in\nthe standard download.",[27,793,794,795,662],{},"There is a ",[21,796,798],{"href":797},"/es/behaviorspace","BehaviorSpace Guide en Español",[27,800,801,802,662],{},"We are seeking volunteers to complete and improve these localizations and to\ntranslate the NetLogo software and manual into as many other languages as\npossible. If you’re able to help in this endeavor, please\n",[21,803,804],{"href":32},"contact us",[547,806,809],{"id":807,"className":808},"is-netlogo-compiled-or-interpreted",[19],[21,810,127],{"className":811,"href":126},[24],[27,813,814],{},"Short answer: some of both.",[27,816,817],{},"Long answer: NetLogo does include a compiler that generates Java byte code.\nHowever, this compiler does not yet support the entire language, so some parts\nof user code remain interpreted. Note that our compiler generates Java byte\ncode, and Java virtual machines have “just-in-time” compilers that in turn\ncompile Java byte code all the way to native code, so much user code is\nultimately translated to native code.",[547,819,822],{"id":820,"className":821},"has-anyone-built-a-model-of-x",[19],[21,823,133],{"className":824,"href":132},[24],[27,826,827,828,833,834,839,840,845,846,662],{},"Try looking at the\n",[21,829,832],{"href":830,"rel":831},"http://ccl.northwestern.edu/netlogo/models/",[581],"NetLogo Models Library",", the\n",[21,835,838],{"href":836,"rel":837},"http://modelingcommons.org/",[581],"NetLogo Modeling Commons",", our\n",[21,841,844],{"href":842,"rel":843},"http://ccl.northwestern.edu/netlogo/models/community/",[581],"Community Models"," page,\nand our\n",[21,847,850],{"href":848,"rel":849},"http://ccl.northwestern.edu/netlogo/references.shtml",[581],"list of references to NetLogo in outside works",[27,852,853,854,857,858,861],{},"You might also ask the question on the NetLogo\nForum](",[21,855,739],{"href":739,"rel":856},[581],") and the\n",[21,859,747],{"href":745,"rel":860},[581]," and/or\nsearch past messages on the group.",[547,863,866],{"id":864,"className":865},"are-netlogo-models-runs-scientifically-reproducible",[19],[21,867,139],{"className":868,"href":138},[24],[27,870,871],{},"Yes. NetLogo’s pseudorandom number generator and agent scheduling algorithms are\ndeterministic, and NetLogo always uses Java’s “strict math” library, which gives\nbit-for-bit identical results regardless of platform. But keep the following\ncautions in mind:",[51,873,874,881,892,895],{},[54,875,876,877,880],{},"If your model uses random numbers, then in order to get reproducible behavior,\nyou must use the ",[376,878,879],{},"random-seed"," command to set the random seed in advance, so\nthat your model will receive the exact same sequence of random numbers every\ntime. Remember that agentsets are always in random order, so anything you do\nwith agentsets uses random numbers.",[54,882,883,884,887,888,891],{},"If your model uses the ",[376,885,886],{},"every"," or ",[376,889,890],{},"wait"," commands in such a way that affects\nthe outcome of the model, then you may get different results on different\ncomputers, or even on the same computer, since the model may run at a\ndifferent speed.",[54,893,894],{},"In order to reproduce model runs exactly, you must be using the exact same\nversion of NetLogo. The details of the agent scheduling mechanism and the\nrandom number generator may change between NetLogo versions, and other changes\n(bugfixes in the engine, language changes, and so forth) may also affect the\nbehavior of your model. (Then again, they may not.)",[54,896,897],{},"We have expended every effort to make NetLogo model runs fully reproducible,\nbut of course this can never truly be an iron-clad guarantee, due not only to\nthe possibility of random hardware failure, but also the possibility of human\nerror in the design of: your model, NetLogo, your Java VM, your hardware, and\nso on.",[547,899,902],{"id":900,"className":901},"will-netlogo-and-netlogo-3d-remain-separate",[19],[21,903,145],{"className":904,"href":144},[24],[27,906,907],{},"For now, yes. NetLogo 3D is included with NetLogo, but it is still a separate\napplication.",[27,909,910],{},"Ideally a single unified application would support both 2D and 3D modeling. We\nwould design the 3D world support so it doesn’t get in the way when you are\nbuilding 2D models. Models built in NetLogo 3D might require changes in order to\nrun in the hypothetical unified application.",[547,912,915],{"id":913,"className":914},"can-i-run-netlogo-on-my-phone-or-tablet",[19],[21,916,151],{"className":917,"href":150},[24],[27,919,920],{},"No. Neither iOS, nor Android, nor Windows RT supports running Java applications\nsuch as NetLogo.",[27,922,923],{},"We are working on an alternate implementation of NetLogo on a JavaScript and\nHTML5 base, instead of Java. It will work on a variety of tablets and phones. We\ndon’t know yet when it will be ready, and we expect that for a long time it will\nonly support a subset of the features in desktop NetLogo. The many person-years\nof development effort that have gone into the Java version can’t cheaply or\neasily be replicated on another platform.",[27,925,926,927,662],{},"For technical details on this new project, go\n",[21,928,726],{"href":929,"rel":930},"https://github.com/NetLogo/NetLogo/wiki/Tortoise",[581],[539,932,935],{"id":933,"className":934},"downloading",[19],[21,936,157],{"className":937,"href":156},[24],[547,939,942],{"id":940,"className":941},"can-i-have-multiple-versions-of-netlogo-installed-at-the-same-time",[19],[21,943,165],{"className":944,"href":164},[24],[27,946,947],{},"Yes. When you install NetLogo, the folder that is created contains has the\nversion number in its name, so multiple versions can coexist.",[27,949,950],{},"On Windows systems, whichever version you installed last will be the version\nthat opens when you double click a model file in Windows Explorer. On Macs, you\ncan control what version opens via “Get Info” in the Finder.",[547,952,955],{"id":953,"className":954},"im-on-a-unix-system-and-i-cant-untar-the-download-why",[19],[21,956,171],{"className":957,"href":170},[24],[27,959,960,961,972],{},"Some of the files in the tarball have long pathnames, too long for the standard\ntar format. You must use the GNU version of tar instead (or another program\nwhich understands the GNU tar extensions). On some systems, the GNU version of\ntar is available under the name “gnutar”. You can find out if you are already\nusing the GNU version by typing ",[376,962,963,385,968],{},[379,964,967],{"className":965},[382,966],"variable","tar",[379,969,971],{"className":970},[382,966],"--version"," and seeing if the output says\n“tar (GNU tar)”.",[547,974,977],{"id":975,"className":976},"how-do-i-install-netlogo-unattended",[19],[21,978,177],{"className":979,"href":176},[24],[27,981,982],{},"It depends on which platform you are using.",[51,984,985,992,998],{},[54,986,987,991],{},[988,989,990],"strong",{},"Linux:"," Untar NetLogo into the appropriate place.",[54,993,994,997],{},[988,995,996],{},"Mac:"," Copy the NetLogo directory from the disk image into the Applications\nfolder.",[54,999,1000,1003],{},[988,1001,1002],{},"Windows:"," The installer is an MSI which can be run using one of the\nfollowing commands (these may require admin privileges):",[1005,1006,1007],"pre",{},[376,1008,1009,1010,385,1014,385,1018,385,1022,385,1026,1030,1031,1035,385,1040,385,1044,385,1048,385,1052],{},"    ",[379,1011,1013],{"className":1012},[382,966],"msiexec.exe",[379,1015,1017],{"className":1016},[382,966],"/i",[379,1019,1021],{"className":1020},[382,966],"C:\\Path\\to\\NetLogo.msi",[379,1023,1025],{"className":1024},[382,966],"ALLUSERS=1",[379,1027,1029],{"className":1028},[382,966],"ADDLOCAL=Shortcuts","   ",[379,1032,1034],{"className":1033},[382,966],"::",[379,1036,1039],{"className":1037},[382,1038],"keyword"," To",[379,1041,1043],{"className":1042},[382,966],"install",[379,1045,1047],{"className":1046},[382,383],"with",[379,1049,1051],{"className":1050},[382,966],"desktop",[379,1053,1055],{"className":1054},[382,966],"shortcuts",[1005,1057,1058],{},[376,1059,1009,1060,385,1063,385,1066,385,1069,385,1072,385,1076,1079,385,1082,385,1085,385,1089,385,1092],{},[379,1061,1013],{"className":1062},[382,966],[379,1064,1017],{"className":1065},[382,966],[379,1067,1021],{"className":1068},[382,966],[379,1070,1025],{"className":1071},[382,966],[379,1073,1075],{"className":1074},[382,966],"ADDLOCAL=BaseInstall",[379,1077,1034],{"className":1078},[382,966],[379,1080,1039],{"className":1081},[382,1038],[379,1083,1043],{"className":1084},[382,966],[379,1086,1088],{"className":1087},[382,966],"without",[379,1090,1051],{"className":1091},[382,966],[379,1093,1055],{"className":1094},[382,966],[27,1096,1097,1098,1103,1104,662],{},"We also maintain an\n",[21,1099,1102],{"href":1100,"rel":1101},"https://github.com/NetLogo/NetLogo/wiki/Advanced-Installation",[581],"advanced installation wiki page","\nwhich may have additional tips and tricks. We encourage users who have problems\nwith unattended installation or ideas on how it could be improved to email\n",[21,1105,661],{"href":1106},"mailto:netlogo@northwestern.edu?subject=Unattended%20Installation",[539,1108,1111],{"id":1109,"className":1110},"running",[19],[21,1112,183],{"className":1113,"href":182},[24],[547,1115,1118],{"id":1116,"className":1117},"can-i-run-netlogo-from-a-cd-a-network-drive-or-a-usb-drive",[19],[21,1119,191],{"className":1120,"href":190},[24],[27,1122,1123],{},"Yes. NetLogo runs fine from any file system, including read-only file systems.",[547,1125,1128],{"id":1126,"className":1127},"why-is-netlogo-so-much-slower-when-i-unplug-my-windows-laptop",[19],[21,1129,197],{"className":1130,"href":196},[24],[27,1132,1133],{},"Your computer is switching to power saving mode when unplugged. It’s normal for\nthis to reduce speed a little, but unfortunately there is a bug in Java that\ndrastically slows down Swing applications, including NetLogo.",[27,1135,1136],{},"One workaround is to change the power settings on your computer so it doesn’t go\ninto power saving mode when you unplug it. (If you do this, your battery won’t\nlast as long.)",[27,1138,1139],{},"Another workaround is to run NetLogo with an option recommended by Oracle, by\nediting the NetLogo 7.0.4.vmoptions file, found in the NetLogo directory\n(under Program Files on your hard drive, unless you installed NetLogo in a\ndifferent location). Add on a new line:",[1005,1141,1142],{},[376,1143,1144],{},[379,1145,1147],{"className":1146},[382,966],"-Dsun.java2d.ddoffscreen=false",[27,1149,1150,1151,662],{},"You can see the details of the Java bug and vote for Oracle to fix it\n",[21,1152,726],{"href":1153,"rel":1154},"http://bugs.sun.com/bugdatabase/view_bug.do?bug_id",[581],[547,1156,1159],{"id":1157,"className":1158},"why-does-netlogo-bundle-java",[19],[21,1160,203],{"className":1161,"href":202},[24],[27,1163,1164],{},"Since Mac OS X Lion, Apple have encouraged Mac application developers to bundle\nJava. NetLogo bundles Java because it allows us to deliver a consistent,\nconvenient experience to our users. Bundling Java allows us to test for\ncompatibility once and avoid any bugs caused by version mismatches or Java\nconfiguration incompatibilities.",[27,1166,1167,1168,1171,1172,1175,1176,1179],{},"If users are interested in using Java on their system instead of the version of\nJava bundled with NetLogo, they can configure NetLogo to use a different Java\nruntime. Please note that ",[988,1169,1170],{},"this change is done at your own risk",". We are\nunable to offer support for problems caused by running NetLogo with an alternate\nJava Runtime. To change the Java runtime used by NetLogo, open the\n",[21,1173,1174],{"href":300},"NetLogo.cfg"," file and modify the\n",[376,1177,1178],{},"app.runtime"," property to the path of your preferred Java Runtime.",[547,1181,1184],{"id":1182,"className":1183},"how-come-netlogo-wont-start-up-on-my-linux-machine",[19],[21,1185,209],{"className":1186,"href":208},[24],[27,1188,1189,1190,1192],{},"We bundle Bellsoft’s OpenJDK-based Java runtime when using NetLogo on Linux. If\nyou would like to change the version of linux used, you can modify the .cfg\nfiles to point to a different version of Java (see\n",[21,1191,301],{"href":300},"\nfor more information).",[27,1194,1195],{},"In theory, any Java 11 or later runtime will run NetLogo. In practice, some Java\nimplementations aren’t high enough quality. Recent versions of OpenJDK should\nwork; older ones may not. GNU libgcj does not work.",[27,1197,1198,1199,662],{},"Ubuntu users should consult ",[21,1200,1201],{"href":1201,"rel":1202},"https://help.ubuntu.com/community/Java",[581],[547,1204,1207],{"id":1205,"className":1206},"when-i-try-to-install-netlogo-on-windows-i-see-windows-protected-your-pc",[19],[21,1208,215],{"className":1209,"href":214},[24],[27,1211,1212,1213,1218],{},"Windows attempts to protect users from downloading malicious software by\nmaintaining a list of “good” and “malicious” software. The first users to\ninstall any NetLogo release will see this warning. Later users may or may not\nsee this warning. Before going any further, ensure you are protected. The CCL\ncan only vouch for NetLogo downloads hosted on the CCL Website. NetLogo can be\nfreely downloaded from\n",[21,1214,1217],{"href":1215,"rel":1216},"http://ccl.northwestern.edu/netlogo/download.shtml",[581],"the official NetLogo download page",".\nIf you obtain NetLogo from anywhere else, you install it at your own risk!",[27,1220,1221],{},"You can continue past the Windows prompt by taking the following steps:",[51,1223,1224,1227],{},[54,1225,1226],{},"In the “Windows protected your PC” prompt, click “More Info”, the prompt will\nchange",[54,1228,1229],{},"In the changed prompt, click “Run Anyway” and continue with installation as\nnormal",[27,1231,1232],{},"Note in order to see the “More Info” or “Run Anyway” options, you will need to\nrun the installer as an administrator. If you do not see those options,\nright-click and choose “Run as administrator” and/or change your user account to\nan administrator account before installing.",[27,1234,1235],{},"We at the CCL are working on solving this problem and hope to free our users of\nthe added installation difficulty soon!",[547,1237,1240],{"id":1238,"className":1239},"when-i-try-to-start-netlogo-on-windows-i-get-an-error-the-jvm-could-not-be-started-help",[19],[21,1241,221],{"className":1242,"href":220},[24],[27,1244,1245,1246,1249],{},"A nearly certain fix is to use a text editor to edit the NetLogo.cfg file,\nchanging 1024m to a smaller number, like 512m. This should permit NetLogo to\nstart, although the lower heap size limit may affect your ability to run models\nwith many agents. See\n",[21,1247,1248],{"href":294},"How big can my model be?","\nfor information on model size and how to edit the cfg file.",[27,1251,1252],{},"If running with the lower heap size limit is unacceptable, read on.",[27,1254,1255],{},"Some Windows systems have trouble allocating large amounts of contiguous virtual\nmemory. Upgrading to a newer version of Windows may help.",[27,1257,1258,1259,662],{},"Running Windows in 64-bit mode instead of 32-bit mode may also help. Double\ncheck that Windows is actually running in 64-bit mode; see\n",[21,1260,1263],{"href":1261,"rel":1262},"https://windows.microsoft.com/en-US/windows-vista/32-bit-and-64-bit-Windows-frequently-asked-questions",[581],"Microsoft’s FAQ page on 64-bit Windows",[547,1265,1268],{"id":1266,"className":1267},"netlogo-wont-start-on-mac-os-sierra-or-later",[19],[21,1269,227],{"className":1270,"href":226},[24],[27,1272,1273,1274,662],{},"Some users have reported problems opening NetLogo 6 on Mac OS Sierra and later\n(We don’t yet know if this is an issue with NetLogo 7). We’ve been unable to\ndetermine a root cause for this problem, but we’re continuing to investigate.\nWe’re looking for assistance from you if you run into this problem. It would be\nextremely helpful if you could run the following command in the “Terminal”\napplication and send the output in an email to\n",[21,1275,661],{"href":1276},"mailto:netlogo@northwestern.edu?subject=Sierra%20NetLogo%206%20Bug",[1005,1278,1279],{},[376,1280,1281,385,1285,385,1289,385,1293,385,1297,385,1301],{},[379,1282,1284],{"className":1283},[382,966],"xattr",[379,1286,1288],{"className":1287},[382,966],"-pl",[379,1290,1292],{"className":1291},[382,966],"com.apple.quarantine",[379,1294,1296],{"className":1295},[382,966],"/Applications/NetLogo\\",[379,1298,1300],{"className":1299},[382,966],"7.0.4/NetLogo\\",[379,1302,1304],{"className":1303},[382,966],"7.0.4.app",[27,1306,1307,1308,1323],{},"running it should give you a single line of output (something like\n",[376,1309,1310,385,1314,1318],{},[379,1311,1313],{"className":1312},[382,966],"com.apple.quarantine:",[379,1315,1317],{"className":1316},[382,389],"01e1",[379,1319,1322],{"className":1320},[382,1321],"comment",";58ac6af2;Firefox;F2E0B1E2-D203-4B05-8DF9-ABA58B52EFEA",",\nbut yours will have different numbers, letters, and words). Please copy and\npaste this string into the email you send us.",[27,1325,1326],{},"There is also a partial workaround! Running the following command in the\nTerminal will enable users to run NetLogo without turning Gatekeeper completely\noff. The command is:",[1005,1328,1329],{},[376,1330,1331,385,1335,385,1338,385,1342,385,1345,385,1348,385,1351],{},[379,1332,1334],{"className":1333},[382,966],"sudo",[379,1336,1284],{"className":1337},[382,966],[379,1339,1341],{"className":1340},[382,966],"-dr",[379,1343,1292],{"className":1344},[382,966],[379,1346,1296],{"className":1347},[382,966],[379,1349,1300],{"className":1350},[382,966],[379,1352,1304],{"className":1353},[382,966],[27,1355,1356,1357,662],{},"Note that if you plan to run NetLogo 3D or HubNet Client you may also need to\nre-run that command once for each of those applications. If the workaround was\nnot effective for you, please\n",[21,1358,1360],{"href":1359},"mailto:netlogo@northwestern.edu?subject=Sierra%20NetLogo%206%20Bug%20Workaround","send us an email and let us know",[547,1362,1365],{"id":1363,"className":1364},"netlogo-wont-start-on-windows-or-crashes-suddenly-on-mac-os-sierra",[19],[21,1366,233],{"className":1367,"href":232},[24],[27,1369,1370,1371,662],{},"Some users on Mac OS with discrete graphics cards experience sudden crashes of\nNetLogo when switching between integrated and discrete graphics. It’s possible\nto prevent these crashes by\n",[21,1372,1375],{"href":1373,"rel":1374},"https://support.apple.com/en-us/HT202043",[581],"disabling automatic graphics switching in System Preferences",[27,1377,1378,1379,1382],{},"Some Windows users may also be unable to open NetLogo due to graphics card\nsettings or drivers. If you are unable to open NetLogo on Windows, you might be\nable to fix this by updating or reinstalling your graphics driver and/or\ndisabling any graphics card utilities. Because NetLogo might be unable to start\nfor a number of reasons, we encourage you to\n",[21,1380,804],{"href":1381},"mailto:netlogo@northwestern.edu?subject=NetLogo%206%20Launch%20Problem%20in%20Windows","\nif these steps aren’t effective in resolving the problem.",[547,1384,1387],{"id":1385,"className":1386},"how-can-i-speed-up-the-launching-of-netlogo-on-a-remote-server-that-is-behind-a-proxy",[19],[21,1388,239],{"className":1389,"href":238},[24],[27,1391,1392],{},"In a few cases involving a remote server that is behind a proxy, NetLogo users\nhave observed startup times of several minutes. So far all of these cases have\nbeen on Linux systems.",[27,1394,1395],{},"This happens when NetLogo makes a request over the network to update information\nabout extensions and their latest versions and there is a problem getting the\nresponse. We offer the following workaround.",[27,1397,1398],{},"Turn off the request to update the extensions information by setting the java\npreference netlogo.libraries.disabled=true by editing the NetLogo configuration\nfile. Add the following line to the section with java-options (order doesn’t\nmatter)",[1005,1400,1401],{},[376,1402,1403],{},[379,1404,1406],{"className":1405},[382,966],"java-options=-Dnetlogo.libraries.disabled=true",[27,1408,1409,1410,1412],{},"If you want to allow the updates again, you can set the value to false, or\nremove that preference. (see\n",[21,1411,301],{"href":300},"\nfor more information)",[547,1414,1417],{"id":1415,"className":1416},"can-i-run-netlogo-from-the-command-line-without-the-gui",[19],[21,1418,245],{"className":1419,"href":244},[24],[27,1421,1422,1423,662],{},"Yes. The easiest way is to set up your model run or runs as a BehaviorSpace\nexperiment. No additional programming is required. See\n",[21,1424,1426],{"href":1425},"behaviorspace#running-from-the-command-line","Running from the command line",[27,1428,1429,1430,1435],{},"Another option is to use our Controlling API. Some light Java programming is\nrequired. See the\n",[21,1431,1434],{"href":1432,"rel":1433},"https://github.com/NetLogo/NetLogo/wiki/Controlling-API",[581],"Controlling API Guide","\nfor details and sample code.",[547,1437,1440],{"id":1438,"className":1439},"does-netlogo-take-advantage-of-multiple-processors",[19],[21,1441,251],{"className":1442,"href":250},[24],[27,1444,1445,1446,662],{},"Only when using BehaviorSpace. BehaviorSpace does parallel runs, one per\nprocessor. See\n",[21,1447,1449],{"href":1448},"behaviorspace#run-options-parallel-runs","Run options: parallel runs",[27,1451,1452],{},"For a single model run, only one processor is used.",[27,1454,1455],{},"We are seeking funding to make it possible to split a single model run across\nmultiple processors or multiple computers.",[547,1457,1460],{"id":1458,"className":1459},"can-i-distribute-netlogo-model-runs-across-a-cluster-or-grid-of-computers",[19],[21,1461,257],{"className":1462,"href":256},[24],[27,1464,1465],{},"Many of the same comments in the previous answer apply. It is not possible to\nsplit a single model run across multiple computers, but you can have each\nmachine in a cluster doing one or more separate, independent model runs, using\neither BehaviorSpace or our Controlling API. We don’t have automated support for\nsplitting the runs across clusters, so you’ll need to arrange that yourself.",[27,1467,1468,1469,742,1472,662],{},"Various users are already using NetLogo on clusters, with a variety of hardware\nand software. You can seek them out on the\n",[21,1470,741],{"href":739,"rel":1471},[581],[21,1473,747],{"href":745,"rel":1474},[581],[547,1476,1479],{"id":1477,"className":1478},"is-there-any-way-to-recover-lost-work-if-netlogo-crashes-or-freezes",[19],[21,1480,263],{"className":1481,"href":262},[24],[27,1483,1484],{},"Yes. NetLogo auto-saves files as you are working on them. The path to the\nauto-save file depends on whether or not the NetLogo model has been saved.",[27,1486,1487,1488,1491],{},"For NetLogo models which have been saved, a hidden file with the name\n“.",[573,1489,1490],{},"filename",".tmp.nlogo” will be created in the same directory as the NetLogo\nmodel.",[27,1493,1494,1495,1498],{},"For unsaved NetLogo models, autosave files can be found in your OS-specific java\ntemporary directory. The files are named according to the following format:\n",[376,1496,1497],{},"autosave_yyyy-MM-dd.HH_mm_ss.nlogo"," where the time and date are the time and\ndate the model was opened. The exact path will depend on your operating system:",[51,1500,1501,1508,1519],{},[54,1502,1503,1504,1507],{},"On Mac OS, the temporary directory is\n",[376,1505,1506],{},"/var/folders/68/\u003C30-character-alphanumeric-sequence>/T/",". The\n30-character-alphanumeric-sequence is unique to each machine.",[54,1509,1510,1511,1514,1515,1518],{},"On Windows the logs can be found in ",[376,1512,1513],{},"C:\\Users\\\u003Cuser>\\AppData\\Local\\Temp",",\nwhere ",[376,1516,1517],{},"\u003Cuser>"," is the logged in user.",[54,1520,1521,1522,662],{},"On most non-Mac Unix-like systems the temp directory is ",[376,1523,1524],{},"/tmp",[547,1526,1529],{"id":1527,"className":1528},"why-is-hubnet-discovery-not-working",[19],[21,1530,269],{"className":1531,"href":268},[24],[27,1533,1534],{},"HubNet discovery provides the ability for HubNet clients running on the same\nlocal network as the HubNet server to automatically display the IP address and\ncurrent activity of the server. This uses IPv4 multicast over a local area\nnetwork - it won’t identify HubNet servers on the internet or on different\nnetworks. Some networks also do not support multicast traffic and it will simply\nnot work on those networks. For HubNet Discovery to work, the server must be\nbroadcasting to the same network that the client is polling for messages. Often,\nboth the client and server are only connected to a single network and there is\nno need for further configuration.",[27,1536,1537,1538,1541,1542,1545],{},"Since NetLogo 6.0.3, we have tools in place to allow clients and/or servers\nconnected to multiple networks to select the network on which they will\nbroadcast/listen. When running a HubNet server, this is done by selecting the\nappropriate “broadcast network” via selection dropdown when starting a HubNet\nserver. This preference will be remembered until NetLogo is restarted, so if you\nend up needing to broadcast on a different network, restart NetLogo. HubNet\nclients also see a similar dropdown when selecting which activity to join.\nUnlike HubNet server, clients may change the network on which they listen at any\ntime. HubNet discovery will only work when both client and server are\nlistening/broadcasting on the ",[573,1539,1540],{},"same"," network, so some trial and error may be\nrequired to figure out a working configuration. Generally speaking, the shared\nnetwork is the one on which the client and the server have the most similar IP\naddress prefixes. For instance, if the server selects to broadcast on a network\nwhere it has IP address 192.168.0.101, a client should prefer listening on a\nnetwork where it has an IP like 192.167.0.203 over a network where it has an IP\nlike 10.5.0.101. Even when the same network is selected, it is possible that\nthat network may not support IPv4 multicast, in which case discovery will ",[573,1543,1544],{},"not","\nwork and clients must enter IP addresses manually.",[27,1547,1548,1549,1552],{},"Note that the change made in 6.0.3 simply enable selection of the network on\nwhich clients and servers broadcast/listen on. The HubNet server still listens\non ",[573,1550,1551],{},"all"," network connections, so all listed IP addresses given in the server\nbroadcast network selection dropdown are potentially valid for a HubNet client\n(even a client on a different network) to connect to. Similarly HubNet clients\nmay connect to any HubNet server reachable from their computer.",[539,1554,1557],{"id":1555,"className":1556},"usage",[19],[21,1558,275],{"className":1559,"href":274},[24],[547,1561,1564],{"id":1562,"className":1563},"when-i-move-the-speed-slider-all-the-way-to-the-right-why-does-my-model-seem-to-stop",[19],[21,1565,283],{"className":1566,"href":282},[24],[27,1568,1569],{},"The only way NetLogo can make your model run faster is by updating the view less\nfrequently. As you move the speed slider to the right, view updates become less\nand less frequent. Since view updates take time, that means more speed.",[27,1571,1572],{},"However, fewer updates also means that the updates come farther apart. When\nseveral seconds pass between updates, it may seem like your model has stopped.\nIt hasn’t. It’s running at full speed. Watch the tick counter! (If your model\nuses it. If it doesn’t, watch something else, like a plot.)",[27,1574,1575],{},"To get a feel for what’s going on, try moving the slider to the right gradually\nrather than suddenly. If you find the updates too infrequent at the rightmost\nposition, just don’t push the slider that far.",[547,1577,1580],{"id":1578,"className":1579},"can-i-use-the-mouse-to-paint-in-the-view",[19],[21,1581,289],{"className":1582,"href":288},[24],[27,1584,1585],{},"NetLogo does not have a built-in set of painting tools for painting in the view.\nBut with only a few lines of code, you can add painting capability to your\nmodel. To see how it’s done, look at Mouse Example, in the Code Examples section\nof the Models Library. The same techniques can be used to let the user interact\nwith your model using the mouse in other ways, too.",[27,1587,1588,1589,1592],{},"Another possibility is to create an image in another program and import it using\nthe import items on the File menu or the ",[376,1590,1591],{},"import-*"," primitives.",[547,1594,1597],{"id":1595,"className":1596},"how-big-can-my-model-be-how-many-turtles-patches-procedures-buttons-and-so-on-can-my-model-contain",[19],[21,1598,295],{"className":1599,"href":294},[24],[27,1601,1602],{},"We have tested NetLogo with models that use hundreds of megabytes of RAM and\nthey work fine. We have reports from NetLogo users that they have run models\nthat required up to 50 gigabytes of RAM to use millions of patches and tens of\nthousands of agents, and they worked as desired with the proper Java settings.\nTheoretically the only limit is the RAM available on your system, but you might\nhit some limits that are inherent in the underlying Java runtime or the\noperating system (either designed-in limits, or bugs).",[27,1604,1605,1606,1609],{},"The NetLogo engine has no fixed limits on model size. By default NetLogo sets\nJava to use up to half of your available system memory. If your model exceeds\nthat memory limit, you’ll get an ",[376,1607,1608],{},"OutOfMemoryError"," dialog.",[27,1611,1612],{},"If you are using BehaviorSpace, note that doing runs in parallel will multiply\nyour RAM usage accordingly. Similarly, using LevelSpace with many child models\nincreases RAM usage greatly.",[27,1614,1615,1616,662],{},"If you want to increase the memory limit Java uses, you can do so using the\n",[21,1617,1618],{"href":300},"NetLogo app configuration files",[27,1620,1621],{},"Locate the section of the file that looks like the following:",[1005,1623,1624],{},[376,1625,1626,1627,1631,1632,1635,385,1639,385,1643,385,1647,385,1651,385,1655,385,1659,385,1663,385,1667,385,1671,385,1675,1679,1681,1685,1687,385,1690,385,1693,385,1696,385,1699,385,1702,385,1705,385,1708,385,1711,385,1714,385,1717],{},"[",[379,1628,1630],{"className":1629},[382,966],"JavaOptions","]",[1633,1634],"br",{},[379,1636,1638],{"className":1637},[382,966],"#",[379,1640,1642],{"className":1641},[382,966],"there",[379,1644,1646],{"className":1645},[382,966],"may",[379,1648,1650],{"className":1649},[382,966],"be",[379,1652,1654],{"className":1653},[382,966],"one",[379,1656,1658],{"className":1657},[382,383],"or",[379,1660,1662],{"className":1661},[382,966],"more",[379,1664,1666],{"className":1665},[382,966],"lines,",[379,1668,1670],{"className":1669},[382,966],"leave",[379,1672,1674],{"className":1673},[382,966],"them",[379,1676,1678],{"className":1677},[382,966],"unchanged",[1633,1680],{},[379,1682,1684],{"className":1683},[382,966],"java-options=-XX:MaxRAMPercentage=50",[1633,1686],{},[379,1688,1638],{"className":1689},[382,966],[379,1691,1642],{"className":1692},[382,966],[379,1694,1646],{"className":1695},[382,966],[379,1697,1650],{"className":1698},[382,966],[379,1700,1654],{"className":1701},[382,966],[379,1703,1658],{"className":1704},[382,383],[379,1706,1662],{"className":1707},[382,966],[379,1709,1666],{"className":1710},[382,966],[379,1712,1670],{"className":1713},[382,966],[379,1715,1674],{"className":1716},[382,966],[379,1718,1678],{"className":1719},[382,966],[27,1721,1722,1723,1725,1726,1728,1729,1732,1733,1736,1737,1740],{},"You can change the percentage number from 50 to whatever you want. Save the file\nand restart NetLogo for the setting to take effect. If you need to set an exact\namount of memory (as opposed to a percentage), you can also comment out the\n",[376,1724,1684],{}," line with a ",[376,1727,1638],{}," at the start and add a\nnew line with ",[376,1730,1731],{},"java-options=-Xmx####m",". Replace the ",[376,1734,1735],{},"####m"," with whatever amount\nof memory you like; using ",[376,1738,1739],{},"4096m"," would limit NetLogo to 4096 megabytes of\nmemory, or 4 gigabytes.",[547,1742,1745],{"id":1743,"className":1744},"where-are-the-netlogo-configuration-files",[19],[21,1746,301],{"className":1747,"href":300},[24],[27,1749,1750],{},"Each platform contains configuration files (with the extension “.cfg”)\ncontaining JVM settings. There is one configuration file for each\nsub-application (NetLogo, NetLogo 3D, HubNet Client, etc.). Windows also has a\nconfiguration file for the NetLogo_Console app; on macOS and Linux the\nconfiguration file for NetLogo_Console is just the NetLogo.cfg file. Although\nthe file location varies by platform, the process for changing it is the same.",[27,1752,1753],{},"Platform specific notes follow:",[51,1755,1756,1798],{},[54,1757,1758,1760,1761,1775,1776,662],{},[988,1759,1002],{}," The file will typically be in\n",[376,1762,1763,385,1767,385,1771],{},[379,1764,1766],{"className":1765},[382,966],"C:\\Program",[379,1768,1770],{"className":1769},[382,966],"Files\\NetLogo",[379,1772,1774],{"className":1773},[382,966],"7.0.4\\app",", unless you are running 32 bit\nNetLogo on a 64 bit Windows, then it will be in\n",[376,1777,1778,385,1781,1785,1786,1790,1791,385,1795],{},[379,1779,1766],{"className":1780},[382,966],[379,1782,1784],{"className":1783},[382,966],"Files"," (",[379,1787,1789],{"className":1788},[382,966],"x86",")",[379,1792,1794],{"className":1793},[382,966],"\\NetLogo",[379,1796,1774],{"className":1797},[382,966],[54,1799,1800,1803,1804,1822],{},[988,1801,1802],{},"Mac OS X:"," The file for NetLogo will be located at:\n",[376,1805,1806,385,1810,385,1814,385,1818],{},[379,1807,1809],{"className":1808},[382,966],"/Applications/NetLogo",[379,1811,1813],{"className":1812},[382,966],"7.0.4/NetLogo",[379,1815,1817],{"className":1816},[382,966],"7.0.4.app/Contents/app/NetLogo",[379,1819,1821],{"className":1820},[382,966],"7.0.4.cfg","\nFor NetLogo 3D and the other applications, you will find the file in the\ncorresponding location for each application package. You can reach the\nconfiguration file by control-clicking the application in the Finder and\nchoosing “Show Package Contents” from the popup menu.",[27,1824,1825,1826,1828,1829,1834],{},"Please note that depending on your version of Mac OS X, changing the\nconfiguration file ",[573,1827,1646],{}," break application signing. If this happens, follow\nApple’s directions on ",[21,1830,1833],{"href":1831,"rel":1832},"https://support.apple.com/en-us/HT202491",[581],"this page"," to\ntemporarily allow apps from “Anywhere”, run NetLogo once, then restore the\nsetting to “Mac App Store and Identified Developers”.",[51,1836,1837],{},[54,1838,1839,1841,1842,1845],{},[988,1840,990],{}," The configuration files will be located in the ",[376,1843,1844],{},"lib/app"," directory\nof your NetLogo installation.",[27,1847,1848],{},"By default, Mac builds of NetLogo bundle a 64-bit JVM. Windows and Linux will\nbundle a 32-bit or 64-bit JVM, depending on which version you have downloaded.\nIt is recommended that you install 64-bit NetLogo on all 64-bit operating\nsystems for best performance.",[547,1850,1853],{"id":1851,"className":1852},"can-i-use-gis-data-in-netlogo",[19],[21,1854,307],{"className":1855,"href":306},[24],[27,1857,1858,1859,662],{},"Yes, many users are using GIS data with NetLogo. The most complete way to do\nthat is with the GIS extension. See the ",[21,1860,1862],{"href":1861},"gis","GIS Extension Guide",[27,1864,1865,1866,1869],{},"A simpler way is to use ",[376,1867,1868],{},"import-pcolors",", but that only works for importing maps\nthat are images, not maps in other formats.",[27,1871,1872,1873,1876],{},"It is also possible to write NetLogo code that reads GIS data using our file I/O\nprimitives such as ",[376,1874,1875],{},"file-open",". For example, see the Grand Canyon model in the\nEarth Science section of Sample Models.",[547,1878,1881],{"id":1879,"className":1880},"my-model-runs-slowly-how-can-i-speed-it-up",[19],[21,1882,313],{"className":1883,"href":312},[24],[27,1885,1886],{},"Here’s some ways to make it run faster without changing the structure of the\ncode:",[51,1888,1889,1892,1895,1898],{},[54,1890,1891],{},"Use tick-based view updates, not continuous updates.",[54,1893,1894],{},"Decrease the frequency of view updates by pushing the speed slider to the\nright, or turn updates off using the checkbox.",[54,1896,1897],{},"If your model is using all available RAM on your computer, then installing\nmore RAM should help. If your hard drive makes a lot of noise while your model\nis running, you probably need more RAM.",[54,1899,1900],{},"Use turtle size 1, 1.5, or 2, as the 2D renderings for these sizes are cached\nby NetLogo. (This only affects graphics speed in the 2D view, not computation\nspeed.)",[27,1902,1903,1904,1907,1908,1911],{},"In many cases, though, if you want your model to run faster, you may need to\nmake some changes to the code. Usually the most obvious opportunity for speedup\nis that you’re doing too many computations that involve all the turtles or all\nthe patches. Often this can be reduced by reworking the model so that it does\nless computation per time step. The members of the\n",[21,1905,747],{"href":745,"rel":1906},[581],"and\nparticipants in the ",[21,1909,741],{"href":739,"rel":1910},[581]," may be able to\nhelp with this.",[27,1913,1914,1915,662],{},"You wil find useful advice in the article\n",[21,1916,1919],{"href":1917,"rel":1918},"https://www.jasss.org/20/1/3",[581],"Improving Execution Speed of Models Implemented in NetLogo",[27,1921,1922,1923,1927],{},"The ",[21,1924,1926],{"href":1925},"profiler","profiler extension"," is useful for identifying which parts of\nyour code are taking the most time.",[27,1929,1930,1931,1934,1935,1938],{},"Unless you are running the exact same strings over and over, using ",[376,1932,1933],{},"run"," and\n",[376,1936,1937],{},"runresult"," are much slower than running code directly; you should avoid using\nthese primitives on fresh strings in performance-critical code.",[547,1940,1943],{"id":1941,"className":1942},"can-i-have-more-than-one-model-open-at-a-time",[19],[21,1944,319],{"className":1945,"href":318},[24],[27,1947,1948],{},"One instance of NetLogo can only have one model open at a time. (Unfortunately,\nit is unlikely that this will change in a future version, due to the engineering\ndifficulties involved.)",[27,1950,1951],{},"You can have multiple models open by opening multiple instances of NetLogo,\nthough. On Windows and Linux, simply start the application again. On a Mac,\nyou’ll need to duplicate the application (not the whole folder, just the\napplication itself) in the Finder, then open the copy. (The copy takes up only a\nvery small amount of additional disk space.)",[547,1953,1956],{"id":1954,"className":1955},"can-i-change-the-choices-in-a-chooser-on-the-fly",[19],[21,1957,325],{"className":1958,"href":324},[24],[27,1960,1961],{},"No.",[547,1963,1966],{"id":1964,"className":1965},"can-i-divide-the-code-for-my-model-up-into-several-files",[19],[21,1967,331],{"className":1968,"href":330},[24],[27,1970,1971,1972,1975],{},"On an experimental basis, this is available using the ",[376,1973,1974],{},"__includes"," keyword.",[539,1977,1980],{"id":1978,"className":1979},"programming",[19],[21,1981,337],{"className":1982,"href":336},[24],[547,1984,1987],{"id":1985,"className":1986},"how-does-the-netlogo-language-differ-from-other-logos",[19],[21,1988,345],{"className":1989,"href":344},[24],[27,1991,1992,1993,662],{},"This is answered in detail at the end of the\n",[21,1994,1996],{"href":1995},"/programming","Programming Guide",[547,1998,2001],{"id":1999,"className":2000},"how-come-my-model-from-an-earlier-netlogo-doesnt-work-right",[19],[21,2002,351],{"className":2003,"href":350},[24],[27,2005,2006,2007,2011],{},"See the ",[21,2008,2010],{"href":2009},"transition","Transition Guide"," for help.",[547,2013,2016],{"id":2014,"className":2015},"how-do-i-take-the-negative-of-a-number",[19],[21,2017,357],{"className":2018,"href":356},[24],[27,2020,2021],{},"Any of these ways:",[1005,2023,2024],{},[376,2025,2026,2027,385,2031,1790,2035,2037,385,2041,385,2045,2048,2050,385,2054,385,2057],{},"(",[379,2028,2030],{"className":2029},[382,383],"-",[379,2032,2034],{"className":2033},[382,966],"x",[1633,2036],{},[379,2038,2040],{"className":2039},[382,389],"-1",[379,2042,2044],{"className":2043},[382,383],"*",[379,2046,2034],{"className":2047},[382,966],[1633,2049],{},[379,2051,2053],{"className":2052},[382,389],"0",[379,2055,2030],{"className":2056},[382,383],[379,2058,2034],{"className":2059},[382,966],[27,2061,2062],{},"With the first way, the parentheses are required.",[547,2064,2067],{"id":2065,"className":2066},"my-turtle-moved-forward-1-but-its-still-on-the-same-patch-why",[19],[21,2068,363],{"className":2069,"href":362},[24],[27,2071,2072,2073,662],{},"If you have disabled wrapping at the world edges in your model, then the turtle\nmight be at a world edge and unable to move any further. You can test for this\nusing ",[376,2074,2075],{},"can-move?",[27,2077,2078],{},"Assuming the turtle isn’t hitting a world edge, moving forward 1 is only\nguaranteed to take a turtle to a new patch if the turtle’s heading is a multiple\nof 90 (that is, exactly north, south, east, or west).",[27,2080,2081,2082,2092],{},"It’s because the turtle might not be standing in the center of a patch. It might\nbe near the corner of a patch. For example, suppose your turtle is close to the\nsouthwest corner of a patch and is facing northeast. The length of the patch\ndiagonal is 1.414… (the square root of two), so ",[376,2083,2084,385,2089],{},[379,2085,2088],{"className":2086},[382,2087],"command","fd",[379,2090,390],{"className":2091},[382,389]," will leave the turtle\nnear the northeast corner of the same patch.",[27,2094,2095],{},"If you don’t want to have to think about these issues, one possibility is to\nwrite your model in such a way that your turtles always come to rest on patch\ncenters. See next question.",[547,2097,2100],{"id":2098,"className":2099},"how-do-i-keep-my-turtles-on-patch-centers",[19],[21,2101,369],{"className":2102,"href":368},[24],[27,2104,2105,2106,2109,2110,2113],{},"A turtle is on a patch center when its ",[376,2107,2108],{},"xcor"," and ",[376,2111,2112],{},"ycor"," are integers.",[27,2115,2116],{},"You can move a turtle to the center of its current patch with either of these\ntwo equivalent commands:",[1005,2118,2119],{},[376,2120,2121,385,2125,2129,2131,385,2135,385,2139],{},[379,2122,2124],{"className":2123},[382,2087],"move-to",[379,2126,2128],{"className":2127},[382,383],"patch-here",[1633,2130],{},[379,2132,2134],{"className":2133},[382,2087],"setxy",[379,2136,2138],{"className":2137},[382,383],"pxcor",[379,2140,2142],{"className":2141},[382,383],"pycor",[27,2144,2145],{},"But you’ll never need to do that if you never allow turtles off of patch centers\nin the first place.",[27,2147,1922,2148,2151],{},[376,2149,2150],{},"sprout"," command creates turtles on patch centers. For example:",[1005,2153,2154],{},[376,2155,2156,385,2160,385,2164,385,2168,2172,2173,385,2176,2172,2179,385,2183,385,2187,2191],{},[379,2157,2159],{"className":2158},[382,2087],"ask",[379,2161,2163],{"className":2162},[382,383],"n-of",[379,2165,2167],{"className":2166},[382,389],"50",[379,2169,2171],{"className":2170},[382,383],"patches"," [ ",[379,2174,2150],{"className":2175},[382,2087],[379,2177,390],{"className":2178},[382,389],[379,2180,2182],{"className":2181},[382,2087],"face",[379,2184,2186],{"className":2185},[382,383],"one-of",[379,2188,2190],{"className":2189},[382,383],"neighbors4"," ] ]",[27,2193,2194],{},"Another way for a turtle to start on a patch center is with a command such as\nthis line of turtle code, which moves it to the center of a random patch:",[1005,2196,2197],{},[376,2198,2199,385,2202,385,2205],{},[379,2200,2124],{"className":2201},[382,2087],[379,2203,2186],{"className":2204},[382,383],[379,2206,2171],{"className":2207},[382,383],[27,2209,2210],{},"Once a turtle is on a patch center, as long as its heading always stays an exact\nmultiple of 90 (that is to say, due north, east, south, or west), and as it long\nas it moves forward or back by integer amounts, it will always land on patch\ncenters.",[27,2212,2213],{},"See Random Grid Walk Example, in the Code Examples section of the Models\nLibrary, to see these code snippets in use.",[547,2215,2218],{"id":2216,"className":2217},"patch-ahead-1-is-reporting-the-same-patch-my-turtle-is-already-standing-on-why",[19],[21,2219,2222,391],{"className":2220,"href":2221},[24],"#patch-ahead-1-is-reporting-the-same-patch-my-turtle-is-already-standing-on-why",[376,2223,2224,385,2227],{},[379,2225,384],{"className":2226},[382,383],[379,2228,390],{"className":2229},[382,389],[27,2231,2232],{},"See the answer two answers up. It’s the same issue.",[27,2234,2235,2236,2238],{},"This might not be the meaning of “ahead” you were expecting. With ",[376,2237,384],{},",\nyou must specify the distance ahead that you want to look. If you want to know\nthe next patch a turtle would cross into if it moved forward continuously, it is\npossible to find that out. See Next Patch Example, in the Code Examples section\nof the Models Library.",[547,2240,2243],{"id":2241,"className":2242},"how-do-i-give-my-turtles-vision",[19],[21,2244,397],{"className":2245,"href":396},[24],[27,2247,2248,2249,2252],{},"You can use ",[376,2250,2251],{},"in-radius"," to let a turtle see a circular area around it.",[27,2254,2255,2256,2258,2259,2109,2262,662],{},"Several primitives let the turtle “look” at specific points. The ",[376,2257,384],{},"\nprimitive is useful for letting a turtle see what is directly in front of it. If\nyou want the turtle to look in another direction besides straight ahead, try\n",[376,2260,2261],{},"patch-left-and-ahead",[376,2263,2264],{},"patch-right-and-ahead",[27,2266,2267,2268,2271],{},"If you want the turtle to have a full “cone” of vision, use the ",[376,2269,2270],{},"in-cone","\nprimitive.",[27,2273,2274],{},"You can also find out the next patch a turtle would cross into if it moved\nforward continuously. See Next Patch Example, in the Code Examples section of\nthe Models Library.",[547,2276,2279],{"id":2277,"className":2278},"can-agents-sense-whats-in-the-drawing-layer",[19],[21,2280,403],{"className":2281,"href":402},[24],[27,2283,2284],{},"No. If you want to make marks that agents can sense, use patch colors.",[547,2286,2289],{"id":2287,"className":2288},"im-getting-numbers-like-010000000004-and-0799999999999-instead-of-01-and-08-why",[19],[21,2290,409],{"className":2291,"href":408},[24],[27,2293,2006,2294,2298],{},[21,2295,2297],{"href":2296},"/programming#math","“Math” section of the Programming Guide"," for a\ndiscussion of this issue.",[547,2300,2303],{"id":2301,"className":2302},"the-documentation-says-that-random-float-1-might-return-0-but-will-never-return-1-what-if-i-want-1-to-be-included",[19],[21,2304,415,2307,425],{"className":2305,"href":2306},[24],"#the-documentation-says-that-random-float-1-might-return-0-but-will-never-return-1-what-if-i-want-1-to-be-included",[376,2308,2309,385,2312],{},[379,2310,421],{"className":2311},[382,383],[379,2313,390],{"className":2314},[382,389],[27,2316,2317],{},"It really doesn’t matter. Even if 1 were a possible result, it would only come\nup approximately 1 in 2^64 tries, which means you’d be waiting hundreds of years\nbefore it ever came up exactly 1.",[27,2319,2320,2321,2324],{},"Nonetheless, if you are convinced that it really must be possible to get 1, you\ncan use ",[376,2322,2323],{},"precision"," to round your answer to a certain number of decimal places.\nFor example:",[1005,2326,2327],{},[376,2328,2329,385,2333,1785,2336,385,2339,2342,2343,2347,2349],{},[379,2330,2332],{"className":2331},[382,2087],"print",[379,2334,2323],{"className":2335},[382,383],[379,2337,421],{"className":2338},[382,383],[379,2340,390],{"className":2341},[382,389],") ",[379,2344,2346],{"className":2345},[382,389],"10",[1633,2348],{},[379,2350,2352],{"className":2351},[382,389],"0.2745173723",[27,2354,2355,2356,2373],{},"(If you use this method, note that 0 and 1 are only half as likely to come up as\nother answers. To see why this is so, consider the case where you only keep one\ndigit after the decimal point. Results between 0 and 0.5 get rounded to 0, but\nresults between 0.5 and 1.5 get rounded to 1; the latter range is twice as\nlarge. If you want 0, 0.1, 0.2, …, 0.9, and 1 to all be equally likely, an\nalternative is to write ",[376,2357,2358,385,2362,385,2366,385,2370],{},[379,2359,2361],{"className":2360},[382,383],"random",[379,2363,2365],{"className":2364},[382,389],"11",[379,2367,2369],{"className":2368},[382,383],"/",[379,2371,2346],{"className":2372},[382,389],"; this gives all 11 answers with equal\nprobability.)",[547,2375,2378],{"id":2376,"className":2377},"why-is-the-number-value-in-my-monitor-widget-changing-even-though-nothing-is-happening-in-my-model",[19],[21,2379,431],{"className":2380,"href":430},[24],[27,2382,2383],{},"This is caused by a combination of a few things:",[2385,2386,2387,2396,2407],"ol",{},[54,2388,2389,2390,662],{},"NetLogo’s use of floating point numbers, which can produce small accuracy\nissues. See\n",[21,2391,2392,2395],{"href":2296},[988,2393,2394],{},"Floating point accuracy"," in the NetLogo programming guide",[54,2397,2398,2399,2402,2403,662],{},"Agentsets such as ",[376,2400,2401],{},"turtles"," are\n",[21,2404,2406],{"href":2405},"/programming#agentsets","always returned in a random order",[54,2408,2409],{},"Monitors re-run their reporter calculation constantly, even when you are not\nrunning any model code with a forever button or through the command center.",[27,2411,2412,2413,2431,2432,2434,2435,2437],{},"So the monitor constantly re-runs its ",[376,2414,2415,2419,2420,2423,2424,385,2428],{},[379,2416,2418],{"className":2417},[382,383],"mean"," [",[379,2421,2108],{"className":2422},[382,383],"] ",[379,2425,2427],{"className":2426},[382,383],"of",[379,2429,2401],{"className":2430},[382,383]," reporter, but the\n",[376,2433,2401],{}," agentset gives the turtles in a random order, and so the\nfloating-point inaccuracies for ",[376,2436,2418],{}," will accumulate in a slightly different\nway each time due to the order differences. The end result is you see very\nslightly different numbers flashing through the monitor widget while nothing is\nhappening.",[27,2439,2440,2441,2456,2457,2472,2473,2488],{},"You see the same problem doing ",[376,2442,2443,2419,2447,2423,2450,385,2453],{},[379,2444,2446],{"className":2445},[382,383],"sum",[379,2448,2108],{"className":2449},[382,383],[379,2451,2427],{"className":2452},[382,383],[379,2454,2401],{"className":2455},[382,383],",\n",[376,2458,2459,2419,2463,2423,2466,385,2469],{},[379,2460,2462],{"className":2461},[382,383],"variance",[379,2464,2108],{"className":2465},[382,383],[379,2467,2427],{"className":2468},[382,383],[379,2470,2401],{"className":2471},[382,383],", or ",[376,2474,2475,2419,2479,2423,2482,385,2485],{},[379,2476,2478],{"className":2477},[382,383],"standard-deviation",[379,2480,2108],{"className":2481},[382,383],[379,2483,2427],{"className":2484},[382,383],[379,2486,2401],{"className":2487},[382,383]," -\nanytime you’re reducing a bunch of floating point numbers from an agentset into\na single value. You can also see the problem running your reporter code directly\nin the command center repeatedly, without a monitor widget at all.",[27,2490,2491],{},"The fixes are straightforward:",[51,2493,2494,2551],{},[54,2495,2496,2497,2456,2515,2532,2533,2550],{},"Sort your numbers before you calculate: ",[376,2498,2499,385,2502,2419,2506,2423,2509,385,2512],{},[379,2500,2418],{"className":2501},[382,383],[379,2503,2505],{"className":2504},[382,383],"sort",[379,2507,2108],{"className":2508},[382,383],[379,2510,2427],{"className":2511},[382,383],[379,2513,2401],{"className":2514},[382,383],[376,2516,2517,385,2520,2419,2523,2423,2526,385,2529],{},[379,2518,2446],{"className":2519},[382,383],[379,2521,2505],{"className":2522},[382,383],[379,2524,2108],{"className":2525},[382,383],[379,2527,2427],{"className":2528},[382,383],[379,2530,2401],{"className":2531},[382,383],", ",[376,2534,2535,385,2538,2419,2541,2423,2544,385,2547],{},[379,2536,2462],{"className":2537},[382,383],[379,2539,2505],{"className":2540},[382,383],[379,2542,2108],{"className":2543},[382,383],[379,2545,2427],{"className":2546},[382,383],[379,2548,2401],{"className":2549},[382,383],". If the\nnumbers are in the same order you’ll still have small floating-point\ninaccuracies, but they’ll be the the same every time so you won’t see the\nvalues change. This is probably the best solution, but it can be slow if you\nhave a really large agentset.",[54,2552,2553,2554,2564],{},"Change the ",[376,2555,2556,385,2560],{},[379,2557,2559],{"className":2558},[382,966],"Decimal",[379,2561,2563],{"className":2562},[382,966],"places"," setting of your monitors to a number where you\ndon’t notice the changing values. Since the differences in results should be\nsmall, this is usually possible.",[547,2566,2569],{"id":2567,"className":2568},"how-can-i-keep-two-turtles-from-occupying-the-same-patch",[19],[21,2570,437],{"className":2571,"href":436},[24],[27,2573,2574],{},"See One Turtle Per Patch Example, in the Code Examples section of the Models\nLibrary.",[547,2576,2579],{"id":2577,"className":2578},"how-can-i-find-out-if-a-turtle-is-dead",[19],[21,2580,443],{"className":2581,"href":442},[24],[27,2583,2584,2585,2588,2589,2591],{},"When a turtle dies, it turns into ",[376,2586,2587],{},"nobody",". ",[376,2590,2587],{}," is a special value used in\nNetLogo used to indicate the absence of a turtle or patch. So for example:",[1005,2593,2594],{},[376,2595,2596,385,2600,385,2604,385,2607,385,2611,2172,2615,2619],{},[379,2597,2599],{"className":2598},[382,2087],"if",[379,2601,2603],{"className":2602},[382,383],"turtle",[379,2605,2053],{"className":2606},[382,389],[379,2608,2610],{"className":2609},[382,383],"!=",[379,2612,2587],{"className":2613},[382,2614],"constant",[379,2616,2618],{"className":2617},[382,966],"..."," ]",[27,2621,2622,2623,2626],{},"You could also use ",[376,2624,2625],{},"is-turtle?",":",[1005,2628,2629],{},[376,2630,2631,385,2634,385,2637,385,2640,2172,2643,2619],{},[379,2632,2599],{"className":2633},[382,2087],[379,2635,2625],{"className":2636},[382,383],[379,2638,2603],{"className":2639},[382,383],[379,2641,2053],{"className":2642},[382,389],[379,2644,2618],{"className":2645},[382,966],[547,2647,2650],{"id":2648,"className":2649},"does-netlogo-have-arrays",[19],[21,2651,449],{"className":2652,"href":448},[24],[27,2654,2655],{},"Nearly all models should just use lists for this.",[27,2657,2658,2659,2662,2663,2666],{},"The usual motivation for using arrays in other programming languages is that\nthey provide fast random access (",[376,2660,2661],{},"item",") and mutation (",[376,2664,2665],{},"replace-item","). But\nNetLogo’s lists, even though they are immutable, now provide near constant time\nperformance on these operations.",[27,2668,2669,2670,2675],{},"Lists in earlier versions of NetLogo (4.1 and 4.0) were simple singly-linked\nlists and therefore these operations took linear time. The data structure\nunderlying NetLogo’s lists now is the immutable Vector class from the Scala\ncollections library. It uses 32-wide\n",[21,2671,2674],{"href":2672,"rel":2673},"https://en.wikipedia.org/wiki/Hash_array_mapped_trie",[581],"hash array mapped tries",",\nas implemented by Tiark Rompf, based in part on work by Phil Bagwell and Rich\nHickey.",[27,2677,2678],{},"If you are certain you want to use raw, mutable JVM arrays in your model, they\nare provided by the array extension. See the Arrays & Tables section of the User\nManual.",[547,2680,2683],{"id":2681,"className":2682},"does-netlogo-have-hash-tables-or-associative-arrays",[19],[21,2684,455],{"className":2685,"href":454},[24],[27,2687,2688],{},"Yes, using the table extension. See the Arrays & Tables section of the User\nManual.",[547,2690,2693],{"id":2691,"className":2692},"how-can-i-use-different-patch-neighborhoods-circular-von-neumann-moore-etc",[19],[21,2694,461],{"className":2695,"href":460},[24],[27,2697,1922,2698,2700],{},[376,2699,2251],{}," primitives lets you access circular neighborhoods of any radius.",[27,2702,1922,2703,2706,2707,2709],{},[376,2704,2705],{},"neighbors"," primitive gives you a Moore neighborhood of radius 1, and the\n",[376,2708,2190],{}," primitive gives you a Von Neumann neighborhood of radius 1.",[27,2711,2712],{},"For Moore or Von Neumann neighborhoods of a larger radius, see Moore & Von\nNeumann Example in the Code Examples section of the Models Library.",[547,2714,2717],{"id":2715,"className":2716},"how-can-i-convert-an-agentset-to-a-list-of-agents-or-vice-versa",[19],[21,2718,467],{"className":2719,"href":466},[24],[27,2721,2722,2723,887,2725,2728],{},"If you want the list in a particular order, use the ",[376,2724,2505],{},[376,2726,2727],{},"sort-by","\nprimitives. The Lists section of the Programming Guide explains how to do this.\nSee also Ask Ordering Example, in the Code Examples section of the Models\nLibrary.",[27,2730,2731],{},"If you want the list in a random order, here’s how:",[1005,2733,2734],{},[376,2735,1626,2736,2423,2740,385,2743],{},[379,2737,2739],{"className":2738},[382,383],"self",[379,2741,2427],{"className":2742},[382,383],[379,2744,2746],{"className":2745},[382,966],"\u003Cagentset>",[27,2748,2749],{},"Because all operations on agentsets are in random order, the resulting list is\nin random order.",[27,2751,2752,2753,2532,2756,2759,2760,1592],{},"To convert a list of agents to an agentset, use the ",[376,2754,2755],{},"turtle-set",[376,2757,2758],{},"patch-set",",\nor ",[376,2761,2762],{},"link-set",[547,2764,2767],{"id":2765,"className":2766},"how-do-i-stop-foreach",[19],[21,2768,473],{"className":2769,"href":472},[24],[27,2771,2772],{},"To stop a foreach from executing you need to define a separate procedure that\ncontains only the foreach, for example:",[1005,2774,2775],{},[376,2776,2777,385,2781,2785,2787,2788,2419,2792,385,2795,385,2799,2803,2804,385,2808,2812,1009,2814,385,2817,385,2820,385,2824,2172,2827,2619,2831,1009,2833,385,2836,2839,2841,2842],{},[379,2778,2780],{"className":2779},[382,1038],"to",[379,2782,2784],{"className":2783},[382,966],"test",[1633,2786],{},"  ",[379,2789,2791],{"className":2790},[382,2087],"foreach",[379,2793,390],{"className":2794},[382,389],[379,2796,2798],{"className":2797},[382,389],"2",[379,2800,2802],{"className":2801},[382,389],"3","] [ ",[379,2805,2807],{"className":2806},[382,966],"i",[379,2809,2811],{"className":2810},[382,383],"->",[1633,2813],{},[379,2815,2599],{"className":2816},[382,2087],[379,2818,2807],{"className":2819},[382,966],[379,2821,2823],{"className":2822},[382,383],"=",[379,2825,2798],{"className":2826},[382,389],[379,2828,2830],{"className":2829},[382,2087],"stop",[1633,2832],{},[379,2834,2332],{"className":2835},[382,2087],[379,2837,2807],{"className":2838},[382,966],[1633,2840],{},"  ]",[379,2843,2845,2847],{"className":2844},[382,1038],[1633,2846],{},"end",[27,2849,2850,2851,2853,2854,2857,2858,34],{},"This code will only print the number 1. The ",[376,2852,2830],{}," returns from the current\nprocedure so nothing after the foreach will be executed either. (If the\nprocedure is a reporter procedure, use ",[376,2855,2856],{},"report"," instead of ",[376,2859,2830],{},[547,2861,2864],{"id":2862,"className":2863},"im-trying-to-make-a-list-why-do-i-keep-getting-the-error-expected-a-literal-value",[19],[21,2865,479],{"className":2866,"href":478},[24],[27,2868,2869,2870,662],{},"If a list contains only literal values, you can write it down just by putting\nsquare brackets around it, like ",[376,2871,1626,2872,385,2875,385,2878,1631],{},[379,2873,390],{"className":2874},[382,389],[379,2876,2798],{"className":2877},[382,389],[379,2879,2802],{"className":2880},[382,389],[27,2882,2883,2884,2888],{},"If you want your list to contain items that may vary at runtime, the list cannot\nbe written down directly. Instead, you build it using the\n",[21,2885,2887],{"href":2886},"dictionary#list","list"," primitive.",[539,2890,2893],{"id":2891,"className":2892},"behaviorspace",[19],[21,2894,485],{"className":2895,"href":484},[24],[27,2897,2898,2899,1934,2902],{},"You can find details about using BehaviorSpace at\n",[21,2900,2901],{"href":2891},"BehaviorSpace Guide",[21,2903,798],{"href":797},[547,2905,2908],{"id":2906,"className":2907},"why-are-the-rows-in-my-behaviorspace-table-results-out-of-order",[19],[21,2909,493],{"className":2910,"href":492},[24],[27,2912,2913,2914,2918],{},"This is normal when doing multiple runs in parallel. For a discussion of the\nissue, see the section on parallel runs in the\n",[21,2915,2917],{"href":2916},"behaviorspace#table-output","Table Output"," section of the BehaviorSpace\nGuide.",[547,2920,2923],{"id":2921,"className":2922},"how-do-i-measure-runs-every-n-ticks",[19],[21,2924,499],{"className":2925,"href":498},[24],[27,2927,2928,2929,2932,2933,2937],{},"Use ",[376,2930,2931],{},"mod"," in your experiment’s\n",[21,2934,2936],{"href":2935},"behaviorspace#run-metrics-when","Run Metrics when"," text box, e.g.:",[1005,2939,2940],{},[376,2941,2942,385,2946,385,2949,385,2952,385,2955],{},[379,2943,2945],{"className":2944},[382,383],"ticks",[379,2947,2931],{"className":2948},[382,383],[379,2950,2346],{"className":2951},[382,389],[379,2953,2823],{"className":2954},[382,383],[379,2956,2053],{"className":2957},[382,389],[27,2959,2960],{},"to measure the run after every 10 ticks.",[547,2962,2965],{"id":2963,"className":2964},"im-varying-a-global-variable-i-declared-in-the-code-tab-but-it-doesnt-work-why",[19],[21,2966,505],{"className":2967,"href":504},[24],[27,2969,2970,2971,2974],{},"It’s probably because your setup commands or setup procedure are using\n",[376,2972,2973],{},"clear-all",", causing the values set by BehaviorSpace to be cleared.",[27,2976,2977],{},"One possible workaround is to change your experiment’s setup commands to\npreserve the value of the variable, e.g.:",[1005,2979,2980],{},[376,2981,2982,385,2986,385,2990,2994,2996,3000,3002,385,3006,385,3009],{},[379,2983,2985],{"className":2984},[382,2087],"let",[379,2987,2989],{"className":2988},[382,966],"old-var1",[379,2991,2993],{"className":2992},[382,966],"var1",[1633,2995],{},[379,2997,2999],{"className":2998},[382,966],"setup",[1633,3001],{},[379,3003,3005],{"className":3004},[382,2087],"set",[379,3007,2993],{"className":3008},[382,966],[379,3010,2989],{"className":3011},[382,966],[27,3013,3014,3015,3017,3018],{},"This works because even ",[376,3016,2973],{}," doesn’t clear the values of local variables\nmade with ",[376,3019,2985],{},[27,3021,3022],{},"Another possible workaround is to change your model’s setup procedure to use\nmore specific clearing commands to clear only what you want cleared.",[539,3024,3027],{"id":3025,"className":3026},"netlogo-3d",[19],[21,3028,511],{"className":3029,"href":510},[24],[547,3031,3034],{"id":3032,"className":3033},"does-netlogo-work-with-my-stereoscopic-device",[19],[21,3035,519],{"className":3036,"href":518},[24],[27,3038,3039],{},"NetLogo supports fullscreen exclusive mode. If that is all your device needs\nthen, possibly yes. However, it can be tricky to get it working. We don’t have\nany such devices so it is difficult for us to make the process easier. If your\ndevice needs something else, for example, quadbuffers enabled, the answer is\nprobably no.",[539,3041,3044],{"id":3042,"className":3043},"extensions",[19],[21,3045,525],{"className":3046,"href":524},[24],[547,3048,3051],{"id":3049,"className":3050},"im-writing-an-extension-why-does-the-compiler-say-it-cant-find-orgnlogoapi",[19],[21,3052,533,3054,537],{"className":3053,"href":532},[24],[376,3055,536],{},[27,3057,3058,3059,3062],{},"You need to add NetLogo.jar to your classpath when compiling. ",[376,3060,3061],{},"NetLogo.jar"," is\nincluded with NetLogo.",{"title":3064,"searchDepth":3065,"depth":3066,"links":3067},"",5,3,[3068,3070,3088,3093,3109,3120,3143,3148,3151],{"id":43,"depth":3069,"text":49},4,{"id":541,"depth":3071,"text":59,"children":3072},2,[3073,3074,3075,3076,3077,3078,3079,3080,3081,3082,3083,3084,3085,3086,3087],{"id":549,"depth":3066,"text":67},{"id":562,"depth":3066,"text":73},{"id":596,"depth":3066,"text":79},{"id":606,"depth":3066,"text":85},{"id":616,"depth":3066,"text":91},{"id":626,"depth":3066,"text":97},{"id":639,"depth":3066,"text":103},{"id":729,"depth":3066,"text":109},{"id":750,"depth":3066,"text":115},{"id":784,"depth":3066,"text":121},{"id":807,"depth":3066,"text":127},{"id":820,"depth":3066,"text":133},{"id":864,"depth":3066,"text":139},{"id":900,"depth":3066,"text":145},{"id":913,"depth":3066,"text":151},{"id":933,"depth":3071,"text":157,"children":3089},[3090,3091,3092],{"id":940,"depth":3066,"text":165},{"id":953,"depth":3066,"text":171},{"id":975,"depth":3066,"text":177},{"id":1109,"depth":3071,"text":183,"children":3094},[3095,3096,3097,3098,3099,3100,3101,3102,3103,3104,3105,3106,3107,3108],{"id":1116,"depth":3066,"text":191},{"id":1126,"depth":3066,"text":197},{"id":1157,"depth":3066,"text":203},{"id":1182,"depth":3066,"text":209},{"id":1205,"depth":3066,"text":215},{"id":1238,"depth":3066,"text":221},{"id":1266,"depth":3066,"text":227},{"id":1363,"depth":3066,"text":233},{"id":1385,"depth":3066,"text":239},{"id":1415,"depth":3066,"text":245},{"id":1438,"depth":3066,"text":251},{"id":1458,"depth":3066,"text":257},{"id":1477,"depth":3066,"text":263},{"id":1527,"depth":3066,"text":269},{"id":1555,"depth":3071,"text":275,"children":3110},[3111,3112,3113,3114,3115,3116,3117,3118,3119],{"id":1562,"depth":3066,"text":283},{"id":1578,"depth":3066,"text":289},{"id":1595,"depth":3066,"text":295},{"id":1743,"depth":3066,"text":301},{"id":1851,"depth":3066,"text":307},{"id":1879,"depth":3066,"text":313},{"id":1941,"depth":3066,"text":319},{"id":1954,"depth":3066,"text":325},{"id":1964,"depth":3066,"text":331},{"id":1978,"depth":3071,"text":337,"children":3121},[3122,3123,3124,3125,3126,3127,3129,3130,3131,3132,3134,3135,3136,3137,3138,3139,3140,3141,3142],{"id":1985,"depth":3066,"text":345},{"id":1999,"depth":3066,"text":351},{"id":2014,"depth":3066,"text":357},{"id":2065,"depth":3066,"text":363},{"id":2098,"depth":3066,"text":369},{"id":2216,"depth":3066,"text":3128},"patch-ahead 1 is reporting the same patch my turtle is already standing on. Why?",{"id":2241,"depth":3066,"text":397},{"id":2277,"depth":3066,"text":403},{"id":2287,"depth":3066,"text":409},{"id":2301,"depth":3066,"text":3133},"The documentation says that random-float 1 might return 0 but will never return 1. What if I want 1 to be included?",{"id":2376,"depth":3066,"text":431},{"id":2567,"depth":3066,"text":437},{"id":2577,"depth":3066,"text":443},{"id":2648,"depth":3066,"text":449},{"id":2681,"depth":3066,"text":455},{"id":2691,"depth":3066,"text":461},{"id":2715,"depth":3066,"text":467},{"id":2765,"depth":3066,"text":473},{"id":2862,"depth":3066,"text":479},{"id":2891,"depth":3071,"text":485,"children":3144},[3145,3146,3147],{"id":2906,"depth":3066,"text":493},{"id":2921,"depth":3066,"text":499},{"id":2963,"depth":3066,"text":505},{"id":3025,"depth":3071,"text":511,"children":3149},[3150],{"id":3032,"depth":3066,"text":519},{"id":3042,"depth":3071,"text":525,"children":3152},[3153],{"id":3049,"depth":3066,"text":3154},"I’m writing an extension. Why does the compiler say it can’t find org.nlogo.api?","Answers to frequently asked questions about NetLogo, covering common issues, usage patterns, and troubleshooting tips.","md",{"source":3158,"metadataOutputPath":3159,"projectConfig":3160,"language":3167,"inheritFrom":3176,"output":3175,"version":3161,"keywords":3177,"tags":3181,"icon":3182,"assetsRoot":3183},"autogen/faq.md","content/faq.metadata.yaml",{"version":3161,"projectRoot":662,"scanRoot":3162,"outputRoot":3163,"defaults":3164,"engine":3170,"partials":3171,"dedupeIdenticalDiskWrites":3175},"7.0.4","autogen","content",{"inheritFrom":3165,"language":3167,"output":3168,"extension":3156,"title":3169,"version":3161},[3166],0,"en",false,"NetLogo User Manual","handlebars",{"directoryPaths":3172,"extensions":3173},[662],[3174,3156],"mustache",true,[3166],[3178,5,3179,3180],"FAQ","Help","NetLogo",[3178,5,3179],"i-lucide-circle-question-mark","/home/runner/work/Helio/Helio/apps/docs/autogen","/faq",{"title":5,"description":3155},"faq","5E6VL8iVyWG3UUP-tI37LcKrslxLmKG6J2sZLHVZ69Y",[3189,3192],{"title":525,"path":3190,"stem":3042,"description":3191},"/extensions","NetLogo extensions provide additional functionality beyond the core language, allowing you to add new commands, reporters, and capabilities to your models.",{"title":3193,"path":3194,"stem":1861,"description":3195},"GIS Extension","/gis","Documentation for the GIS extension.",1777657788339]