[{"data":1,"prerenderedAt":2906},["ShallowReactive",2],{"/behaviorspace":3,"/behaviorspace-surround":2895},{"id":4,"title":5,"body":6,"description":2864,"extension":2865,"meta":2866,"navigation":2884,"path":2891,"seo":2892,"stem":2893,"__hash__":2894},"content/behaviorspace.md","Behavior Space",{"type":7,"value":8,"toc":2824},"minimark",[9,21,25,57,60,143,146,183,191,194,197,200,210,213,216,231,234,241,244,253,256,268,273,280,285,293,299,428,455,511,533,541,547,569,572,597,600,603,613,630,650,653,713,719,770,777,781,796,828,854,857,890,901,913,931,949,955,988,991,1003,1021,1045,1065,1068,1109,1112,1115,1118,1124,1212,1215,1302,1308,1322,1325,1341,1386,1392,1399,1403,1424,1432,1435,1481,1491,1497,1514,1517,1553,1566,1573,1576,1582,1588,1595,1599,1602,1609,1615,1624,1643,1652,1655,1664,1704,1707,1710,1718,1742,1747,1753,1766,1774,1801,1806,1821,1826,1837,1844,1848,1860,1865,1873,1880,1884,1899,1911,1916,1924,1931,1935,1987,1994,2028,2037,2046,2049,2052,2055,2058,2061,2069,2105,2123,2132,2135,2140,2146,2149,2156,2160,2163,2177,2180,2187,2196,2199,2202,2211,2225,2423,2439,2460,2469,2494,2505,2515,2521,2528,2534,2539,2542,2548,2556,2565,2568,2574,2590,2604,2618,2632,2650,2657,2663,2669,2676,2682,2703,2706,2715,2718,2725,2735,2743,2749,2752,2758,2764,2774,2783,2790,2800,2807,2816],[10,11,15],"h1",{"id":12,"className":13},"behavior-space",[14],"section-heading",[16,17,5],"a",{"className":18,"href":20},[19],"section-anchor","#behavior-space",[22,23,24],"p",{},"This guide has three parts:",[26,27,28,39,48],"ul",{},[29,30,31,38],"li",{},[16,32,34],{"href":33},"#what-is-behaviorspace",[35,36,37],"strong",{},"What is BehaviorSpace?",": A general description of the tool,\nincluding the ideas and principles behind it.",[29,40,41,47],{},[16,42,44],{"href":43},"#how-it-works",[35,45,46],{},"How It Works",": Walks you through how to use the tool and highlights\nits most commonly used features.",[29,49,50,56],{},[16,51,53],{"href":52},"#advanced-usage",[35,54,55],{},"Advanced Usage",": How to use BehaviorSpace from the command\nline, or from your own Java code.",[22,58,59],{},"A number of new features were introduced in NetLogo 6.4:",[26,61,62,71,80,89,98,107,116,125,134],{},[29,63,64,70],{},[16,65,67],{"href":66},"#subexperiment-syntax",[35,68,69],{},"Subexperiment syntax",": A syntax for allowing parameter\ncombinations to be run separately, rather than being expanded combinatorically.",[29,72,73,79],{},[16,74,76],{"href":75},"#run-metrics-when",[35,77,78],{},"Run metrics when",": A reporter can be used to conditionally record\nmeasurements.",[29,81,82,88],{},[16,83,85],{"href":84},"#pre-experiment-commands",[35,86,87],{},"Pre experiment commands",": Commands can be run before\nthe experiment begins.",[29,90,91,97],{},[16,92,94],{"href":93},"#post-experiment-commands",[35,95,96],{},"Post experiment commands",": Commands can be run after\nthe experiment ends.",[29,99,100,106],{},[16,101,103],{"href":102},"#statistics-output",[35,104,105],{},"Statistics output",": The mean and standard deviation\nof data from repetitions can be saved in an output file.",[29,108,109,115],{},[16,110,112],{"href":111},"#lists-output",[35,113,114],{},"Lists output",": List data can be output in a file with one list\nelement per cell.",[29,117,118,124],{},[16,119,121],{"href":120},"#importing-and-exporting",[35,122,123],{},"Importing and exporting",": Experiments can now be exported to\nan XML file that can be used when running headlessly. Experiments can also be imported into a\nmodel.",[29,126,127,133],{},[16,128,130],{"href":129},"#paused-experiments",[35,131,132],{},"Paused experiments",": Experiments can now be paused and resumed.",[29,135,136,142],{},[16,137,139],{"href":138},"#run-options-update-plots-and-monitors",[35,140,141],{},"Run options: update plots and monitors",":\nReduction in memory usage when box is unchecked.",[22,144,145],{},"More about changes to BehaviorSpace in NetLogo 6.4:",[26,147,148,151,161,170,173,176],{},[29,149,150],{},"Experiments created in versions prior to 6.4 can still be opened, but experiments\ncreated using new features are not backwards compatible.",[29,152,153,154,160],{},"For information on format changes to output files see\n",[16,155,157],{"href":156},"#output-file-changes",[35,158,159],{},"Output File Changes",".",[29,162,163,164,160],{},"The Experiment dialog now uses tooltips rather than text below each input element see\n",[16,165,167],{"href":166},"#creating-an-experiment-setup",[35,168,169],{},"Creating an experiment setup",[29,171,172],{},"Experiments using the new features can be found in the model\nSample Models=>Biology=>Wolf Sheep Predation, with with additional notes in the Info tab.",[29,174,175],{},"Hovering over the edit dialog entry titles will show a helpful ‘tooltip’.",[29,177,178,179,160],{},"Additional minor changes can be found by searching this page for ",[180,181,182],"em",{},"(Since 6.4)",[184,185,188],"h2",{"id":186,"className":187},"what-is-behaviorspace",[14],[16,189,37],{"className":190,"href":33},[19],[22,192,193],{},"BehaviorSpace is a software tool integrated with NetLogo that allows you to\nperform experiments with models.",[22,195,196],{},"BehaviorSpace runs a model many times, systematically varying the model’s\nsettings and recording the results of each model run. This process is sometimes\ncalled “parameter sweeping”. It lets you explore the model’s “space” of possible\nbehaviors and determine which combinations of settings cause the behaviors of\ninterest.",[22,198,199],{},"If your computer has multiple processor cores, you can specify how many model runs will\nhappen in parallel. Using multiple runs in parallel will increase the memory used\nby BehaviorSpace.",[201,202,205],"h3",{"id":203,"className":204},"why-behaviorspace",[14],[16,206,209],{"className":207,"href":208},[19],"#why-behaviorspace","Why BehaviorSpace?",[22,211,212],{},"The need for this type of experiment is revealed by the following observations.\nModels often have many settings, each of which can take a range of values.\nTogether they form what in mathematics is called a parameter space for the\nmodel, whose dimensions are the number of settings, and in which every point is\na particular combination of values. Running a model with different settings (and\nsometimes even the same ones) can lead to drastically different behavior in the\nsystem being modeled. So, how are you to know which particular configuration of\nvalues, or types of configurations, will yield the kind of behavior you are\ninterested in? This amounts to the question of where in its huge,\nmulti-dimension parameter space does your model perform best?",[22,214,215],{},"For example, suppose you want speedy synchronization from the agents in the\nFireflies model. The model has four sliders — number, cycle-length,\nflash-length and flashes-to-reset — that have approximately 2000, 100, 10 and 3\npossible values, respectively. That means there are 2000 * 100 * 10 * 3 =\n6,000,000 possible combinations of slider values! Trying combinations one at a\ntime is hardly an efficient way to learn which one will evoke the speediest\nsynchronization.",[22,217,218,219,225,226,230],{},"BehaviorSpace offers you a much better way to solve this problem by sampling the\nmodel’s parameter space — not exhaustively, but enough so that you will be able\nto see relationships form between different slider values and the behavior of the\nsystem. One way to do this is to specify a subset of values from the ranges of each\nslider. See ",[16,220,222],{"href":221},"#combinatorial-syntaxes",[35,223,224],{},"Combinatorial syntaxes",". BehaviorSpace\nwill run the model with each possible combination of those values and, during each\nmodel run, record the results. Since NetLogo 6.4 it has been possible to specify\nnon-combinatorial sets of slider values. See\n",[16,227,228],{"href":66},[35,229,69],{},". After all the runs are\nover, a dataset is generated which you can open in a different tool, such as a\nspreadsheet, database, or scientific visualization application, and explore.",[22,232,233],{},"By enabling you to explore the entire “space” of behaviors a model can exhibit,\nBehaviorSpace can be a powerful assistant to the modeler.",[184,235,238],{"id":236,"className":237},"how-it-works",[14],[16,239,46],{"className":240,"href":43},[19],[22,242,243],{},"To begin using BehaviorSpace, open your model, then choose the BehaviorSpace\nitem on NetLogo’s Tools menu.",[201,245,248],{"id":246,"className":247},"managing-experiment-setups",[14],[16,249,252],{"className":250,"href":251},[19],"#managing-experiment-setups","Managing experiment setups",[22,254,255],{},"The dialog that opens lets you create, edit, duplicate, delete, import, export,\nand run experiment setups. Experiments are listed by name and total number of model\nruns.",[22,257,258,259,263,264,267],{},"Experiment setups are considered part of a NetLogo model and are saved as part\nof the model, but can be also be exported as individual files. See\n",[16,260,261],{"href":120},[35,262,123],{}," (",[180,265,266],{},"Since 6.4",").",[22,269,270,271,267],{},"To create a new experiment setup, press the “New” button. To edit an existing\nexperiment setup, press the “Edit” button. The same dialog is used in both cases,\nwhat differs is the information that is already filled in. The dialog is\nnon-blocking, which is useful if you want to copy something from the Code Tab,\nor view sliders in the Interface Tab (",[180,272,266],{},[201,274,277],{"id":275,"className":276},"creating-an-experiment-setup",[14],[16,278,169],{"className":279,"href":166},[19],[22,281,282,283,160],{},"The information that can be included in the Experiment dialog is detailed below.\nNote that it is not necessary to specify everything; some parts can be left blank\nor with their default values. Hovering over the edit dialog entry titles will show a helpful ‘tooltip’,\nso you don’t have to revisit this page as often ",[180,284,182],{},[22,286,287,290,291,160],{},[35,288,289],{},"Experiment name:"," Experiments in the same model must have different names. If\nyou open a model that contains experiments with duplicate names, the conflicting\nnames will be altered to ensure that all experiment names remain unique ",[180,292,182],{},[22,294,295,298],{},[35,296,297],{},"Vary variables as follows:"," This is where you specify which settings you want\nvaried, and what values you want them to take. Variables can include sliders,\nswitches, choosers, and any global variables in your model. You may notice that\nthe view and plots do not correspond to the values in the widgets once the experiment is completed.\nThis is because the globals that are controlled by widgets are reset to their initial state at\nthe end of the experiment. To synchronize your view and plots with the widgets, run your procedure\nthat initializes the view.",[22,300,301,302,315,316,325,326,333,334,315,341,325,350,333,357,365,366,333,372,378,379,385,386,392,393,315,412,424,425,427],{},"Variables can also include ",[303,304,307],"primitive",{"displayText":305,"permalink":306},"max-pxcor","max-pcor",[16,308,305],{"href":309,"className":310,"dataDisplayText":305,"rel":312,"target":314,"title":305},"/dictionary#max-pcor",[311],"netlogo-wiki-link",[313],"noopener","_self",", ",[303,317,320],{"displayText":318,"permalink":319},"min-pxcor","min-pcor",[16,321,318],{"href":322,"className":323,"dataDisplayText":318,"rel":324,"target":314,"title":318},"/dictionary#min-pcor",[311],[313],",\n",[303,327,329],{"displayText":328,"permalink":306},"max-pycor",[16,330,328],{"href":309,"className":331,"dataDisplayText":328,"rel":332,"target":314,"title":328},[311],[313]," and ",[303,335,337],{"displayText":336,"permalink":319},"min-pycor",[16,338,336],{"href":322,"className":339,"dataDisplayText":336,"rel":340,"target":314,"title":336},[311],[313],[303,342,345],{"displayText":343,"permalink":344},"world-width","world-dim",[16,346,343],{"href":347,"className":348,"dataDisplayText":343,"rel":349,"target":314,"title":343},"/dictionary#world-dim",[311],[313],[303,351,353],{"displayText":352,"permalink":344},"world-height",[16,354,352],{"href":347,"className":355,"dataDisplayText":352,"rel":356,"target":314,"title":352},[311],[313],[303,358,360],{"displayText":359,"permalink":359},"random-seed",[16,361,359],{"href":362,"className":363,"dataDisplayText":359,"rel":364,"target":314,"title":359},"/dictionary#random-seed",[311],[313],". These are not variables, strictly\nspeaking, but BehaviorSpace lets you vary them as if they were.\nVarying the world dimensions lets you explore the effect of world size upon your\nmodel. Setting  ",[303,367,368],{"displayText":343,"permalink":344},[16,369,343],{"href":347,"className":370,"dataDisplayText":343,"rel":371,"target":314,"title":343},[311],[313],[303,373,374],{"displayText":352,"permalink":344},[16,375,352],{"href":347,"className":376,"dataDisplayText":352,"rel":377,"target":314,"title":352},[311],[313]," is\nvalid under two circumstances. 1) If the origin is centered in width or height\nBehaviorSpace will keep it centered in that dimension. This requires that the\ncorresponding value(s) ",[303,380,381],{"displayText":343,"permalink":344},[16,382,343],{"href":347,"className":383,"dataDisplayText":343,"rel":384,"target":314,"title":343},[311],[313]," and/or ",[303,387,388],{"displayText":352,"permalink":344},[16,389,352],{"href":347,"className":390,"dataDisplayText":352,"rel":391,"target":314,"title":352},[311],[313],"\nmust be odd. 2) If one of\nthe bounds is zero it will remain zero and the other bound will move. For example,\nif you start with a world with ",[394,395,396,402,403,402,407],"code",{},[397,398,318],"span",{"className":399},[400,401],"token","reporter"," ",[397,404,406],{"className":405},[400,401],"=",[397,408,411],{"className":409},[400,410],"number","0",[394,413,414,402,417,402,420],{},[397,415,305],{"className":416},[400,401],[397,418,406],{"className":419},[400,401],[397,421,423],{"className":422},[400,410],"10"," and you vary\n",[394,426,343],{}," like this:",[429,430,431],"blockquote",{},[22,432,433],{},[394,434,435,436,441,442,402,446,402,450,454],{},"[",[397,437,440],{"className":438},[400,439],"string","\"world-width\""," [",[397,443,445],{"className":444},[400,410],"11",[397,447,449],{"className":448},[400,410],"1",[397,451,453],{"className":452},[400,410],"14","]]",[22,456,457,463,464,470,471,477,478,484,485,315,491,315,497,503,504,510],{},[303,458,459],{"displayText":318,"permalink":319},[16,460,318],{"href":322,"className":461,"dataDisplayText":318,"rel":462,"target":314,"title":318},[311],[313]," will remain zero and ",[303,465,466],{"displayText":305,"permalink":306},[16,467,305],{"href":309,"className":468,"dataDisplayText":305,"rel":469,"target":314,"title":305},[311],[313]," will be set to 11,\n12, and 13 for successive runs. If neither of these conditions is true you cannot\nyou cannot vary ",[303,472,473],{"displayText":352,"permalink":344},[16,474,352],{"href":347,"className":475,"dataDisplayText":352,"rel":476,"target":314,"title":352},[311],[313]," or ",[303,479,480],{"displayText":343,"permalink":344},[16,481,343],{"href":347,"className":482,"dataDisplayText":343,"rel":483,"target":314,"title":343},[311],[313]," directly but\nmust vary ",[303,486,487],{"displayText":305,"permalink":306},[16,488,305],{"href":309,"className":489,"dataDisplayText":305,"rel":490,"target":314,"title":305},[311],[313],[303,492,493],{"displayText":328,"permalink":306},[16,494,328],{"href":309,"className":495,"dataDisplayText":328,"rel":496,"target":314,"title":328},[311],[313],[303,498,499],{"displayText":318,"permalink":319},[16,500,318],{"href":322,"className":501,"dataDisplayText":318,"rel":502,"target":314,"title":318},[311],[313],"\nand ",[303,505,506],{"displayText":336,"permalink":319},[16,507,336],{"href":322,"className":508,"dataDisplayText":336,"rel":509,"target":314,"title":336},[311],[313]," instead.",[22,512,513,514,520,521,527,528,532],{},"Varying ",[303,515,516],{"displayText":359,"permalink":359},[16,517,359],{"href":362,"className":518,"dataDisplayText":359,"rel":519,"target":314,"title":359},[311],[313]," lets you repeat runs by using a known seed for the\nNetLogo random number generator. Note that you’re also free to use the\n",[303,522,523],{"displayText":359,"permalink":359},[16,524,359],{"href":362,"className":525,"dataDisplayText":359,"rel":526,"target":314,"title":359},[311],[313]," command in your experiment’s setup commands. For more\ninformation on random seeds, see the\n",[16,529,531],{"href":530},"/programming#random-numbers","Random Numbers"," section of the Programming\nGuide.",[534,535,538],"h4",{"id":536,"className":537},"combinatorial-syntaxes",[14],[16,539,224],{"className":540,"href":221},[19],[22,542,543,544,546],{},"You may specify values either by listing the values you want used, or by\nspecifying that you want to try every value within a given range. For example,\nto give a slider named ",[394,545,410],{}," every value from 100 to 1000 in increments of\n50, you would enter:",[429,548,549],{},[22,550,551],{},[394,552,435,553,441,557,402,561,402,565,454],{},[397,554,556],{"className":555},[400,439],"\"number\"",[397,558,560],{"className":559},[400,410],"100",[397,562,564],{"className":563},[400,410],"50",[397,566,568],{"className":567},[400,410],"1000",[22,570,571],{},"Or, to give it only the values of 100, 200, 400, and 800, you would enter:",[429,573,574],{},[22,575,576],{},[394,577,435,578,402,581,402,584,402,588,402,592,596],{},[397,579,556],{"className":580},[400,439],[397,582,560],{"className":583},[400,410],[397,585,587],{"className":586},[400,410],"200",[397,589,591],{"className":590},[400,410],"400",[397,593,595],{"className":594},[400,410],"800","]",[22,598,599],{},"Be careful with the brackets here. Note that there are fewer square brackets in\nthe second example. Including or not including this extra set of brackets is how\nyou tell BehaviorSpace whether you are listing individual values, or specifying\na range.",[22,601,602],{},"Also note that the double quotes around the variable names are required.",[22,604,605,606,608,609,612],{},"All combinations of the specified values will be run. For example, if you have two\nvalues for a variable ",[394,607,16],{}," and three values of a variable ",[394,610,611],{},"b"," six runs will result.",[429,614,615],{},[22,616,617],{},[394,618,435,619,402,623,402,626,596],{},[397,620,622],{"className":621},[400,439],"\"a\"",[397,624,449],{"className":625},[400,410],[397,627,629],{"className":628},[400,410],"2",[429,631,632],{},[22,633,634],{},[394,635,435,636,402,640,402,643,402,647,596],{},[397,637,639],{"className":638},[400,439],"\"b\"",[397,641,629],{"className":642},[400,410],[397,644,646],{"className":645},[400,410],"4",[397,648,423],{"className":649},[400,410],[22,651,652],{},"This would create six runs, organized as follows:",[654,655,658],"div",{"className":656},[657],"table-container",[659,660,661,673],"table",{},[662,663,664],"thead",{},[665,666,667,671],"tr",{},[668,669,16],"th",{"align":670},"right",[668,672,611],{"align":670},[674,675,676,683,689,695,701,707],"tbody",{},[665,677,678,681],{},[679,680,449],"td",{"align":670},[679,682,629],{"align":670},[665,684,685,687],{},[679,686,449],{"align":670},[679,688,646],{"align":670},[665,690,691,693],{},[679,692,449],{"align":670},[679,694,423],{"align":670},[665,696,697,699],{},[679,698,629],{"align":670},[679,700,629],{"align":670},[665,702,703,705],{},[679,704,629],{"align":670},[679,706,646],{"align":670},[665,708,709,711],{},[679,710,629],{"align":670},[679,712,423],{"align":670},[22,714,715,718],{},[35,716,717],{},"Run combinations in sequential order checkbox"," This box is checked by default,\nand causes variables specified later to vary more quickly than those specified earlier.\nWhen the box is unchecked, non-sequential order results, with variables specified earlier\nvarying more quickly than those specified later.\nThe non-sequential order for the variable specification above is:",[654,720,722],{"className":721},[657],[659,723,724,732],{},[662,725,726],{},[665,727,728,730],{},[668,729,16],{"align":670},[668,731,611],{"align":670},[674,733,734,740,746,752,758,764],{},[665,735,736,738],{},[679,737,449],{"align":670},[679,739,629],{"align":670},[665,741,742,744],{},[679,743,629],{"align":670},[679,745,629],{"align":670},[665,747,748,750],{},[679,749,449],{"align":670},[679,751,646],{"align":670},[665,753,754,756],{},[679,755,629],{"align":670},[679,757,646],{"align":670},[665,759,760,762],{},[679,761,449],{"align":670},[679,763,423],{"align":670},[665,765,766,768],{},[679,767,629],{"align":670},[679,769,423],{"align":670},[534,771,774],{"id":772,"className":773},"subexperiment-syntax",[14],[16,775,69],{"className":776,"href":66},[19],[22,778,779],{},[180,780,182],{},[22,782,783,784,787,788,791,792,795],{},"For more advanced users, there is a third available syntax\nfor varying parameters, the subexperiment syntax.  For example, in the Wolf Sheep Predation model, if you wanted to try\ntwo values for the ",[394,785,786],{},"grass-regrowth-time"," variable, each with its own values for the ",[394,789,790],{},"initial-number-sheep"," and\n",[394,793,794],{},"initial-number-wolves"," variables, you could write it as follows:",[429,797,798],{},[22,799,800],{},[394,801,802,803,402,807,811,812,402,816,811,820,402,824,454],{},"[[",[397,804,806],{"className":805},[400,439],"\"grass-regrowth-time\"",[397,808,810],{"className":809},[400,410],"30","][",[397,813,815],{"className":814},[400,439],"\"initial-number-sheep\"",[397,817,819],{"className":818},[400,410],"116",[397,821,823],{"className":822},[400,439],"\"initial-number-wolves\"",[397,825,827],{"className":826},[400,410],"107",[429,829,830],{},[22,831,832],{},[394,833,802,834,402,837,811,841,402,844,811,847,402,850,454],{},[397,835,806],{"className":836},[400,439],[397,838,840],{"className":839},[400,410],"40",[397,842,815],{"className":843},[400,439],[397,845,560],{"className":846},[400,410],[397,848,823],{"className":849},[400,439],[397,851,853],{"className":852},[400,410],"77",[22,855,856],{},"Note the use of doubly nested square brackets to separate each variable within a\nsubexperiment. This would create two runs, organized as follows:",[654,858,860],{"className":859},[657],[659,861,862,872],{},[662,863,864],{},[665,865,866,868,870],{},[668,867,786],{"align":670},[668,869,790],{"align":670},[668,871,794],{"align":670},[674,873,874,882],{},[665,875,876,878,880],{},[679,877,810],{"align":670},[679,879,819],{"align":670},[679,881,827],{"align":670},[665,883,884,886,888],{},[679,885,840],{"align":670},[679,887,560],{"align":670},[679,889,853],{"align":670},[22,891,892,893,791,895,897,898,900],{},"The subexperiment syntax also allows you to define constants using the standard\nsyntax, which will be applied to each subexperiment where they are not overwritten.\nTo add to the example above, if you wanted to try those combinations of ",[394,894,790],{},[394,896,794],{}," but with the same value for ",[394,899,786],{},", you could write it as follows:",[429,902,903],{},[22,904,905],{},[394,906,435,907,402,910,596],{},[397,908,806],{"className":909},[400,439],[397,911,810],{"className":912},[400,410],[429,914,915],{},[22,916,917],{},[394,918,802,919,402,922,811,925,402,928,454],{},[397,920,815],{"className":921},[400,439],[397,923,819],{"className":924},[400,410],[397,926,823],{"className":927},[400,439],[397,929,827],{"className":930},[400,410],[429,932,933],{},[22,934,935],{},[394,936,802,937,402,940,811,943,402,946,454],{},[397,938,815],{"className":939},[400,439],[397,941,560],{"className":942},[400,410],[397,944,823],{"className":945},[400,439],[397,947,853],{"className":948},[400,410],[22,950,951,952,954],{},"This would set ",[394,953,786],{}," to 30 for both subexperiments, resulting in the following runs:",[654,956,958],{"className":957},[657],[659,959,960,970],{},[662,961,962],{},[665,963,964,966,968],{},[668,965,786],{"align":670},[668,967,790],{"align":670},[668,969,794],{"align":670},[674,971,972,980],{},[665,973,974,976,978],{},[679,975,810],{"align":670},[679,977,819],{"align":670},[679,979,827],{"align":670},[665,981,982,984,986],{},[679,983,810],{"align":670},[679,985,560],{"align":670},[679,987,853],{"align":670},[22,989,990],{},"You can also override a constant in a subexperiment, as in the following example:",[429,992,993],{},[22,994,995],{},[394,996,435,997,402,1000,596],{},[397,998,806],{"className":999},[400,439],[397,1001,810],{"className":1002},[400,410],[429,1004,1005],{},[22,1006,1007],{},[394,1008,802,1009,402,1012,811,1015,402,1018,454],{},[397,1010,815],{"className":1011},[400,439],[397,1013,819],{"className":1014},[400,410],[397,1016,823],{"className":1017},[400,439],[397,1019,827],{"className":1020},[400,410],[429,1022,1023],{},[22,1024,1025],{},[394,1026,802,1027,402,1030,811,1033,402,1036,811,1039,402,1042,454],{},[397,1028,806],{"className":1029},[400,439],[397,1031,840],{"className":1032},[400,410],[397,1034,815],{"className":1035},[400,439],[397,1037,560],{"className":1038},[400,410],[397,1040,823],{"className":1041},[400,439],[397,1043,853],{"className":1044},[400,410],[429,1046,1047],{},[22,1048,1049],{},[394,1050,802,1051,402,1054,811,1058,402,1061,454],{},[397,1052,815],{"className":1053},[400,439],[397,1055,1057],{"className":1056},[400,410],"80",[397,1059,823],{"className":1060},[400,439],[397,1062,1064],{"className":1063},[400,410],"153",[22,1066,1067],{},"This would produce three runs with the following combinations:",[654,1069,1071],{"className":1070},[657],[659,1072,1073,1083],{},[662,1074,1075],{},[665,1076,1077,1079,1081],{},[668,1078,786],{"align":670},[668,1080,790],{"align":670},[668,1082,794],{"align":670},[674,1084,1085,1093,1101],{},[665,1086,1087,1089,1091],{},[679,1088,810],{"align":670},[679,1090,819],{"align":670},[679,1092,827],{"align":670},[665,1094,1095,1097,1099],{},[679,1096,840],{"align":670},[679,1098,560],{"align":670},[679,1100,853],{"align":670},[665,1102,1103,1105,1107],{},[679,1104,810],{"align":670},[679,1106,1057],{"align":670},[679,1108,1064],{"align":670},[22,1110,1111],{},"Note that all constants must be defined before any subexperiments.",[22,1113,1114],{},"You can vary as many settings as you want, including just one, or none at all.\nAny settings that you do not vary will retain their current values. Not varying\nany settings is useful if you just want to do many runs with the current\nsettings.",[22,1116,1117],{},"The order in which you list the variables determines the run order. All values\nfor a later variable will be tried before moving to the next\nvalue for an earlier variable. So for example if you vary both x and y from 1 to\n3, and x is listed first, then the order of model runs will be: x=1 y=1,\nx=1 y=2, x=1 y=3, x=2 y=1, and so on.",[22,1119,1120,1123],{},[35,1121,1122],{},"Repetitions:"," Sometimes the behavior of a model can vary a lot from run to\nrun even if the settings don’t change, if the model uses random numbers. If you\nwant to run the model more than once at each combination of settings, enter a\nhigher number.\nWith sequential ordering repetitions occur in sequential runs:",[654,1125,1127],{"className":1126},[657],[659,1128,1129,1137],{},[662,1130,1131],{},[665,1132,1133,1135],{},[668,1134,16],{"align":670},[668,1136,611],{"align":670},[674,1138,1139,1145,1151,1157,1163,1170,1176,1182,1188,1194,1200,1206],{},[665,1140,1141,1143],{},[679,1142,449],{"align":670},[679,1144,629],{"align":670},[665,1146,1147,1149],{},[679,1148,449],{"align":670},[679,1150,629],{"align":670},[665,1152,1153,1155],{},[679,1154,629],{"align":670},[679,1156,629],{"align":670},[665,1158,1159,1161],{},[679,1160,629],{"align":670},[679,1162,629],{"align":670},[665,1164,1165,1167],{},[679,1166,449],{"align":670},[679,1168,1169],{"align":670},"6",[665,1171,1172,1174],{},[679,1173,449],{"align":670},[679,1175,1169],{"align":670},[665,1177,1178,1180],{},[679,1179,629],{"align":670},[679,1181,1169],{"align":670},[665,1183,1184,1186],{},[679,1185,629],{"align":670},[679,1187,1169],{"align":670},[665,1189,1190,1192],{},[679,1191,449],{"align":670},[679,1193,423],{"align":670},[665,1195,1196,1198],{},[679,1197,449],{"align":670},[679,1199,423],{"align":670},[665,1201,1202,1204],{},[679,1203,629],{"align":670},[679,1205,423],{"align":670},[665,1207,1208,1210],{},[679,1209,629],{"align":670},[679,1211,423],{"align":670},[22,1213,1214],{},"With non-sequential ordering repetitions occur as a second group of runs:",[654,1216,1218],{"className":1217},[657],[659,1219,1220,1228],{},[662,1221,1222],{},[665,1223,1224,1226],{},[668,1225,16],{"align":670},[668,1227,611],{"align":670},[674,1229,1230,1236,1242,1248,1254,1260,1266,1272,1278,1284,1290,1296],{},[665,1231,1232,1234],{},[679,1233,449],{"align":670},[679,1235,629],{"align":670},[665,1237,1238,1240],{},[679,1239,629],{"align":670},[679,1241,629],{"align":670},[665,1243,1244,1246],{},[679,1245,449],{"align":670},[679,1247,1169],{"align":670},[665,1249,1250,1252],{},[679,1251,629],{"align":670},[679,1253,1169],{"align":670},[665,1255,1256,1258],{},[679,1257,449],{"align":670},[679,1259,423],{"align":670},[665,1261,1262,1264],{},[679,1263,629],{"align":670},[679,1265,423],{"align":670},[665,1267,1268,1270],{},[679,1269,449],{"align":670},[679,1271,629],{"align":670},[665,1273,1274,1276],{},[679,1275,629],{"align":670},[679,1277,629],{"align":670},[665,1279,1280,1282],{},[679,1281,449],{"align":670},[679,1283,1169],{"align":670},[665,1285,1286,1288],{},[679,1287,629],{"align":670},[679,1289,1169],{"align":670},[665,1291,1292,1294],{},[679,1293,449],{"align":670},[679,1295,423],{"align":670},[665,1297,1298,1300],{},[679,1299,629],{"align":670},[679,1301,423],{"align":670},[22,1303,1304,1307],{},[35,1305,1306],{},"Measure runs using these reporters:"," This is where you specify what data you\nwant to collect from each run. For example, if you wanted to record how the\npopulation of turtles rose and fell during each run, you would enter:",[429,1309,1310],{},[22,1311,1312],{},[394,1313,1314,402,1318],{},[397,1315,1317],{"className":1316},[400,401],"count",[397,1319,1321],{"className":1320},[400,401],"turtles",[22,1323,1324],{},"You can enter one reporter, or several, or none at all. If you enter several,\neach reporter must be on a line by itself, for example:",[429,1326,1327,1330,1333,1336,1338],{},[394,1328,1329],{},"count frogs",[1331,1332],"br",{},[394,1334,1335],{},"count mice",[1331,1337],{},[394,1339,1340],{},"count birds",[22,1342,1343,1344,1353,1354,1381,1382,1385],{},"If you don’t enter any reporters, the runs will still take place. This is useful\nif you want to record the results yourself your own way, such as with the\n",[303,1345,1348],{"displayText":1346,"permalink":1347},"export-world","export-cmds",[16,1349,1346],{"href":1350,"className":1351,"dataDisplayText":1346,"rel":1352,"target":314,"title":1346},"/dictionary#export-cmds",[311],[313]," command. You can use reporters you have\ndefined in the Code tab. Reporters appear as column headers. If you prefer compact\nheaders you could replace ",[394,1355,1356,402,1359,402,1363,1367,1368,402,1372,402,1375,1380],{},[397,1357,1317],{"className":1358},[400,401],[397,1360,1362],{"className":1361},[400,401],"patches",[397,1364,1366],{"className":1365},[400,401],"with"," [ ",[397,1369,1371],{"className":1370},[400,401],"pcolor",[397,1373,406],{"className":1374},[400,401],[397,1376,1379],{"className":1377},[400,1378],"constant","red"," ]"," with a reporter ",[394,1383,1384],{},"red-patches","\ndefined in the Code tab.",[22,1387,1388,1391],{},[35,1389,1390],{},"Run metrics every step:"," Normally NetLogo will measure model runs at\nevery step, using the reporters you entered in the previous box. If you’re doing\nvery long model runs, you might not want all that data. Uncheck this box if you\nwant to either only measure model runs at the end of the run or\nif you want to specify certain conditions when measurements should be taken.",[534,1393,1396],{"id":1394,"className":1395},"run-metrics-when",[14],[16,1397,78],{"className":1398,"href":75},[19],[22,1400,1401],{},[180,1402,182],{},[22,1404,1405,1406,1409,1410,1413,1414,1417,1418,333,1421,160],{},"This reporter will be used to determine when measurements\nshould be recorded if they are not being recorded at every step. Measurements\nwill be always be taken at the end of each model run, even if this text box is\nempty as was previously the case when the ",[180,1407,1408],{},"Measure runs at every step","\n(now ",[180,1411,1412],{},"Run metrics every step",") was unchecked.  For example ",[180,1415,1416],{},"ticks mod 10 = 0","\nwould record every tenth tick, as well as the last tick. Multiple reporters\ncan be combined using ",[180,1419,1420],{},"and",[180,1422,1423],{},"or",[1425,1426,1429],"h5",{"id":1427,"className":1428},"pre-experiment-commands",[14],[16,1430,87],{"className":1431,"href":84},[19],[22,1433,1434],{},"These commands will be run once, before the experiment begins.",[22,1436,1437,1440,1441,1444,1445,1459,1460],{},[35,1438,1439],{},"Setup commands:"," These commands will be used to begin each model run.\nTypically, you will enter the name of a procedure that sets up the model,\ntypically ",[394,1442,1443],{},"setup",". But it is also possible to include other commands as well.\nIf you want the same\nresults each time you run an experiment, you could use something like\n",[394,1446,1447,402,1451,402,1455],{},[397,1448,359],{"className":1449},[400,1450],"command",[397,1452,1454],{"className":1453},[400,410],"473",[397,1456,1443],{"className":1457},[400,1458],"variable"," or to have different results for repetitions\n",[394,1461,1462,263,1465,402,1469,402,1473,1477,1478],{},[397,1463,359],{"className":1464},[400,1450],[397,1466,1468],{"className":1467},[400,410],"474",[397,1470,1472],{"className":1471},[400,401],"+",[397,1474,1476],{"className":1475},[400,401],"behaviorspace-run-number",") ",[397,1479,1443],{"className":1480},[400,1458],[22,1482,1483,1486,1487,1490],{},[35,1484,1485],{},"Go commands:"," These commands will be run over and over again to advance to\nthe model to the next “step”. Typically, this will be the name of a procedure,\nsuch as ",[394,1488,1489],{},"go",", but you may include any commands you like.",[22,1492,1493,1496],{},[35,1494,1495],{},"Stop condition:"," This lets you do model runs of varying length, ending each\nrun when a certain condition becomes true. For example, suppose you wanted each\nrun to last until there were no more turtles. Then you would enter:",[429,1498,1499],{},[22,1500,1501],{},[394,1502,1503,402,1507,402,1511],{},[397,1504,1506],{"className":1505},[400,401],"not",[397,1508,1510],{"className":1509},[400,401],"any?",[397,1512,1321],{"className":1513},[400,401],[22,1515,1516],{},"If you want the length of runs to all be of a fixed length, just leave this\nblank.",[22,1518,1519,1520,1528,1529,1535,1536,1542,1543,1545,1546,1552],{},"The run may also stop because the go commands use the ",[303,1521,1523],{"displayText":1522,"permalink":1522},"stop",[16,1524,1522],{"href":1525,"className":1526,"dataDisplayText":1522,"rel":1527,"target":314,"title":1522},"/dictionary#stop",[311],[313]," command, in the\nsame way that ",[303,1530,1531],{"displayText":1522,"permalink":1522},[16,1532,1522],{"href":1525,"className":1533,"dataDisplayText":1522,"rel":1534,"target":314,"title":1522},[311],[313]," can be used to stop a forever button. The ",[303,1537,1538],{"displayText":1522,"permalink":1522},[16,1539,1522],{"href":1525,"className":1540,"dataDisplayText":1522,"rel":1541,"target":314,"title":1522},[311],[313],"\ncommand may be used directly in the go commands, or in a procedure called\ndirectly by the go commands. (The intent is that the same ",[394,1544,1489],{}," procedure should\nwork both in a button and in a BehaviorSpace experiment.) Note that the step in\nwhich ",[303,1547,1548],{"displayText":1522,"permalink":1522},[16,1549,1522],{"href":1525,"className":1550,"dataDisplayText":1522,"rel":1551,"target":314,"title":1522},[311],[313]," is used is considered to have been aborted, so no results will be\nrecorded for that step. Therefore, the stopping test should be at the beginning\nof the go commands or procedure, not at the end.",[22,1554,1555,1558,1559,1565],{},[35,1556,1557],{},"Post run commands:"," These are any extra commands that you want run when\neach run ends. Usually this is left blank, but you might use it to call the\n",[303,1560,1561],{"displayText":1346,"permalink":1347},[16,1562,1346],{"href":1350,"className":1563,"dataDisplayText":1346,"rel":1564,"target":314,"title":1346},[311],[313]," command or record the results of\nthe run in some other way.",[1425,1567,1570],{"id":1568,"className":1569},"post-experiment-commands",[14],[16,1571,96],{"className":1572,"href":93},[19],[22,1574,1575],{},"These are any commands that you want to run at\nthe end of the experiment, after all runs have completed.",[22,1577,1578,1581],{},[35,1579,1580],{},"Time limit:"," This lets you set a fixed maximum length for each run. If you\ndon’t want to set any maximum, but want the length of the runs to be controlled\nby the stop condition instead, enter 0.",[22,1583,1584,1587],{},[35,1585,1586],{},"Note on pre and post experiment commands:"," These commands execute outside of\nthe actual runs, so they cannot affect the global variables or agents in the\nmodel (use the Setup commands and Post run commands for that). If you use\nprimitives like file-open or the CSV extension in the pre or post experiment\ncommands, their internal state will not carry over into the runs and errors will\nlikely occur if used there.",[201,1589,1592],{"id":1590,"className":1591},"importing-and-exporting",[14],[16,1593,123],{"className":1594,"href":120},[19],[22,1596,1597],{},[180,1598,182],{},[22,1600,1601],{},"Although experiments are tied to a model and are usually saved along with a\nmodel, they can also be imported and exported individually to xml files. This\nallows you to easily transfer experiments between models, and also prepares\nexperiments to be run headlessly. After an experiment is exported to an xml file,\nit can be edited by hand or by another script, not just within NetLogo.",[22,1603,1604,1605,1608],{},"The ",[35,1606,1607],{},"Import"," button allows you to import experiments from an xml file. The\nselected files may contain any number of experiments, but any experiments that\nare formatted incorrectly will not be loaded. If you load an experiment that has\nthe same name as an existing experiment, the name of the loaded experiment will\nbe slightly altered to ensure that experiment names remain unique.",[22,1610,1604,1611,1614],{},[35,1612,1613],{},"Export"," button allows you to export experiments to an xml file. Any number\nof experiments may be selected for export at once, but they will all be combined\ninto a single output file.",[201,1616,1619],{"id":1617,"className":1618},"special-primitives-for-behaviorspace-experiments",[14],[16,1620,1623],{"className":1621,"href":1622},[19],"#special-primitives-for-behaviorspace-experiments","Special primitives for BehaviorSpace experiments",[22,1625,1626,1627,791,1634,1642],{},"Currently there are only two, ",[303,1628,1629],{"displayText":1476,"permalink":1476},[16,1630,1476],{"href":1631,"className":1632,"dataDisplayText":1476,"rel":1633,"target":314,"title":1476},"/dictionary#behaviorspace-run-number",[311],[313],[303,1635,1637],{"displayText":1636,"permalink":1636},"behaviorspace-experiment-name",[16,1638,1636],{"href":1639,"className":1640,"dataDisplayText":1636,"rel":1641,"target":314,"title":1636},"/dictionary#behaviorspace-experiment-name",[311],[313],". The run number reported by the former\nprimitive matches the run number used in the results files generated by\nBehaviorSpace. The experiment name reported by the latter matches the name with\nwhich the experiment was set up.",[201,1644,1647],{"id":1645,"className":1646},"running-an-experiment",[14],[16,1648,1651],{"className":1649,"href":1650},[19],"#running-an-experiment","Running an experiment",[22,1653,1654],{},"When you’re done setting up your experiment, press the “OK” button, followed by\nthe “Run” button. A dialog titled “Run Options” will appear.",[534,1656,1659],{"id":1657,"className":1658},"run-options-formats",[14],[16,1660,1663],{"className":1661,"href":1662},[19],"#run-options-formats","Run options: formats",[22,1665,1666,1667,333,1670,1673,1674,333,1676,1678,1679,1682,1683,1686,1687,333,1689,1691,1692,791,1695,1697,1698,1700,1701,1703],{},"The “Run Options” dialog lets you choose to create data output files in two primary formats, ",[35,1668,1669],{},"Table\noutput",[35,1671,1672],{},"Spreadsheet output",". If one or both of these formats is selected, you can\nalso select the supplementary ",[35,1675,114],{},[35,1677,105],{},". Each file path can be entered in its\ncorresponding text box, or using the *",[180,1680,1681],{},"Browse…"," button to select a file path using the system\nfile dialog. If you don’t wish to use a particular format, you can clear the file text or click\nthe ",[35,1684,1685],{},"Disable"," button and it’ll be cleared for you.\nThe frequency of data collection is determined by the settings of the\n",[35,1688,1412],{},[35,1690,78],{}," options. For ",[35,1693,1694],{},"Table output",[35,1696,1672],{}," formats, the initial state of the system is recorded, after the ",[35,1699,1443],{},"\ncommands run but before the ",[35,1702,1489],{}," commands run for the first time.",[22,1705,1706],{},"After selecting your output formats, BehaviorSpace will prompt you for the name\nof a file to save the results to. The default name ends in “.csv”. You can\nchange it to any name you want, but don’t leave off the “.csv” part; that\nindicates the file is a Comma Separated Values (CSV) file. This is a plain-text\ndata format that is readable by any text editor as well as by most popular\nspreadsheet and database programs.",[22,1708,1709],{},"All four output formats will include a header section that has rows for 1) the NetLogo app\nversion used, 2) the name of the NetLogo model file used, 3) the name of the BehaviorSpace\nexperiment used, 4) the date and time at the start, and 5) the dimensions of the world used at\nthe start.",[534,1711,1714],{"id":1712,"className":1713},"table-output",[14],[16,1715,1694],{"className":1716,"href":1717},[19],"#table-output",[22,1719,1720,1721,1724,1725,1734,1735,1738,1739,1741],{},"This format lists each measurement step from each run in its own row, with each\nmetric in a separate column.  The measurement rows will appear in the order they happen in real\ntime.  With the ",[35,1722,1723],{},"parallel runs"," option the measurements may appear in a mixed order as\nmultiple runs can happen simultaneously.  To help identify which run a row belongs to, there is\na column titled ",[394,1726,435,1727,402,1731,596],{},[397,1728,1730],{"className":1729},[400,1450],"run",[397,1732,410],{"className":1733},[400,1458]," along with a column titled ",[394,1736,1737],{},"[step]"," that indicates the measurement\nnumber for that run.  Each row also includes the values used for the variables during initial\nsetup of the run; these values are the same for each of that run’s measurement rows.  ",[35,1740,1669],{}," data is written to the file as each run completes.",[22,1743,1604,1744,1746],{},[35,1745,1694],{}," format is good to use when you want to further process the data using another\ntool, such as importing into a database, a statistics package, or a spreadsheet application for\nanalysis.",[22,1748,1749,1750,1752],{},"In the ",[35,1751,1694],{}," sample image below, the header section is in red, the run number and step\ncolumns are in blue, the initial values of the variables for the run are in green, and the\nmeasurement metric data is in purple.",[22,1754,1755],{},[1756,1757],"img",{"alt":1758,"className":1759,"src":1761,"width":1762,"height":1763,"style":1764},"behaviorspace/bs-table.png",[1760],"netlogo-image","/_content/images/behaviorspace/bs-table.png",1079,339,{"aspectRatio":1765},"1079/339",[534,1767,1770],{"id":1768,"className":1769},"spreadsheet-output",[14],[16,1771,1672],{"className":1772,"href":1773},[19],"#spreadsheet-output",[22,1775,1776,1777,1780,1781,1789,1790,1800],{},"This format lists the step numbers as well as each metric for each run in a\nseparate column, with each row corresponding to a measurement step that applies to all runs. If one\nrun finishes before another due to a ",[35,1778,1779],{},"stop condition",", then its step numbers after that\npoint will be blank. At the top of the file there is a ",[394,1782,435,1783,402,1786,596],{},[397,1784,1730],{"className":1785},[400,1450],[397,1787,410],{"className":1788},[400,1458]," row that will have the run\nnumber repeated for each metric at the top of the file.  After that are rows for the initial values\ngiven to each variable for the run.  The spreadsheet output also calculates the min, mean, max, and\nfinal values for the step numbers as well as each metric and lists those after the initial values\nbefore the individual run measurements. Then it lists the actual number of steps a run went through\nin a ",[394,1791,435,1792,402,1796,596],{},[397,1793,1795],{"className":1794},[400,1458],"total",[397,1797,1799],{"className":1798},[400,1458],"steps"," row.",[22,1802,1604,1803,1805],{},[35,1804,1672],{}," data makes it easier to quickly compare runs against each other, as they\nwill be aligned vertically when imported into a spreadsheet application.  It can also make\ngenerating comparative graphs of results with initial variable changes across runs easy for the\nsame reason.",[22,1807,1808,1809,1811,1812,1814,1815,1817,1818,1820],{},"It is important to note that ",[35,1810,1672],{}," data is not written to the results file until\nthe experiment finishes. Since the data is stored in memory until the experiment is done, very\nlarge experiments could run out of memory.  You should disable ",[35,1813,1672],{}," unless you\nreally want it.  Also, if anything interrupts the experiment no spreadsheet results will be written.\nPossible sources of interruptions would be runtime errors in the model, running out of memory,\nsystem crashes, or power outages.  For long experiments you may want to also enable ",[35,1816,1694],{},"\nformat as a precaution so that if something happens and you get no ",[35,1819,1672],{}," you’ll\nat least get partial data output.",[22,1822,1749,1823,1825],{},[35,1824,1672],{}," sample image below, the header section is in red, the run number row\nis in blue, the initial values of the variables for the run are in green, the extra calculated\nmetrics are in orange, and the measurement metric data is in purple.",[22,1827,1828],{},[1756,1829],{"alt":1830,"className":1831,"src":1832,"width":1833,"height":1834,"style":1835},"behaviorspace/bs-spreadsheet.png",[1760],"/_content/images/behaviorspace/bs-spreadsheet.png",941,500,{"aspectRatio":1836},"941/500",[534,1838,1841],{"id":1839,"className":1840},"statistics-output",[14],[16,1842,105],{"className":1843,"href":102},[19],[22,1845,1846],{},[180,1847,182],{},[22,1849,1850,1851,1853,1854,1856,1857,1859],{},"You can create a file with the mean and standard deviation of each numeric\nmetric by enabling the ",[35,1852,105],{},". Metrics are the reporters specified\nin the “Measure runs using these reporters as metrics:” box. You must also use the\n",[35,1855,1694],{}," and/or the ",[35,1858,1672],{}," because one of them will used\nto calculate the mean and standard deviation of each numeric\nmetric across repetitions for each step. These calculations are done at the end of\nthe experiment. The statistics are then saved in the specified file.\nIt is important to note that metrics that produce non-numeric values such as\nstrings are not included in the statistics.\nIf the metrics produce lists, the statistics are calculated across elements with\nthe same index for each list.\nStatistics are not calculated for metrics that produce lists that contain non-numeric elements. Also, the type of\nthe measurement must remain constant. For example, statistics are not calculated if a metric\nproduces measurements that can be both lists and numbers. Furthermore, the standard deviation may be “N/A”,\nwhich means that there were two or fewer collected measurements for that step and parameter combination,\nproducing a result that is not well-defined. The experiment must use at least 3 repetitions\nto produce standard deviation values.",[22,1861,1749,1862,1864],{},[35,1863,105],{}," sample image below (creating using the “Red Queen”\nlibrary model), the header section is in red, the parameter\ncombinations are in green, the steps are in blue, and the statistics are in purple.\nStarting with column F, the statistics are the mean of “count frogs”,  the\nstandard deviation of “count frogs”, followed by the same statistics for\n“count snakes”, average-poison, and average-resistance. Column E shows the step,\nand columns A-D show the parameter combination that was used. The statistics\nare calculated across all the repetitions.",[22,1866,1867],{},[1756,1868],{"alt":1869,"className":1870,"src":1871,"width":1762,"height":1763,"style":1872},"behaviorspace/bs-stats.png",[1760],"/_content/images/behaviorspace/bs-stats.png",{"aspectRatio":1765},[534,1874,1877],{"id":1875,"className":1876},"lists-output",[14],[16,1878,114],{"className":1879,"href":111},[19],[22,1881,1882],{},[180,1883,182],{},[22,1885,1886,1887,1889,1890,791,1892,1894,1895,1898],{},"This format is a supplement to the other two primary formats, as opposed to a complete data\ncollection format. If you have any reporters that return a list, you can use the ",[35,1888,114],{},"\nformat to get properly formatted output for those reporters. Data is produced for all\nlist reporters in the “metrics” box. In both ",[35,1891,1672],{},[35,1893,1694],{}," formats, lists returned by reporters will be condensed into a single cell, rather\nthan their elements being spread out with one value per cell. If you need the list values in\nindividual cells, select the ",[35,1896,1897],{},"List output"," format in addition to one or both of the other formats.",[22,1900,1901,1902,1904,1905,1907,1908,1910],{},"Note that the ",[35,1903,114],{}," format, like the ",[35,1906,1672],{}," format, will not contain any\ndata until the experiment is complete. Also note that the ",[35,1909,114],{}," must be used in tandem\nwith another format, it cannot be used on its own.",[22,1912,1749,1913,1915],{},[35,1914,114],{}," sample image below, the header section is in red, the reporter name is in\norange, the run number and step columns are in blue, the initial values of the variables for the run\nare in green, and the expanded list data is in purple. The list data starts in\nrow 7, with the headers (the index into the list, starting from 0) starting in\ncolumn E.",[22,1917,1918],{},[1756,1919],{"alt":1920,"className":1921,"src":1922,"width":1762,"height":1763,"style":1923},"behaviorspace/bs-lists.png",[1760],"/_content/images/behaviorspace/bs-lists.png",{"aspectRatio":1765},[534,1925,1928],{"id":1926,"className":1927},"output-file-changes",[14],[16,1929,159],{"className":1930,"href":156},[19],[22,1932,1933],{},[180,1934,182],{},[26,1936,1937,1940,1943,1974,1981],{},[29,1938,1939],{},"Output files have version numbers.",[29,1941,1942],{},"Spreadsheet output always includes step information.",[29,1944,1945,1946,1964,1965,160],{},"Spreadsheet output column header ",[394,1947,435,1948,402,1952,402,1956,402,1960,596],{},[397,1949,1951],{"className":1950},[400,1458],"initial",[397,1953,1955],{"className":1954},[400,1458],"&",[397,1957,1959],{"className":1958},[400,1458],"final",[397,1961,1963],{"className":1962},[400,1458],"values"," was changed to the more accurate ",[394,1966,435,1967,402,1970,596],{},[397,1968,1959],{"className":1969},[400,1458],[397,1971,1973],{"className":1972},[400,1458],"value",[29,1975,1976,1980],{},[16,1977,1978],{"href":102},[35,1979,105],{}," was added.",[29,1982,1983,1980],{},[16,1984,1985],{"href":111},[35,1986,114],{},[534,1988,1991],{"id":1989,"className":1990},"run-options-update-plots-and-monitors",[14],[16,1992,141],{"className":1993,"href":138},[19],[22,1995,1996,1997,1999,2000,325,2007,315,2014,2021,2022,160],{},"The “Run Options” dialog lets you choose whether to update plots and monitors or not.\nPerformance is better when the box is unchecked.\nNote that ",[180,1998,182],{}," if you begin the experiment with the box unchecked, you will\nnot be able to toggle between enabling and disabling the update plots checkbox in the\n“Running Experiments” dialog. This gives you an even greater performance improvement\nthan was obtained before NetLogo 6.4, when such toggling was possible.\nCheck the box if you you need to export plot data using primitives such as ",[303,2001,2003],{"displayText":2002,"permalink":1347},"export-interface",[16,2004,2002],{"href":1350,"className":2005,"dataDisplayText":2002,"rel":2006,"target":314,"title":2002},[311],[313],[303,2008,2010],{"displayText":2009,"permalink":1347},"export-plot",[16,2011,2009],{"href":1350,"className":2012,"dataDisplayText":2009,"rel":2013,"target":314,"title":2009},[311],[313],[303,2015,2017],{"displayText":2016,"permalink":1347},"export-all-plots",[16,2018,2016],{"href":1350,"className":2019,"dataDisplayText":2016,"rel":2020,"target":314,"title":2016},[311],[313],", and ",[303,2023,2024],{"displayText":1346,"permalink":1347},[16,2025,1346],{"href":1350,"className":2026,"dataDisplayText":1346,"rel":2027,"target":314,"title":1346},[311],[313],[534,2029,2032],{"id":2030,"className":2031},"run-options-parallel-runs",[14],[16,2033,2036],{"className":2034,"href":2035},[19],"#run-options-parallel-runs","Run options: parallel runs",[22,2038,2039,2040,2042,2043,2045],{},"The “Run Options” dialog also lets you select whether you want multiple model runs to happen in parallel, and if so, how\nmany are allowed to be simultaneously active. The default and recommended maximum number of parallel runs are shown\nbelow the text box ",[180,2041,182],{},". Your choice of number of parallel runs\nis remembered from experiment to experiment ",[180,2044,182],{},". Because each additional run\nincreases memory usage we recommend starting with the default number of runs, and then\ntrying more parallel runs if you want. The recommended maximum number of parallel runs is just an estimate, and\nsome users have found that performance is significantly decreased when using the maximum.",[22,2047,2048],{},"There are a few cautions associated with parallel runs.",[22,2050,2051],{},"First, if multiple runs are active, only one of them will be in the “foreground” and cause the view and plots to update.\nThe other runs will happen invisibly in the background.",[22,2053,2054],{},"Second, invisible background runs can’t use primitives that only work in the GUI. For example, a background run can’t\nmake a movie.",[22,2056,2057],{},"Third, since parallel runs progress independently of each other, table format output may contain interleaved,\nout-of-order results. When you analyze your table data, you may wish to sort it by run number first. (Spreadsheet format\noutput is not affected by this issue, since it is not written until the experiment completes or is aborted.)",[22,2059,2060],{},"Fourth, using all available processor cores may make your computer slow to use for other tasks while the experiment is\nrunning or slow to complete runs as contention will build for memory between the runs themselves. If your\nmodel uses a large amount of memory, you may find that reducing the number of runs will enable the runs to\ncomplete in less time overall since work will be done by the system keeping the memory for each run available. A good\nrule of thumb might be to start with the default value shown in the “Run Options”, and bump\nup or down from there to see where your “sweet spot” is for least time to complete all runs.",[22,2062,2063,2064,2068],{},"Fifth, doing runs in parallel will multiply the experiment’s memory requirements accordingly. You may need to increase\nNetLogo’s memory ceiling (see ",[16,2065,2067],{"href":2066},"/faq#how-big-can-my-model-be-how-many-turtles-patches-procedures-buttons-and-so-on-can-my-model-contain","this FAQ\nentry",").\nBy default NetLogo will not exceed 50% of your system’s memory.",[22,2070,2071,2072,2074,2075,2094,2095,477,2098,2101,2102,2104],{},"Sixth, each parallel run will get its own world for the model to run in.  This world is ",[180,2073,1506],{}," cleared automatically by\nBehaviorSpace if a parallel run gets re-used for another repetition, which happens quite frequently.  This means, for\nexample, if you do ",[394,2076,2077,402,2081,1367,2084,402,2088,402,2091,1380],{},[397,2078,2080],{"className":2079},[400,1450],"ask",[397,2082,1362],{"className":2083},[400,401],[397,2085,2087],{"className":2086},[400,1450],"set",[397,2089,1371],{"className":2090},[400,401],[397,2092,1379],{"className":2093},[400,1378]," in one run and do not use ",[394,2096,2097],{},"clear-all",[394,2099,2100],{},"clear-patches"," in the\nsetup commands of the next run, then the patches will all still be red.  In general using ",[394,2103,2097],{}," before each run\nwould be a best practice, but there are times when you might not want to, such as loading data from a file that doesn’t\nchange run-to-run.  Just be careful with whatever data is not cleared out.",[22,2106,2107,2108,2117,2118,2120,2121,160],{},"Seventh, there is a very, very small chance that at startup multiple parallel runs could wind up with the same random\nnumber generator state if they startup at the exact same moment in time.  This means the runs would produce identical\noutput for all random operations and likely the same results.  This would have a chance to happen when running on very\nfast processors and with lots of parallel runs at once.  If you need to make sure this doesn’t impact your results, you\ncan add ",[394,2109,2110,402,2113],{},[397,2111,359],{"className":2112},[400,1450],[397,2114,2116],{"className":2115},[400,401],"new-seed"," to your setup commands to re-generate a new unique random seed for each run.  In fact,\nstoring the ",[394,2119,2116],{}," as a global variable so you can output it with the rest of your results would let you re-run a\nrun later on by manually using that value to set the ",[394,2122,359],{},[534,2124,2127],{"id":2125,"className":2126},"observing-runs",[14],[16,2128,2131],{"className":2129,"href":2130},[19],"#observing-runs","Observing runs",[22,2133,2134],{},"After you complete the “Run Options” dialog, another dialog will appear, titled\n“Running Experiment”. In this dialog, you’ll see a progress report of how many\nruns have been completed so far and how much time has passed. If you entered any\nreporters for measuring the runs, and if you left the “Run metrics every step”\nbox checked, then you’ll see a plot of how they vary over the course of each run.",[22,2136,2137,2138,160],{},"You can also watch the runs in the main NetLogo window. (If the “Running\nExperiment” dialog is in the way, just move it to a different place on the\nscreen.) If you don’t need to see the plots update, then use the checkboxes in\nthe “Running Experiment” dialog to turn the updating off. This will make the\nexperiment go faster. However, if you already disabled updating plots and monitors\nin the “Run Options” dialog, this checkbox will be disabled ",[180,2139,182],{},[22,2141,2142,2143,2145],{},"If you want to stop your experiment before it’s finished, you have two options.\nTo stop the experiment after the current runs have completed and save your progress\nfor later, press the “Pause” button ",[180,2144,182],{},". To stop the experiment immediately without\nwaiting for the current runs to complete, press the “Abort” button. Any output\ngenerated so far will still be saved, but pressing “Abort” can lead to fragmented\ndata, so aborted experiments cannot be resumed.",[22,2147,2148],{},"When all the runs have finished, the experiment is complete. Spreadsheet, Lists and Stats\noutput are created at this point.",[534,2150,2153],{"id":2151,"className":2152},"paused-experiments",[14],[16,2154,132],{"className":2155,"href":129},[19],[22,2157,2158],{},[180,2159,182],{},[22,2161,2162],{},"Paused experiments will appear in the BehaviorSpace window marked with “In Progress”.\nTo resume an experiment where you paused it, select it and press the “Run” button.\nTo reset a paused experiment to its initial state, select it and press the “Abort”\nbutton.",[22,2164,2165,2166,477,2169,2172,2173,2176],{},"If you are using Spreadsheet output a file containing the data up until the experiment is\npaused will be written. This data will be used as part of the creation of a complete\nSpreadsheet file. Note that if your experiment is writing to its own external file you\nmay need to make some changes in order for pausing to work correctly. For example you\nshould use ",[394,2167,2168],{},"file-flush",[394,2170,2171],{},"file-close"," at the end of each run to ensure all the data\nis written to the file, and should do ",[394,2174,2175],{},"file-open"," before doing any writing during a\nrun. When opening a file in writing mode, all new data will be appended to the end\nof the original file, which is probably the behavior you want.",[22,2178,2179],{},"Note that moving or deleting output files before resuming a paused experiment will\ncause an error. Outputting new experiment data to a file associated with an existing\npaused experiment may also ause an error when that experiment is resumed.",[184,2181,2184],{"id":2182,"className":2183},"advanced-usage",[14],[16,2185,55],{"className":2186,"href":52},[19],[201,2188,2191],{"id":2189,"className":2190},"running-from-the-command-line",[14],[16,2192,2195],{"className":2193,"href":2194},[19],"#running-from-the-command-line","Running from the command line",[22,2197,2198],{},"It is possible to run BehaviorSpace experiments “headless”, that is, from the\ncommand line, without any graphical user interface (GUI). This is useful for\nautomating runs on a single machine or a cluster of machines.",[22,2200,2201],{},"No Java programming is required. Experiment setups can be created in the GUI and\nthen run later from the command line, or, if you prefer, you can create or edit\nexperiment setups directly using XML.",[534,2203,2206],{"id":2204,"className":2205},"how-to-use-it",[14],[16,2207,2210],{"className":2208,"href":2209},[19],"#how-to-use-it","How to use it",[22,2212,2213,2214,2217,2218,2221,2222,2224],{},"Run NetLogo using the ",[394,2215,2216],{},"NetLogo_Console"," app with the ",[394,2219,2220],{},"--headless"," command line argument.\nThis is found in the root directory of your NetLogo installation. The\n",[394,2223,2216],{}," script supports the following arguments:",[26,2226,2227,2232,2245,2257,2270,2286,2299,2315,2331,2372,2378,2390,2401,2412],{},[29,2228,2229,2231],{},[394,2230,2220],{},": Enable headless mode to run a BehaviorSpace experiment (required, will\nopen the graphical interface otherwise).",[29,2233,2234,2244],{},[394,2235,2236,402,2240],{},[397,2237,2239],{"className":2238},[400,1458],"--model",[397,2241,2243],{"className":2242},[400,1458],"\u003Cpath>",": pathname of model to open\n(required)",[29,2246,2247,2256],{},[394,2248,2249,402,2253],{},[397,2250,2252],{"className":2251},[400,1458],"--setup-file",[397,2254,2243],{"className":2255},[400,1458],": read experiment setups from this file instead of the\nmodel file",[29,2258,2259,2269],{},[394,2260,2261,402,2265],{},[397,2262,2264],{"className":2263},[400,1458],"--experiment",[397,2266,2268],{"className":2267},[400,1458],"\u003Cname>",": name of experiment to run",[29,2271,2272,2281,2282,2285],{},[394,2273,2274,402,2278],{},[397,2275,2277],{"className":2276},[400,1458],"--table",[397,2279,2243],{"className":2280},[400,1458],": pathname to send table output to (or ",[394,2283,2284],{},"-"," for standard\noutput)",[29,2287,2288,2281,2297,2285],{},[394,2289,2290,402,2294],{},[397,2291,2293],{"className":2292},[400,1458],"--spreadsheet",[397,2295,2243],{"className":2296},[400,1458],[394,2298,2284],{},[29,2300,2301,2310,2311,477,2313],{},[394,2302,2303,402,2307],{},[397,2304,2306],{"className":2305},[400,1458],"--lists",[397,2308,2243],{"className":2309},[400,1458],": pathname to send lists output to (or - for standard output),\ncannot be used without ",[394,2312,2277],{},[394,2314,2293],{},[29,2316,2317,2326,2327,477,2329],{},[394,2318,2319,402,2323],{},[397,2320,2322],{"className":2321},[400,1458],"--stats",[397,2324,2243],{"className":2325},[400,1458],": pathname to send statistics output to (or - for standard output)\ncannot be used without ",[394,2328,2277],{},[394,2330,2293],{},[29,2332,2333,2343,2344,160],{},[394,2334,2335,402,2339],{},[397,2336,2338],{"className":2337},[400,1458],"--threads",[397,2340,2342],{"className":2341},[400,1458],"\u003Cnumber>",": use this many threads to do model runs in parallel, or 1\nto disable parallel runs. defaults to ",[394,2345,2346,2350,2351,402,2355,402,2359,402,2363,402,2367,2371],{},[397,2347,2349],{"className":2348},[400,401],"floor","(",[397,2352,2354],{"className":2353},[400,410],"0.75",[397,2356,2358],{"className":2357},[400,401],"*",[397,2360,2362],{"className":2361},[400,1458],"\u003Cnumber",[397,2364,2366],{"className":2365},[400,401],"of",[397,2368,2370],{"className":2369},[400,1458],"processors>",")",[29,2373,2374,2377],{},[394,2375,2376],{},"--update-plots",": enable plot updates. Include this if you want to export plot data,\nor exclude it for better performance.",[29,2379,2380,2389],{},[394,2381,2382,402,2386],{},[397,2383,2385],{"className":2384},[400,1458],"--min-pxcor",[397,2387,2342],{"className":2388},[400,1458],": override world size setting in model file",[29,2391,2392,2389],{},[394,2393,2394,402,2398],{},[397,2395,2397],{"className":2396},[400,1458],"--max-pxcor",[397,2399,2342],{"className":2400},[400,1458],[29,2402,2403,2389],{},[394,2404,2405,402,2409],{},[397,2406,2408],{"className":2407},[400,1458],"--min-pycor",[397,2410,2342],{"className":2411},[400,1458],[29,2413,2414,2389],{},[394,2415,2416,402,2420],{},[397,2417,2419],{"className":2418},[400,1458],"--max-pycor",[397,2421,2342],{"className":2422},[400,1458],[22,2424,2425,2427,2428,2430,2431,2433,2434,477,2436,2438],{},[394,2426,2239],{}," is required. If you don’t specify ",[394,2429,2264],{},", you must specify\n",[394,2432,2252],{},". By default no results are generated, so you’ll usually want to\nspecify either ",[394,2435,2277],{},[394,2437,2293],{},", or both. If you specify any of the\nworld dimensions, you must specify all four.",[22,2440,2441,2442,2445,2446,2449,2450,2452,2453,2456,2457,2459],{},"Note that prior to NetLogo 6.3.0 the directions were to use ",[394,2443,2444],{},"netlogo-headless.sh","\n(or ",[394,2447,2448],{},"netlogo-headless.bat"," on Windows) along with a separate installation of Java of the\nsystem to run BehaviorSpace experiments.  The ",[394,2451,2444],{}," script is still\nincluded with NetLogo and can still be used as before, which might be preferrable in\nserver environments where the installed Java version is strictly controlled.  But the\nrecommended method for on a personal computer is to use the ",[394,2454,2455],{},"NetLogo_Console --headless"," app.  Because ",[394,2458,2216],{}," uses the Java that comes bundled with NetLogo it\nrequires no extra software installation or configuration.",[534,2461,2464],{"id":2462,"className":2463},"examples",[14],[16,2465,2468],{"className":2466,"href":2467},[19],"#examples","Examples",[22,2470,2471,2472,2474,2475,2493],{},"It is easiest if you create your experiment setup ahead of time in the GUI, so\nit is saved as part of the model. To run an experiment setup saved in a model,\nhere is an example command line, run from the NetLogo 7.0.4 installation\nfolder so the paths to the ",[394,2473,2216],{}," app and ",[394,2476,2477,402,2481,402,2485,402,2489],{},[397,2478,2480],{"className":2479},[400,1458],"Wolf",[397,2482,2484],{"className":2483},[400,1458],"Sheep",[397,2486,2488],{"className":2487},[400,1458],"Simple",[397,2490,2492],{"className":2491},[400,1458],"5.nlogo","\nmodel are correct.",[22,2495,2496,2497,2500,2501,2504],{},"The below commands should work as-is in a terminal on macOS and Linux.  On Windows in the\nCommand Prompt you can use ",[394,2498,2499],{},"^"," instead of ",[394,2502,2503],{},"\\"," to break the command across multiple lines,\nor just put the command on a single line.",[2506,2507,2513],"pre",{"className":2508,"code":2510,"language":2511,"meta":2512},[2509],"language-sh","./NetLogo_Console --headless \\\n  --model \"models/IABM Textbook/chapter 4/Wolf Sheep Simple 5.nlogo\" \\\n  --experiment \"Wolf Sheep Simple model analysis\" \\\n  --table -\n","sh","",[394,2514,2510],{"__ignoreMap":2512},[22,2516,2517,2518,2520],{},"After the named experiment has run, the results are sent to standard output in\ntable format, as CSV. ",[394,2519,2284],{}," is how you specify standard output instead of output\nto a file.",[22,2522,2523,2524,2527],{},"When running NetLogo headless, it forces the system property ",[394,2525,2526],{},"java.awt.headless","\nto be true. This tells Java to run in headless mode, allowing NetLogo to run on\nmachines when a graphical display is not available.",[22,2529,2530,2531,2533],{},"The required ",[394,2532,2239],{}," argument is used to specify the model file you want to\nopen.",[22,2535,1604,2536,2538],{},[394,2537,2264],{}," argument is used to specify the name of the experiment you\nwant to run. (At the time you create an experiment setup in the GUI, you assign\nit a name.)",[22,2540,2541],{},"Here’s another example that shows some additional, optional arguments:",[2506,2543,2546],{"className":2544,"code":2545,"language":2511,"meta":2512},[2509],"./NetLogo_Console --headless \\\n  --model \"models/IABM Textbook/chapter 4/Wolf Sheep Simple 5.nlogo\" \\\n  --experiment \"Wolf Sheep Simple model analysis\" \\\n  --max-pxcor 5 \\\n  --min-pxcor -5 \\\n  --max-pycor 5 \\\n  --min-pycor -5\n",[394,2547,2545],{"__ignoreMap":2512},[22,2549,2550,2551,315,2553,2555],{},"Note the use of the optional ",[394,2552,2397],{},[394,2554,2419],{},", etc. arguments to\nspecify a different world size than that saved in the model. (It’s also possible\nfor the experiment setup to specify values for the world dimensions; if they are\nspecified by the experiment setup, then there is no need to specify them on the\ncommand line.)",[22,2557,2558,2559,2561,2562,2564],{},"Since neither ",[394,2560,2277],{}," nor ",[394,2563,2293],{}," is specified, no results will be\ngenerated. This is useful if the experiment setup generates all the output you\nneed by some other means, such as exporting world files or writing to a text\nfile.",[22,2566,2567],{},"Yet another example:",[2506,2569,2572],{"className":2570,"code":2571,"language":2511,"meta":2512},[2509],"./NetLogo_Console --headless \\\n  --model \"models/IABM Textbook/chapter 4/Wolf Sheep Simple 5.nlogo\" \\\n  --experiment \"Wolf Sheep Simple model analysis\" \\\n  --table wsp5-table-output.csv \\\n  --spreadsheet wsp5-spreadsheet-output.csv \\\n  --lists wsp5-lists-output.csv \\\n  --stats wsp5-stats-output.csv\n",[394,2573,2571],{"__ignoreMap":2512},[22,2575,2576,2577,2586,2587,2589],{},"The optional ",[394,2578,2579,402,2582],{},[397,2580,2277],{"className":2581},[400,1458],[397,2583,2585],{"className":2584},[400,1458],"\u003Cfilename>"," argument specifies that output should be\ngenerated in a table format and written to the given file as CSV data. If ",[394,2588,2284],{}," is\nspecified as the filename, than the output is sent to the standard system output\nstream. Table data is written as it is generated, with each complete run.",[22,2591,2576,2592,2600,2601,2603],{},[394,2593,2594,402,2597],{},[397,2595,2293],{"className":2596},[400,1458],[397,2598,2585],{"className":2599},[400,1458]," argument specifies that spreadsheet\noutput should be generated and written to the given file as CSV data. If ",[394,2602,2284],{}," is\nspecified as the filename, than the output is sent to the standard system output\nstream. Spreadsheet data is not written out until all runs in the experiment are\nfinished.",[22,2605,2576,2606,2614,2615,2617],{},[394,2607,2608,402,2611],{},[397,2609,2306],{"className":2610},[400,1458],[397,2612,2585],{"className":2613},[400,1458]," argument specifies that lists\noutput should be generated and written to the given file as CSV data. If ",[394,2616,2284],{}," is\nspecified as the filename, than the output is sent to the standard system output\nstream. Lists data is not written out until all runs in the experiment are\nfinished.",[22,2619,2576,2620,2628,2629,2631],{},[394,2621,2622,402,2625],{},[397,2623,2322],{"className":2624},[400,1458],[397,2626,2585],{"className":2627},[400,1458]," argument specifies that stats\noutput should be generated and written to the given file as CSV data. If ",[394,2630,2284],{}," is\nspecified as the filename, than the output is sent to the standard system output\nstream. Stats data is not written out until all runs in the experiment are\nfinished.",[22,2633,2634,2635,333,2637,2639,2640,477,2642,2644,2645,477,2647,2649],{},"Note that it is legal to specify both ",[394,2636,2277],{},[394,2638,2293],{},", and if you\ndo, both kinds of output file will be generated. If you use ",[394,2641,2306],{},[394,2643,2322],{},"\nat least one of the ",[394,2646,2277],{},[394,2648,2293],{},"  options must be used.",[22,2651,2652,2653,2656],{},"Here is an example that shows how to run an experiment setup which is\nstored in a separate XML file, instead of in the model file (see below for more\ninformation on the XML file format).  This assumes you’ve created a\n",[394,2654,2655],{},"my-wsp-setups.xml"," file with a `My WSP Exploration” experiment and placed it\nin your home directory. The most straight-forward way to create a setup file\nis to create an experiment using BehaviorSpace in the NetLogo GUI and use the\n**Export ** option.",[2506,2658,2661],{"className":2659,"code":2660,"language":2511,"meta":2512},[2509],"./NetLogo_Console --headless \\\n  --model \"models/IABM Textbook/chapter 4/Wolf Sheep Simple 5.nlogo\" \\\n  --setup-file ~/my-wsp-setups.xml \\\n  --experiment \"My WSP Exploration\"\n",[394,2662,2660],{"__ignoreMap":2512},[22,2664,2665,2666,2668],{},"If the XML file contains more than one experiment setup, it is necessary to use\nthe ",[394,2667,2264],{}," argument to specify the name of the setup to use.",[22,2670,2671,2672,2675],{},"In order to run a NetLogo 3D experiment, run headless with the ",[394,2673,2674],{},"--3D"," argument,\nfor example:",[2506,2677,2680],{"className":2678,"code":2679,"language":2511,"meta":2512},[2509],"./NetLogo_Console --headless \\\n  --3D \\\n  --model \"models/3D/Sample Models/GasLab/GasLab Free Gas 3D.nlogo3d\" \\\n  --experiment \"100 runs\" \\\n  --table -\n",[394,2681,2679],{"__ignoreMap":2512},[22,2683,2684,2685,333,2694,160],{},"Note that you should supply a 3D model and there are also 3D arguments\n",[394,2686,2687,402,2691],{},[397,2688,2690],{"className":2689},[400,1458],"--max-pzcor",[397,2692,2342],{"className":2693},[400,1458],[394,2695,2696,402,2700],{},[397,2697,2699],{"className":2698},[400,1458],"--min-pzcor",[397,2701,2342],{"className":2702},[400,1458],[22,2704,2705],{},"The next section has information on how to create standalone experiment setup\nfiles using XML.",[201,2707,2710],{"id":2708,"className":2709},"setting-up-experiments-in-xml",[14],[16,2711,2714],{"className":2712,"href":2713},[19],"#setting-up-experiments-in-xml","Setting up experiments in XML",[22,2716,2717],{},"We don’t yet have detailed documentation on authoring experiment setups in XML,\nbut if you already have some familiarity with XML, then the following pointers\nmay be enough to get you started.",[22,2719,2720,2721,2724],{},"The structure of BehaviorSpace experiment setups in XML is determined by a\nDocument Type Definition (DTD) file. The DTD is stored in NetLogo.jar, as\n",[394,2722,2723],{},"system/behaviorspace.dtd",". (JAR files are also zip files, so you can extract\nthe DTD from the JAR using Java’s “jar” utility or with any program that\nunderstands zip format.)",[22,2726,2727,2728,2730,2731,2734],{},"The easiest way to learn what setups look like in XML, though, is to author a\nfew of them in BehaviorSpace’s GUI, save the model, export them ",[180,2729,182],{}," and then examine the\nresulting .xml file(s) in a text editor. The experiment setups can also be found\ntowards the end of the .nlogo file, in a section that begins and ends with a\n",[394,2732,2733],{},"experiments"," tag. Example:",[2506,2736,2741],{"className":2737,"code":2739,"language":2740,"meta":2512},[2738],"language-xml","\u003C?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\u003C!DOCTYPE experiments SYSTEM \"behaviorspace.dtd\">\n\u003Cexperiments>\n  \u003Cexperiment name=\"My WSP Exploration\" repetitions=\"5\" runMetricsEveryStep=\"false\">\n    \u003Csetup>setup\u003C/setup>\n    \u003Cgo>go\u003C/go>\n    \u003CtimeLimit steps=\"2000\"/>\n    \u003Cmetric>count wolves\u003C/metric>\n    \u003Cmetric>count sheep\u003C/metric>\n    \u003Cmetric>sum [grass-amount] of patches\u003C/metric>\n    \u003CenumeratedValueSet variable=\"energy-gain-from-grass\">\n      \u003Cvalue value=\"2\"/>\n    \u003C/enumeratedValueSet>\n    \u003CsteppedValueSet variable=\"number-of-wolves\" first=\"5\" step=\"1\" last=\"15\"/>\n    \u003CenumeratedValueSet variable=\"movement-cost\">\n      \u003Cvalue value=\"0.5\"/>\n    \u003C/enumeratedValueSet>\n    \u003CenumeratedValueSet variable=\"energy-gain-from-sheep\">\n      \u003Cvalue value=\"5\"/>\n    \u003C/enumeratedValueSet>\n    \u003CenumeratedValueSet variable=\"number-of-sheep\">\n      \u003Cvalue value=\"500\"/>\n    \u003C/enumeratedValueSet>\n    \u003CenumeratedValueSet variable=\"grass-regrowth-rate\">\n      \u003Cvalue value=\"0.3\"/>\n    \u003C/enumeratedValueSet>\n  \u003C/experiment>\n\u003C/experiments>\n","xml",[394,2742,2739],{"__ignoreMap":2512},[22,2744,2745,2746,2748],{},"In this example, only one experiment setup is given, but you can put as many as\nyou want between the beginning and ending ",[394,2747,2733],{}," tags.",[22,2750,2751],{},"Between looking at the DTD, and looking at examples you create in the GUI, it\nwill hopefully be apparent how to use the tags to specify different kind of\nexperiments. The DTD specifies which tags are required and which are optional,\nwhich may be repeated and which may not, and so forth.",[22,2753,2754,2755,2757],{},"If you want to create a setup file for NetLogo 6.3.0 and earlier versions for\nwhich ",[35,2756,1613],{}," is not available you need to know that in a model file the XML for\nexperiment setups does not begin with any XML headers, because the not whole file\nis XML, only part of it.\nTherefore if you manually create a separate file for experiment setups, the\nextension on the file should be .xml not .nlogo, and you’ll need to begin the\nfile with proper XML headers, as follows:",[2506,2759,2762],{"className":2760,"code":2761,"language":2740,"meta":2512},[2738],"\u003C?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\u003C!DOCTYPE experiments SYSTEM \"behaviorspace.dtd\">\n",[394,2763,2761],{"__ignoreMap":2512},[22,2765,2766,2767,2770,2771,160],{},"The second line must be included exactly as shown. In the first line, you may\nspecify a different encoding than ",[394,2768,2769],{},"UTF-8",", such as ",[394,2772,2773],{},"ISO-8859-1",[201,2775,2778],{"id":2776,"className":2777},"adjusting-jvm-parameters",[14],[16,2779,2782],{"className":2780,"href":2781},[19],"#adjusting-jvm-parameters","Adjusting JVM Parameters",[22,2784,2785,2786,2789],{},"Opening the NetLogo Headless launcher script will show the options used to\nlaunch java when running NetLogo Headless. You can adjust various JVM parameters\nin this script. You may also pass in Java properties starting with ",[394,2787,2788],{},"-D"," to the\nlauncher.",[22,2791,2792,2793,160],{},"NetLogo allocates a maximum of half your total system memory for running your model as it is needed.  If you want to set\na maximum amount of memory for BehaviorSpace to use you can use ",[16,2794,2795,2796,2799],{"href":2066},"the ",[394,2797,2798],{},"-Xmx"," setting to specify a particular heap\nsize",[22,2801,2802,2803,2806],{},"Note the use of ",[394,2804,2805],{},"-Dfile.encoding=UTF-8",". This forces all file I/O to use UTF-8\nencoding. Doing so ensures that NetLogo can load all models consistently, and\nthat file-* primitives work consistently on all platforms, including models\ncontaining Unicode characters.",[201,2808,2811],{"id":2809,"className":2810},"controlling-api",[14],[16,2812,2815],{"className":2813,"href":2814},[19],"#controlling-api","Controlling API",[22,2817,2818,2819,2823],{},"If BehaviorSpace is not sufficient for your needs, a possible alternative is to\nuse our Controlling API, which lets you write Java code that controls NetLogo.\nThe API lets you run BehaviorSpace experiments from Java code, or, you can write\ncustom code that controls NetLogo more directly to do BehaviorSpace-like things.\nSee the ",[16,2820,2822],{"href":2821},"controlling","Controlling"," section of the User Manual for further\ndetails on both possibilities.",{"title":2512,"searchDepth":2825,"depth":2826,"links":2827},5,3,[2828,2832,2855],{"id":186,"depth":2829,"text":37,"children":2830},2,[2831],{"id":203,"depth":2826,"text":209},{"id":236,"depth":2829,"text":46,"children":2833},[2834,2835,2841,2842,2843],{"id":246,"depth":2826,"text":252},{"id":275,"depth":2826,"text":169,"children":2836},[2837,2839,2840],{"id":536,"depth":2838,"text":224},4,{"id":772,"depth":2838,"text":69},{"id":1394,"depth":2838,"text":78},{"id":1590,"depth":2826,"text":123},{"id":1617,"depth":2826,"text":1623},{"id":1645,"depth":2826,"text":1651,"children":2844},[2845,2846,2847,2848,2849,2850,2851,2852,2853,2854],{"id":1657,"depth":2838,"text":1663},{"id":1712,"depth":2838,"text":1694},{"id":1768,"depth":2838,"text":1672},{"id":1839,"depth":2838,"text":105},{"id":1875,"depth":2838,"text":114},{"id":1926,"depth":2838,"text":159},{"id":1989,"depth":2838,"text":141},{"id":2030,"depth":2838,"text":2036},{"id":2125,"depth":2838,"text":2131},{"id":2151,"depth":2838,"text":132},{"id":2182,"depth":2829,"text":55,"children":2856},[2857,2861,2862,2863],{"id":2189,"depth":2826,"text":2195,"children":2858},[2859,2860],{"id":2204,"depth":2838,"text":2210},{"id":2462,"depth":2838,"text":2468},{"id":2708,"depth":2826,"text":2714},{"id":2776,"depth":2826,"text":2782},{"id":2809,"depth":2826,"text":2815},"BehaviorSpace is a software tool integrated with NetLogo that allows you to perform experiments with models.","md",{"source":2867,"metadataOutputPath":2868,"projectConfig":2869,"language":2876,"inheritFrom":2885,"output":2884,"version":2870,"keywords":2886,"tags":2888,"icon":2889,"assetsRoot":2890},"autogen/behaviorspace.md","content/behaviorspace.metadata.yaml",{"version":2870,"projectRoot":160,"scanRoot":2871,"outputRoot":2872,"defaults":2873,"engine":2879,"partials":2880,"dedupeIdenticalDiskWrites":2884},"7.0.4","autogen","content",{"inheritFrom":2874,"language":2876,"output":2877,"extension":2865,"title":2878,"version":2870},[2875],0,"en",false,"NetLogo User Manual","handlebars",{"directoryPaths":2881,"extensions":2882},[160],[2883,2865],"mustache",true,[2875],[5,2887],"NetLogo",[5],"i-lucide-grid-3x3","/home/runner/work/Helio/Helio/apps/docs/autogen","/behaviorspace",{"title":5,"description":2864},"behaviorspace","RLDO5dZh8v-KnlYzilwwqon8k1tR5AoaWKM5GZSscMg",[2896,2901],{"title":2897,"path":2898,"stem":2899,"description":2900},"Array Extension Dictionary: to-list","/array/to-list","array/to-list","Documentation for the to-list primitive.",{"title":2902,"path":2903,"stem":2904,"description":2905},"Bitmap Extension","/bitmap","bitmap","Documentation for the Bitmap extension.",1777657789166]