如何分析 DymolaSimulation 的结果(通过 python 接口模拟) [英] How can I analyse the results of a DymolaSimulation (simulated via python interface)
问题描述
我通过python接口模拟了一些Dymola模型(结果文件是dsres.mat和dsres.txt),现在我想用python比较和分析这些结果(或清除一些输出).
I simulated some Dymola Models via the python interface (result files are dsres.mat and dsres.txt), now I would like to compare and analyse these results (or to be clear some of the outputs) with python.
是否有可能使用 python 接口这样做,或者我需要使用 modelicares/PySimulator/buildspy 或类似的东西?
Is there a possibility to do so with the python interface or do I need to work with modelicares/PySimulator/buildspy or something like that?
我不知道如何阅读和理解 dsres.txt 文件.
I don't get how to read and understand the dsres.txt file.
我不仅想要一个带有输出的图表,还想要一个表格(包括时间、输出 1、输出 2 等),就像我用 Dymola 模拟时一样.
I would like not only to have a diagramm with the outputs but also a table (including time, output1, output2 etc.) like when I simulate with Dymola.
我正在使用 python2.7 和 Dymola 2015
I'm working with python2.7 and Dymola 2015
推荐答案
最简单有效的方法之一是使用 Dymat 读取结果文件 (dsres.mat),该工具可以在 https://www.j-raedler.de/projects/dymat/.
One of the most simple and efficient ways is to read the result file (dsres.mat) with Dymat, a tool which can be found at https://www.j-raedler.de/projects/dymat/.
这样,您将拥有 Python 中可用的所有值,并且可以使用 Python 的所有功能处理它们...
This way you will have all values available in Python and can process them with all the capabilities of Python...
这篇关于如何分析 DymolaSimulation 的结果(通过 python 接口模拟)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!