blockConcatenateLogical

Information

This block concatenates two Boolean arrays.

When is_app = true (default), the values of u2 are appended after the values of u1.

When is_app = false, the values of u2 are prepended before the values of u1.

Parameters

TypeNameDefaultDescription
Booleanis_apptrueSet to true to append to the input array, false to prepend
Integernin10Size of input array
Integernin20Size of input array
Integernoutnin1 + nin2Size of output array
Integer[nout]idxExt1if is_app then cat(1, {i for i in 1:nin1}, fill(1, nin2)) else cat(1, fill(1, nin2), {i for i in 1:nin1})Indices of first array to be extracted
Integer[nout]idxExt2if is_app then cat(1, fill(1, nin1), {i for i in 1:nin2}) else cat(1, {i for i in 1:nin2}, fill(1, nin1))Indices of second array to be extracted
Boolean[nout]selInpif is_app then cat(1, fill(true, nin1), fill(false, nin2)) else cat(1, fill(false, nin2), fill(true, nin1))Selector for first (true) or second (false) array values

Connectors

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput[nin1]u1Array of Boolean signals
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput[nin2]u2Array of Boolean signals
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput[nout]yConcatenated array

Components

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Routing.BooleanExtractSignalexpInpExpand array
Buildings.Controls.OBC.CDL.Logical.Switch[nout]logSwiSwitch between first and second array
Buildings.Controls.OBC.CDL.Logical.Sources.Constant[nout]conInput selector
Buildings.Controls.OBC.CDL.Routing.BooleanExtractSignalexp2Expand array

Revisions

  • July 10, 2026, by Antoine Gautier:
    First implementation.