﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
6075	Counting Boolean Vectors with MSL function does not work with old frontend	arunkumar palanisamy		"Counting the number of true values in a boolean vector using the MSL function call '''Modelica.Math.BooleanVectors.countTrue''' does not work with old front-end. The following example can reproduce the problem


{{{
loadModel(Modelica);
getErrorString();

loadString(""
model boolcount 
  parameter Boolean[4,3] driven = [false,true,true; false,false,true; false,false,false; false,false,true];
  Integer count;
equation
  count = sum(Modelica.Math.BooleanVectors.countTrue(driven));
end boolcount;
"");
getErrorString();

simulate(boolcount); getErrorString();

val(count,1); getErrorString();

}}}

The following error is reported 


{{{
""[<interactive>:6:3-6:62:writable] Error: No matching function found for Modelica.Math.BooleanVectors.countTrue({{driven[1,1], driven[1,2], driven[1,3]}, {driven[2,1], driven[2,2], driven[2,3]}, {driven[3,1], driven[3,2], driven[3,3]}, {driven[4,1], driven[4,2], driven[4,3]}})
of type
  .Modelica.Math.BooleanVectors.countTrue<function>(Boolean[4, 3] b) => Integer in component <NO COMPONENT>
candidates are
  .Modelica.Math.BooleanVectors.countTrue<function>(Boolean[:] b) => Integer
Error: Error occurred while flattening model boolcount
""

}}}

However the above example works with the new front-end


{{{
>>> omc -d=newInst a.mos
}}}
"	defect	closed	high	1.16.0	Frontend	v1.16.0-dev	worksforme		Adrian Pop Per Östlund Martin Sjölund
