﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2508	Problems with variableFilter	nimalk@…	Martin Sjölund	"In order to simulate my models and save the resulting plt files, I use a bat script. 

However, simulating a Multibody model  for one second generates a plt file of almost 100 mb (I have a model with a discrete component and a high sample rate). 

As I have to simulate 100 seconds I would have to save 10 GB of unnecessary data. Furthermore, it isn't even possible to simulate 100 s: messages = ""Simulation execution failed for model: HangingMass2 assert | assert  | Error allocating simulation result data of size 400000000 failed. 

In order to reduce the plt file size I tried to use the extra argument variableFilter. Nevertheless, all the variables are still included in the plt file and the size remains unchanged.  

To test the variableFilter I have created the following model:

{{{
model HangingMass2
  Real x;
  inner Modelica.Mechanics.MultiBody.World world(g = 0) annotation(Placement(visible = true, transformation(origin = {-37.2454,36.0839}, extent = {{-10,-10},{10,10}}, rotation = 0)));
  Modelica.Mechanics.MultiBody.Parts.Body body(r_CM = {0,0.5,0}, m = 16.5, r_0(start = {0,-2.5,0}, each fixed = true)) annotation(Placement(visible = true, transformation(origin = {32.3982,20.6998}, extent = {{-10,-10},{10,10}}, rotation = 0)));
equation
  x = 1;
end HangingMass2;
}}}

I then attempted to filter the variable x.

simulate(%MODELNAME%, startTime=%2, stopTime=%3, numberOfIntervals=%INTERVALS%, tolerance=0.000001, method=""euler"", outputFormat=""plt"", variableFilter=""x"");

Please note that the above model is not exactly the same as the one I use to filter, i.e.  the 10 GB model is not the one above. Due to the complexity of running my model without the source code and some copyright issues I cannot attach the model.

Furthermore, I would be grateful if you would kindly show me how to filter the variable body.r_0[1] (what should the syntax be?) 

"	defect	closed	high	1.9.1	Run-time	trunk	fixed		
