PyRates——一种用于动力系统建模的代码生成工具
PyRates -- A Code-Generation Tool for Dynamical Systems Modeling
AI总结:
针对动力系统建模缺乏通用实现框架的问题,研究人员推出基于Python的PyRates工具,它通过图结构分层界面和多语言代码生成功能,支持多种分析场景,还可作为接口扩展出专用建模工具。
摘要:
数学模型让我们能够更深入地理解真实世界的动力系统。微分方程组是为真实世界现象建模的最强大数学框架之一。在大多数使用微分方程的领域中,数值方法对于开展基于模型的研究至关重要。尽管目前已有许多用于微分方程系统数值研究的软件解决方案,但仍缺乏一个实现微分方程系统的通用框架,这阻碍了动力系统研究的进展,也限制了结果的可共享性与可复现性。\nPyRates 是一款基于 Python 的动力系统建模与分析软件。它提供了友好的用户界面用于定义模型,该界面基于一种图结构的分层架构,能够反映真实世界动力系统的模块化组织方式。这种设计让用户可以利用系统的分层结构,以最少的工作量创建模型。\n重要的是,PyRates 的核心是一个通用的代码生成系统,它可以将用户定义的模型转换为多种语言的“后端”实现,包括 Python、Fortran 和 Julia。这让用户能够使用各类动力系统分析方法,无需在不同代码库之间进行手动转换。\n我们通过三个用例展示了 PyRates 的功能:它生成用于数值模拟的 NumPy 代码、用于分岔分析的 Fortran 代码,以及用于神经网络优化的 PyTorch 代码。最后,PyRates 还可作为模型定义接口,用于开发新的动力系统工具。我们开发了两个此类软件包——PyCoBi 和 RectiPy,它们是 PyRates 针对特定动力系统建模应用的扩展。
英文摘要:
Mathematical models allow us to gain a deeper understanding of real-world dynamical systems. One of the most powerful mathematical frameworks for modeling real-world phenomena are systems of differential equations. In the majority of fields that use differential equations, numerical methods are essential for conducting model-based research. Although many software solutions are available for the numerical study of differential equation systems, a common framework for implementing differential equation systems is lacking. This hinders progress in dynamical systems research and limits the shareability and reproducibility of results. PyRates is a Python-based software for modeling and analyzing dynamical systems. It provides a user-friendly interface for defining models, which is based on a graph-based, hierarchical structure that mirrors the modular organization of real-world dynamical systems. This design allows users to leverage the hierarchical structure of their systems and create their models with minimal effort. Importantly, the core of PyRates is a versatile code-generation system, which can translate user-defined models into "backend" implementations in various languages, including Python, Fortran, and Julia. This allows users to access a wide range of analysis methods for dynamical systems, eliminating the need for manual translation between code bases. We demonstrate PyRates's capabilities in three use cases, where it generates NumPy code for numerical simulations, Fortran code for bifurcation analysis, and PyTorch code for neural network optimization. Finally, PyRates can be used as a model definition interface for the creation of new dynamical systems tools. We developed two such software packages, PyCoBi and RectiPy, as extensions of PyRates for specific dynamical systems modeling applications.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。