NL4Py is a Python package for the parallel execution of NetLogo models via Python, designed for speed, scalability, and simplicity of use. NL4Py provides both headless (no graphical user interface (GUI)) and GUI NetLogo workspace control through Python. Spurred on by the increasing availability of open-source computation and machine learning libraries on the Python package index, there is an increasing demand for such rapid, parallel execution of agent-based models through Python. NetLogo, being the language of choice for a majority of agent-based modeling driven research projects, requires an integration to Python for researchers looking to perform statistical analyses of agent-based model output using these libraries. Unfortunately, until the recent introduction of PyNetLogo, and now NL4Py, such a controller was unavailable. This article provides a detailed introduction into the usage of NL4Py and explains its client-server software architecture, highlighting architectural differences to PyNetLogo. A step-by-step demonstration of global sensitivity analysis and parameter calibration of the Wolf Sheep Predation model is then performed through NL4Py. Finally, NL4Py's performance is benchmarked against PyNetLogo in both serial and parallel execution on both desktop and cloud environments, and shown to provide significant savings in model execution time and memory usage.
翻译:NL4Py 是一个通过 Python 平行执行 NetLogo 模型的 Python 软件包。 NL4Py 提供无头( 没有图形用户界面 (GUI) ) 和 GUI NetLogo 通过 Python 工作空间控制。 Python 软件包索引上公开源计算和机器学习库的日益普及刺激了对通过 Python 平行执行 NetLogo 模型的这种快速平行实施的需求。 NetLogo 是大多数基于代理的建模驱动研究项目的首选语言, 需要与 Python 进行整合, 以便研究人员通过这些图书馆对基于代理的模型输出进行统计分析。 不幸的是, 直到最近引入 PyNetLogo, 现在NL4Py 软件库, 这样的控制器无法使用。 此文章详细介绍了 NL4Py 的使用情况, 并解释了其客户- 服务器的软件结构, 强调了当时 PyNetLogo 的建筑环境差异。 在 NyNet imlegration PreL 和 CreL 的运行中, 的高级测试中, 和 NepL tralL 的运行的运行中, 的运行中, 和 的运行中, 都的运行的运行和校标定的运行都提供了一个逐步演示和校的运行的运行的运行的运行的运行。