#6075 closed defect (worksforme)
Counting Boolean Vectors with MSL function does not work with old frontend
Reported by: | arunkumar palanisamy | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | 1.16.0 |
Component: | Frontend | Version: | v1.16.0-dev |
Keywords: | Cc: | Adrian Pop, Per Östlund, Martin Sjölund |
Description
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
Change History (2)
comment:1 by , 5 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:2 by , 4 years ago
Milestone: | 1.16.1 → 1.16.0 |
---|
Note:
See TracTickets
for help on using tickets.
@arun3688, even though the new front-end is still not the default with the command line interface, it is de-fact with OMEdit, and we've long stopped fixing the old front-end, while focusing on the new one.
I guess 1.17.0 in December will also have the NF active by default with the command line, there is now really no reason not to use it, except in a few corner case where the NF has some bugs and the OF could make it. I guess they will have all disappeared by then.
All other issues that have been fixed with the NF are marked as resolved on trac, I'd do the same here. Feel free to reopen if you have specific reasons to get this fixed now on the OF.