Dymola 模拟的结果是 .mat 文件,该文件可能会很大。这里是一个电厂模型的一系列结果,模拟时间间隔是0-100000s,但我只需要90000到100000s期间的数据,那么有什么办法让Dymola只输出90000到100000s的数据呢?
Dymola 用户手册中有一节称为“输出点的可变频率”。Advanced.Simulation.VariableInterval=true在那里你会找到关于如何和声明的解释,例如
when time >=\xe2\x80\xa6 then\n Dymola.Simulation.SetOutputInterval(\xe2\x80\xa6);\nend when;\nRun Code Online (Sandbox Code Playgroud)\n将使您能够根据模拟时间设置输出间隔。
\n显示的示例是:
\nmodel VariableOutputInterval "demonstrate the use of variable output interval in a model"\n Real x;\nequation\n x = sin(10*time);\n \n when initial() then\n Dymola.Simulation.SetOutputInterval(0.1);\n end when;\n\n when time >= 0.5 then\n Dymola.Simulation.SetOutputInterval(0.05);\n end when;\n\n when time >= 1.1 then\n Dymola.Simulation.SetOutputInterval(0.002);\n end when;\nend VariableOutputInterval;\nRun Code Online (Sandbox Code Playgroud)\n另外还有两个注意事项:
\n