blockConcatenateParameterLogical

Extends from Buildings.Templates.Plants.Controls.Utilities.ConcatenateLogical.

Information

This block concatenates two Boolean arrays, one provided as an input, the other one provided as a parameter.

When is_app = true (default), the values of the parameter array are appended after the values of the input array.

When is_app = false, the values of the parameter array are prepended before the values of the input array.

A zero-sized array can be provided as a parameter. The block then is a no-op, returning the input array unchanged.

Parameters

TypeNameDefaultDescription
Booleanis_app (from ConcatenateLogical)trueSet to true to append to the input array, false to prepend
Integernin1 (from ConcatenateLogical)0Size of input array
Integernin2 (from ConcatenateLogical)0Size of input array
Integernout (from ConcatenateLogical)nin1 + nin2Size of output array
Integer[nout]idxExt1 (from ConcatenateLogical)if 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]idxExt2 (from ConcatenateLogical)if 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]selInp (from ConcatenateLogical)if 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
Boolean[:]newNew array to be concatenated with the input array
IntegernNewsize(new, 1)Size of new array

Connectors

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput[nin1]u1 (from ConcatenateLogical)Array of Boolean signals
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput[nin2]u2 (from ConcatenateLogical)Array of Boolean signals
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput[nout]y (from ConcatenateLogical)Concatenated array

Components

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Routing.BooleanExtractSignalexpInp (from ConcatenateLogical)Expand array
Buildings.Controls.OBC.CDL.Logical.Switch[nout]logSwi (from ConcatenateLogical)Switch between first and second array
Buildings.Controls.OBC.CDL.Logical.Sources.Constant[nout]con (from ConcatenateLogical)Input selector
Buildings.Controls.OBC.CDL.Routing.BooleanExtractSignalexp2 (from ConcatenateLogical)Expand array
Buildings.Controls.OBC.CDL.Logical.Sources.Constant[nNew]newCstNew array to be concatenated
Buildings.Controls.OBC.CDL.Logical.Sources.Constant[nout]pla0Placeholder for zero-sized array

Revisions

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