减少OpenModelica中的输出变量数量

减少OpenModelica中的输出变量数量,modelica,openmodelica,Modelica,Openmodelica,我的模型目前大约是2000个方程,模拟周期是几周。我正在使用OpenModelica连接编辑器 我面临的问题是大量的输出变量,我已经有过几次绘图窗口崩溃 因此,问题是如何减少输出变量的数量 我只对其中的20-50个感兴趣。我知道我可以通过保护参数输出来删除参数输出,但我无法找到任何类似的变量技巧。如果您是通过命令行模拟模型,请查看simulate命令的variableFilter参数 如果您使用的是OMEdit,那么Simulation->Simulation Setup->Output->Va

我的模型目前大约是2000个方程,模拟周期是几周。我正在使用OpenModelica连接编辑器

我面临的问题是大量的输出变量,我已经有过几次绘图窗口崩溃

因此,问题是如何减少输出变量的数量


我只对其中的20-50个感兴趣。我知道我可以通过保护参数输出来删除参数输出,但我无法找到任何类似的变量技巧。

如果您是通过命令行模拟模型,请查看simulate命令的variableFilter参数


如果您使用的是OMEdit,那么Simulation->Simulation Setup->Output->Variable Filter可选

实际上,受保护的不限于参数。下面是一个复制Modelica.Mechanics.Translational.Examples.SignConvention并保护除mass1以外的所有内容的示例 在Dymola 2017FD01中测试,带有学究模式,因此它也应该在OpenModelica中工作;它工作正常,在模拟结果中仅给出mass1参数和变量

model SignConvention "Examples for the used sign conventions."
 extends Modelica.Icons.Example;
 Modelica.Mechanics.Translational.Components.Mass mass1(
   L=1,
   s(fixed=true),
   v(fixed=true),
   m=1) a;

protected
 Modelica.Mechanics.Translational.Sources.Force force1
   a;
 Modelica.Blocks.Sources.Constant constant1(k=1) a;
 Modelica.Mechanics.Translational.Components.Mass mass2(
   L=1,
   s(fixed=true),
   v(fixed=true),
   m=1) a;
 Modelica.Mechanics.Translational.Sources.Force force2
   a;
 Modelica.Blocks.Sources.Constant constant2(k=1) a;
 Modelica.Mechanics.Translational.Components.Mass mass3(
   L=1,
   s(fixed=true),
   v(fixed=true),
   m=1) a;
 Modelica.Mechanics.Translational.Sources.Force force3(useSupport=true)
   a;
 Modelica.Blocks.Sources.Constant constant3(k=1) a;
 Modelica.Mechanics.Translational.Components.Fixed fixed
   a;

equation
...

谢谢你的回复!在看到它被称为过滤器变量之后,我发现了这个链接,它也非常有用。然而,我似乎仍然无法使它真正起作用。我想要的变量是P,在组件abc中,那么我希望在filter variables行中写入abc.P。在OpenModelica连接编辑器中,保护变量通常不起作用,部分原因是变量的别名。不幸的是,“annotationHideResult=true”也不起作用