Help - Search - Members - Calendar
Full Version: How to reduce the filesize of the results (.mat) ?
Modelica Forum > Modelica > Dymola
RungeZipperer
Hi,

I have a model that consist of about 2000 equation and I need a simulation time up to 40 seconds. Maybe even more for further researches. The filesize of the mat-file exceeds nearly 1 GB. Thatīs a lot and it makes no sense beacuse I only need the results from about 10 variables. In the simulation setup I can choose which variables I want to save during simulation:

* state variables
* derivatives
* input variables
* output variables
* auxiliary variables
* protected variables

I donīt know what kind the variables I need are. I tried to leave out some from the list above but then some important variables are missing. So thatīs not an appropriate way. The selection is too general.

How can I save only a few variables in the mat-file? Is it possible at all?

So far I have intruduced some new models to write a csv file during simulation and save some values at terminal state. But the effort seems not to be necassary because all the data is already available but I canīt save ist like I would like to.

How do you handle great models with a lot of equations???

Thanks.
wagner
Hello RungeZipperer,

I think the easiest way is to declare some auxiliary variables as 'output'. In your models you assign the interested variables to those variables. In the simulation setup you choose that only the output variables are being saved.

Another idea is to reduce the amount of time steps which are stored in the result file. In the standard setting all variables are stored each time an event occurs. Maybe you need only the values every s or ms. In the simulation setting you can choose that the variables are only stored in equidistant time steps.

Regards

Florian
RungeZipperer
Thanks,

good idea. Iīve introduced some new output variables. Iīm not really satisfied with this solution but I donīt want to start a thread about the disadvantages of Dymola. There are several points I would have to mention rolleyes.gif. I still donīt understand the different kinds of variables except "input" and "output". How do I know if a variable is a state or a derivative? I only see the name of the variable in the simulation window...
Carsten
Hi,

if you want to know what are your state variables turn Simulation.Setup.Translation.List_Continuous_time_states_select on. To write fast and stable models, you should be more or less clear what variables you want to use as states and force the selection by the use of stateSelect attribute.

Derivatives are written in the variable browser as. e.g. der(x).

You can also include some protect statements in your model to set some variables as protected. Further you can use the annotation(Hide=true) to not store the variables.

There are some more options... The disatvantage of Dymola is in my opinion only the poor documentation smile.gif

regards
Carsten
RungeZipperer
QUOTE(Carsten @ Aug 8 2007, 04:02 PM) *

There are some more options... The disatvantage of Dymola is in my opinion only the poor documentation smile.gif


Donīt get me wrong. Iīm a Modelica- and Dymola-Fan but e.g. the editor is rediculous (no code completion, no realtime highligthning,...) and the possibilities of plotting the results and saving them are limited to a minimum.

QUOTE(Carsten @ Aug 8 2007, 04:02 PM) *

Further you can use the annotation(Hide=true) to not store the variables.


OK, thatīs new to me. But itīs hardly possible to change this annotion für 100 variables. If you include this annotation in your model once itīs not possible to change it for each simulation in the simulation section or?
Carsten
ZITAT(RungeZipperer @ Aug 8 2007, 04:15 PM) *

OK, thatīs new to me. But itīs hardly possible to change this annotion für 100 variables. If you include this annotation in your model once itīs not possible to change it for each simulation in the simulation section or?


Well, the poor thing is, that up yet you can't use a boolean parameter to set the hide annotation. Maybe there is a hidden option, but I never red about it...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.