block Nand "Logical 'nand': y = not ( u[1] and u[2] and ... and u[nu] )"
extends Modelica.Blocks.Interfaces.PartialBooleanMISO;
equation
y = not Modelica.Math.BooleanVectors.allTrue(u);
annotation (
defaultComponentName = "nand1",
Icon(graphics = {
Text(
extent = {
{-78, 36},
{64, -30}},
textString = "nand")}),
Documentation(info = "<html>\n<p>\nThe output is <strong>true</strong> if at least one input is <strong>false</strong>, otherwise\nthe output is <strong>false</strong>.\n</p>\n\n<p>\nThe input connector is a vector of Boolean input signals.\nWhen a connection line is drawn, the dimension of the input\nvector is enlarged by one and the connection is automatically\nconnected to this new free index (thanks to the\nconnectorSizing annotation).\n</p>\n\n<p>\nThe usage is demonstrated, e.g., in example\n<a href=\"modelica://Modelica.Blocks.Examples.BooleanNetwork1\">Modelica.Blocks.Examples.BooleanNetwork1</a>.\n</p>\n\n<p>\nIf no connection to the input connector \"u\" is present,\nthe output is set to <strong>false</strong>: y=false.\n</p>\n\n</html>"));
end Nand;