﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5939	variableFilter sometimes includes aliases of selected variables	christopher.schoelzel@…	somebody	"The simulation option variableFilter sometimes includes variables that do not match the regular expression but that are aliases of a variable that does.

Unfortunately my MWE is still 300 lines of Modelica code, since I found it quite hard to pinpoint why some variables show this behavior and some variables don't. Attached you will find one file where the variable filter works as expected (VariableFilterWorking.mo) and one where it includes four additional variables (VariableFilterBroken.mo). In both cases the outputFormat is ""csv"" and the variableFilter used is the following:


{{{
(n|an_nh)_(vc_v|naca_(i|E[1-4]|k_[1-4][1-4]))
}}}

For VariableFilterBroken you find the additional variables an_nh_naca_F1_3n_i, an_nh_naca_F1_3n_o, n_naca_F1_3n_i and n_naca_F1_3n_o, which are equal to one of the variables selected by the filter (e.g. through ""Real n_naca_k_34 = n_naca_F1_3n_o;"") but do not match the regex. Other variable aliases (e.g. n_naca_F_c_i with ""Real n_naca_k_12 = n_naca_F_c_i;""), however, are not selected. I cannot find any pattern here, but I suspect it has something to do with variable naming and ordering since this is the only thing that changed between the working and the broken version.

I suspect that this is related to [https://trac.openmodelica.org/OpenModelica/ticket/3533 #3533] and the fact that this happens for some but not all variables and is related to aliasing could explain why this issue could not be reproduced.

This behavior was both tested with OMEdit and by directly calling the OMC through the scripting API. Version numbers are the following (from ""About OMEdit"" window):

Connected to OMCompiler v1.16.0-dev.252+gebc5dd384
Connected to OMSimulator v2.1.0-dev-155-gf11a7e4-linux"	defect	new	normal		*unknown*	v1.16.0-dev		variableFilter	
