Modelica is a well established cyber-physical modeling language, but many modern engineering workflows, such as optimization, differentiable simulation, scientific machine learning, and system analysis, make use of other environments such as CasADi, JAX, and Julia. Existing infrastructure for Modelica toolchains does not target these languages directly, meaning models must typically be rewritten, or lose important information in the interface. This paper presents Rumoca, a Rust-native Modelica compiler that turns Modelica into a universal algebraic frontend for a variety of tools. Rumoca is organized as a sequence of explicit phase boundaries from parsing through Differential-Algebraic Equation (DAE) construction and template-driven code generation, with a native Rust simulation backend that also supports real-time, software-in-the-loop execution. We report quantitative coverage of the Modelica Standard Library across pipeline phases, together with compile-time and simulation-time benchmarks against an open-source reference. The full compiler ships as a VS Code extension and runs in the browser via WebAssembly, enabling zero-install playgrounds and self-contained HTML simulators. End-to-end case studies demonstrate realtime software-in-the-loop control of a quadrotor model and deployment of a single Modelica source across multiple algebraic backends.


翻译:Modelica是一种成熟的物理信息建模语言,但许多现代工程工作流程(如优化、可微仿真、科学机器学习和系统分析)需要使用CasADi、JAX和Julia等其他环境。现有Modelica工具链的基础设施并未直接面向这些语言,因此模型通常需要重写,或在接口中丢失重要信息。本文提出Rumoca,一种Rust原生的Modelica编译器,可将Modelica转化为面向多种工具的通用代数前端。Rumoca的组织结构为一系列明确的阶段边界,涵盖从解析到微分代数方程(DAE)构建及模板驱动代码生成的全过程,并配备支持实时软件在环执行的本地Rust仿真后端。我们报告了Modelica标准库在各流水线阶段的量化覆盖率,同时提供了与开源参考模型在编译时和仿真时的基准测试对比。该编译器以VS Code扩展形式发布,并通过WebAssembly在浏览器中运行,支持零安装的交互式演练和自包含的HTML仿真器。端到端案例研究展示了四旋翼模型的实时软件在环控制,以及单一Modelica源在多个代数后端的部署能力。

0
下载
关闭预览

相关内容

VILA-U:一个融合视觉理解与生成的统一基础模型
专知会员服务
21+阅读 · 2024年9月9日
可解释的机器学习模型和架构
专知会员服务
92+阅读 · 2023年9月17日
如何用latext画神经网络?这个PlotNeuralNet能帮到你
专知会员服务
26+阅读 · 2022年1月15日
CALDERA 一款对手自动模拟工具
黑白之道
20+阅读 · 2019年9月17日
超全总结:神经网络加速之量化模型 | 附带代码
机器学习模型的“可解释性”到底有多重要?
中国科学院自动化研究所
20+阅读 · 2018年3月1日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
7+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
8+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
6+阅读 · 6月17日
相关VIP内容
VILA-U:一个融合视觉理解与生成的统一基础模型
专知会员服务
21+阅读 · 2024年9月9日
可解释的机器学习模型和架构
专知会员服务
92+阅读 · 2023年9月17日
如何用latext画神经网络?这个PlotNeuralNet能帮到你
专知会员服务
26+阅读 · 2022年1月15日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员