ModelingToolkit:一个用于方程建模的可组合图转换系统
ModelingToolkit: A Composable Graph Transformation System For Equation-Based Modeling
摘要:
要想获得数值方程求解器的良好性能,用户需要提供稳定有效的函数来表示其模型。但是,不应该相信用户会写出好的代码。在这篇手稿中,我们描述ModelingToolkit(MTK),一个符号方程为基础的建模系统,它允许组合转换生成稳定,高效,并行化的模型实现。MTK通过直接作用于用户的数字代码,模糊了传统符号计算的界限。我们展示了应用图形算法自动并行化和执行索引减少的能力,这些算法可以在为微分代数方程(DAE)求解器编写的代码上,“修复”模型的性能和稳定性,而无需对用户的部分进行任何更改。我们演示了如何组合模型转换可以与自动数据驱动的代理生成技术相结合,允许机器学习方法生成加速近似模型的因果建模框架内。这些简化的模型在HVAC模型上的性能优于Dymola Modelica编译器590倍,误差为3%。总之,这表明MTK是一个将图转换的最新研究直接引入建模应用程序的系统。
英文摘要:
Getting good performance out of numerical equation solvers requires that the user has provided stable and efficient functions representing their model. However, users should not be trusted to write good code. In this manuscript we describe ModelingToolkit (MTK), a symbolic equation-based modeling system which allows for composable transformations to generate stable, efficient, and parallelized model implementations. MTK blurs the lines of traditional symbolic computing by acting directly on a user's numerical code. We show the ability to apply graph algorithms for automatically parallelizing and performing index reduction on code written for differential-algebraic equation (DAE) solvers, "fixing" the performance and stability of the model without requiring any changes to on the user's part. We demonstrate how composable model transformations can be combined with automated data-driven surrogate generation techniques, allowing machine learning methods to generate accelerated approximate models within an acausal modeling framework. These reduced models are shown to outperform the Dymola Modelica compiler on an HVAC model by 590x at 3\% error. Together, this demonstrates MTK as a system for bringing the latest research in graph transformations directly to modeling applications.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。