Search for "verbosity" in Modelica

I am struggling with output file sizes for large Modelica models. Of course, I can protect some objects to completely remove them from the result file. However, this causes two problems:

  • Cannot override protected objects
  • if I want to test my model in detail (for example, for a short period of time), I need to publicly declare these objects in order to see their variables

I wonder if there is a trick to establish the “verbosity” of the Modelica model. Maybe I would like to find a third keyword near public, protectedfor example. transparent. Then, when setting up the simulation, I want to be able to set the level of detail to 1 or 2 with the following effect:

1 → consider all elements transparentasprotected

2 → consider all elements transparentaspublic

This effect will apply to all models and submodels.
I do not think this already exists. But is there an easy way?

Thanks Rule

+5
source share
5 answers

Roel

I know that several people are struggling with this problem. At the moment, it all depends on the tool used. I don’t know how other tools handle filtering results, but in Dymola you control it (as you specify) by providing signals to special qualifiers (for example, protected ones).

, , - , . "" Dymola, , . , : a) , , , b) ( Dymola , ).

Dassault . , - . , () , , .

+3

, Modelica, . OpenModelica, simulate(ModelName,outputFilter="regex"), , ( .*, ).

+6

SystemModeler "" " " . "" , .

( state variables, derivatives, algebraic variables, parameters, protected variables, Store simulation log -option, , , )

+3

, , Dymola Simulation- > Setup- > Output " ". : , , . , , , , , ...

+2

A little late, but in Dymola 2013 FD01 and later, you can choose which variables to store based on names (and model names) using annotations __Dymola_selectionsand even filter by user tags so that you can create a transparent tag name in the model. See "Matching and selecting variables" in the manual.

0
source

All Articles