[{"data":1,"prerenderedAt":476},["ShallowReactive",2],{"/mathematica":3,"/mathematica-surround":465},{"id":4,"title":5,"body":6,"description":431,"extension":432,"meta":433,"navigation":451,"path":461,"seo":462,"stem":463,"__hash__":464},"content/mathematica.md","Mathematica Link",{"type":7,"value":8,"toc":417},"minimark",[9,21,25,28,31,34,44,99,107,110,127,134,137,164,167,174,177,184,193,199,215,222,228,251,267,322,332,358,361,368,385,392,399,406,409],[10,11,15],"h1",{"id":12,"className":13},"mathematica-link",[14],"section-heading",[16,17,5],"a",{"className":18,"href":20},[19],"section-anchor","#mathematica-link",[22,23,24],"p",{},"The NetLogo-Mathematica link provides modelers with an easy to use, real-time\nlink between NetLogo and Mathematica. Together, these tools can provide users\nwith a highly interactive, self-documenting work flow that neither can provide\nalone.",[22,26,27],{},"Mathematica includes many of the tools that agent-based modelers rely on\nthroughout the research process: advanced import capabilities, statistical\nfunctions, data visualization, and document creation. With the\nNetLogo-Mathematica link, you can run all of these tools side-by-side with\nNetLogo.",[22,29,30],{},"Because all Mathematica documents, or notebooks, contain comments, code, images,\nannotations, and interactive objects, the integration of NetLogo and Mathematica\nprovides a more complete solution for complex model exploration for students and\nresearchers alike.",[22,32,33],{},"The basic functionality of the link is much like the NetLogo Controlling API:\nyou can load models, execute commands, and report back data from NetLogo. Unlike\nthe Controlling API, which is based on Java, all interactions with the link are\ninterpreted, making it ideal not only for rapidly designing custom\nBehaviorSpace-like experiments, but also as a companion to NetLogo in debugging\nyour model.",[22,35,36,37,43],{},"For more information about Mathematica, please visit the\n",[16,38,42],{"href":39,"rel":40},"http://www.wolfram.com/",[41],"nofollow","Wolfram Research web site",".",[45,46,49,59],"div",{"className":47},[48],"toc",[50,51,54],"h4",{"id":52,"className":53},"table-of-contents",[14],[16,55,58],{"className":56,"href":57},[19],"#table-of-contents","Table of Contents",[60,61,62,69,75,81,87,93],"ul",{},[63,64,65],"li",{},[16,66,68],{"href":67},"#what-can-i-do-with-it","What can I do with it?",[63,70,71],{},[16,72,74],{"href":73},"#installation","Installation",[63,76,77],{},[16,78,80],{"href":79},"#usage","Usage",[63,82,83],{},[16,84,86],{"href":85},"#known-issues","Known Issues",[63,88,89],{},[16,90,92],{"href":91},"#source-code","Source code",[63,94,95],{},[16,96,98],{"href":97},"#credits","Credits",[100,101,104],"h2",{"id":102,"className":103},"what-can-i-do-with-it",[14],[16,105,68],{"className":106,"href":67},[19],[22,108,109],{},"Here are a few examples of what you can do with the Mathematica-NetLogo link.",[60,111,112,115,118,121,124],{},[63,113,114],{},"Analyze your model in real-time with seamless two-way data conversion",[63,116,117],{},"Develop high quality, custom visualizations of model data",[63,119,120],{},"Collect detailed simulation data across large multi-dimensional parameter\nspaces",[63,122,123],{},"Rapidly develop interactive interfaces for exploring model behavior",[63,125,126],{},"Have direct access to patches and network data with built-in functions",[100,128,131],{"id":129,"className":130},"installation",[14],[16,132,74],{"className":133,"href":73},[19],[22,135,136],{},"The NetLogo-Mathematica link supports Mathematica 10 or greater. To install the\nNetLogo-Mathematica link:",[138,139,140,143,146,149,152,155,158,161],"ol",{},[63,141,142],{},"Go to the menu bar in Mathematica",[63,144,145],{},"Click on File and select Install…",[63,147,148],{},"In the Install Mathematica Item dialog",[63,150,151],{},"Select Package for Type of item to install",[63,153,154],{},"Click Source, and select From file…",[63,156,157],{},"In the file browser, go to the location of your NetLogo installation,",[63,159,160],{},"click on the Mathematica Link subfolder, and select NetLogo.m.",[63,162,163],{},"For Install Name, enter NetLogo.",[22,165,166],{},"You can either install the NetLogo link in your user base directory or in the\nsystem-wide directory. If the NetLogo link is installed in the user base\ndirectory, other users on the system must also go through the\nNetLogo-Mathematica link installation process to use it. This option might be\npreferable if you do not have permission to modify files outside of your home\ndirectory. Otherwise, you can install NetLogo-Mathematica link in the\nsystem-wide Mathematica base directory.",[100,168,171],{"id":169,"className":170},"usage",[14],[16,172,80],{"className":173,"href":79},[19],[22,175,176],{},"This section will very briefly introduce how to use the NetLogo-Mathematica\nLink. It will show you how to load the NetLogo-Mathematica Link package, start\nNetLogo, execute commands, and retrieve data from NetLogo.",[22,178,179,183],{},[180,181,182],"strong",{},"Loading the package:"," Once the NetLogo-Mathematica link is installed, you can\nload the package by entering the following into your Mathematica notebook:",[185,186,187],"blockquote",{},[22,188,189],{},[190,191,192],"code",{},"\u003C\u003CNetLogo`",[22,194,195,198],{},[180,196,197],{},"Launching NetLogo from Mathematica:"," To begin your NetLogo session in\nMathematica, type the following into your notebook:",[185,200,201],{},[22,202,203],{},[190,204,205,206,214],{},"NLStart",[207,208,209,210,209],"span",{},"”",[211,212,213],"i",{},"your netlogo path",";",[22,216,217,218,221],{},"where ",[219,220,213],"em",{}," is the directory that netlogo is located in. Typically\non a Mac this will be “/Applications/NetLogo 7.0.4/”",[22,223,224,227],{},[180,225,226],{},"Loading a model:"," To load a model, you must specify the full path of the\nmodel. In this example we will load the Forest Fire model, and the path will be\ngiven using the typical Mac install location.",[185,229,230],{},[22,231,232],{},[190,233,234,240,241,246,247],{},[207,235,239],{"className":236},[237,238],"token","variable","NLLoadModel","[",[207,242,245],{"className":243},[237,244],"string","\"/Applications/NetLogo 7.0.4/models/Sample Models/Earth Science/Fire.nlogo\"","]",[207,248,214],{"className":249},[237,250],"comment",[22,252,253,256,257,260,261,263,264,43],{},[180,254,255],{},"Executing a NetLogo command:"," Commands can be executed by passing a string of\ncommands to ",[190,258,259],{},"NLCommand[]",". The ",[190,262,259],{}," function automatically splices\ncommon Mathematica data types into strings suitable for NetLogo. The following\ncommands set the density using a single string, or set the density using a\nMathematica defined variable, ",[190,265,266],{},"myDensity",[185,268,269],{},[22,270,271,284,285,303],{},[190,272,273,240,277,246,281],{},[207,274,276],{"className":275},[237,238],"NLCommand",[207,278,280],{"className":279},[237,244],"\"set density 50\"",[207,282,214],{"className":283},[237,250]," ",[190,286,287,284,290,284,295,300],{},[207,288,266],{"className":289},[237,238],[207,291,294],{"className":292},[237,293],"reporter","=",[207,296,299],{"className":297},[237,298],"number","60",[207,301,214],{"className":302},[237,250],[190,304,305,240,308,312,284,316,246,319],{},[207,306,276],{"className":307},[237,238],[207,309,311],{"className":310},[237,244],"\"set density\"",[207,313,315],{"className":314},[237,238],",",[207,317,266],{"className":318},[237,238],[207,320,214],{"className":321},[237,250],[22,323,324,327,328,331],{},[180,325,326],{},"Reporting information from NetLogo:"," NetLogo data can be reported back to\nMathematica using ",[190,329,330],{},"NLReport[]",". This includes numbers, strings, boolean values,\nand lists.",[185,333,334],{},[22,335,336,349],{},[190,337,338,240,342,246,346],{},[207,339,341],{"className":340},[237,238],"NLReport",[207,343,345],{"className":344},[237,244],"\"count turtles\"",[207,347,214],{"className":348},[237,250],[190,350,351,240,354,246],{},[207,352,341],{"className":353},[237,238],[207,355,357],{"className":356},[237,244],"\"[(list pxcor pycor)] of n-of 10 patches\"",[22,359,360],{},"For more information, see the NetLogo-Mathematica Tutorial notebook included\nwith NetLogo. The notebook walks you through the process of using the link, with\nmany examples along the way. If you do not have Mathematica, but are considering\nusing the link, you can find a PDF of the notebook included with NetLogo in the\n“Mathematica Link” directory.",[100,362,365],{"id":363,"className":364},"known-issues",[14],[16,366,86],{"className":367,"href":85},[19],[60,369,370,373,376],{},[63,371,372],{},"A NetLogo session cannot be quit without exiting J/Link (the Java-Mathematica\nlink) entirely. This may disrupt other packages that make use of J/Link.",[63,374,375],{},"If a model loaded with the NetLogo-Mathematica link uses a NetLogo extension,\nthe extension must be located in the same directory as the model itself. If\nthe extension is located in NetLogo’s application-wide extensions directory,\nit will not be found.",[63,377,378,379,381,382,384],{},"Calls to NetLogo, such as ",[190,380,259],{}," and ",[190,383,330],{},", cannot be aborted.",[100,386,389],{"id":387,"className":388},"source-code",[14],[16,390,92],{"className":391,"href":91},[19],[22,393,394,395,43],{},"The source code for the NetLogo-Mathematica link is in the public domain. It is\nhosted on line at ",[16,396,397],{"href":397,"rel":398},"https://github.com/NetLogo/Mathematica-Link",[41],[100,400,403],{"id":401,"className":402},"credits",[14],[16,404,98],{"className":405,"href":97},[19],[22,407,408],{},"The primary developer of the NetLogo-Mathematica link was Eytan Bakshy.",[22,410,411,412,416],{},"To refer to this package in academic publications, please use: Bakshy, E.,\nWilensky, U. (2007). NetLogo-Mathematica Link.\n",[16,413,414],{"href":414,"rel":415},"http://ccl.northwestern.edu/netlogo/mathematica.html",[41],". Center for Connected\nLearning and Computer-Based Modeling, Northwestern University, Evanston, IL.",{"title":418,"searchDepth":419,"depth":420,"links":421},"",5,3,[422,424,426,427,428,429,430],{"id":52,"depth":423,"text":58},4,{"id":102,"depth":425,"text":68},2,{"id":129,"depth":425,"text":74},{"id":169,"depth":425,"text":80},{"id":363,"depth":425,"text":86},{"id":387,"depth":425,"text":92},{"id":401,"depth":425,"text":98},"Information about integrating NetLogo with Mathematica for advanced mathematical analysis and computation.","md",{"source":434,"metadataOutputPath":435,"projectConfig":436,"language":443,"inheritFrom":452,"output":451,"version":437,"keywords":453,"tags":458,"icon":459,"assetsRoot":460},"autogen/mathematica.md","content/mathematica.metadata.yaml",{"version":437,"projectRoot":43,"scanRoot":438,"outputRoot":439,"defaults":440,"engine":446,"partials":447,"dedupeIdenticalDiskWrites":451},"7.0.4","autogen","content",{"inheritFrom":441,"language":443,"output":444,"extension":432,"title":445,"version":437},[442],0,"en",false,"NetLogo User Manual","handlebars",{"directoryPaths":448,"extensions":449},[43],[450,432],"mustache",true,[442],[454,455,456,457],"Mathematica","Integration","Mathematical Computing","NetLogo",[454,455,456],"i-material-icon-theme-mathematica","/home/runner/work/Helio/Helio/apps/docs/autogen","/mathematica",{"title":5,"description":431},"mathematica","CofFqC2yVaxR-5JFP9DrAnfPb5RNZZn_EUVUnWAhBQg",[466,471],{"title":467,"path":468,"stem":469,"description":470},"LevelSpace Extension Dictionary: with","/ls/with","ls/with","Documentation for the with primitive.",{"title":472,"path":473,"stem":474,"description":475},"Matrix Extension","/matrix","matrix","Documentation for the Matrix extension.",1777657789407]