# Why is a Boolean output not given as True/False by SystemModelSimulate?

Bug introduced in 11.3 and persisting through 12.0

A support case with the identification [CASE:4268618] was created.

I am a bit surprised that I am not getting a boolean output for the following simple Modelica model:

model = ImportString[
"block Or
input Boolean u1;
input Boolean u2;
output Boolean y;
equation
y = (u1 or u2);
end Or;"
,
"Mo"
];

sim = SystemModelSimulate[ model, {"y"}, {0,1},
Association[
"Inputs" -> {
"u1" -> Function[ t, True ],
"u2" -> Function[ t, False ]
}
]
];

First @ sim[{"y"}]


Function[ t, 1., Listable ]

So, what is returned is the real output (e.g. Boole[y]). Is this a bug?

• I (as a developer working on system modeling in Wolfram Language) consider it at least an unfortunate behavior. I have reported it in our issue tracker internally. – Malte Lenz Jun 10 at 7:42
• @Malte Great to hear. It indeed makes wiritng VerificationTest in a test notebook (a great feature btw) a bit more opaque. – gwr Jun 10 at 10:38

Note, that not only will Boolean outputs be given numerically by SystemModelSimulate, but Boolean inputs also have to be given as 1 or 0 instead of True or False.