<p>If you are looking to do optimization or sensitivity analysis on NetLogo models from Python you might want to consider using <strong><a href="https://github.com/chathika/NL4Py" rel="nofollow noreferrer">NL4Py</a></strong>. NL4Py is a Python package that lets you control NetLogo models from Python. The <a href="https://pypi.org/project/NL4Py/" rel="nofollow noreferrer">package is released on PyPI.org</a> and you can get started with a simple <code>pip install nl4py</code>.</p>

<p><a href="https://arxiv.org/pdf/1808.03292.pdf" rel="nofollow noreferrer">Article Preprint</a></p>

<p><a href="https://github.com/chathika/NL4Py" rel="nofollow noreferrer">Repository and Documentation</a></p>

<p><a href="https://github.com/chathika/NL4Py/blob/master/examples/ParameterCalibrationWithDEAP.ipynb" rel="nofollow noreferrer">Example of model calibration with NL4Py and DEAP</a></p>

<p><a href="https://github.com/chathika/NL4Py/blob/master/examples/SensitivityAnalysis.ipynb" rel="nofollow noreferrer">Example of sensitivity analysis  with NL4Py and SALib</a></p>
Python or JavaScript scripting for NetLogo?
<p>NetLogo is excellent for agent-based modeling...except for the language.  I always find myself contorting my brain trying to figure out how to do something that <em>should</em> be simple to code (such as implementing a simple case statement) in NetLogo's Logo implementation. Logo is just not a programmer's language (apologies to those infuriated by this assertion).</p>

<p>I saw Abe Gong's Tengolo project that purported to do just this (<a href="http://compsocsci.blogspot.com/2012/02/announcing-tengolo-python-alternative.html" rel="noreferrer">http://compsocsci.blogspot.com/2012/02/announcing-tengolo-python-alternative.html</a>) but the project appears to have been abandoned. Also another question in stack overflow (<a href="https://stackoverflow.com/questions/4905873/agent-based-simulation-performance-issue-python-vs-netlogo-repast">agent-based simulation: performance issue: Python vs NetLogo &amp; Repast</a>) seems to indicate that Python would be slower. </p>

<p>Seems like it would be quite possible to use Jython to compile into modules that NetLogo could use, but I wondered if anyone is aware of something that would let me do NetLogo simulations in a sensible language like Python. Thoughts?</p>