blockSelectSortedAvailable
Generate a true array of n elements based on priority order and availability
Information
This block selects n lead/lag alternate units to enable,
choosing among available units in priority order.
The output has size nEqu (total equipment count), not
nEquAlt (number of lead/lag alternate units), so it can be
combined directly with the required-unit enable signals from
Buildings.Templates.Plants.Controls.StagingRotation.BaseClasses.SelectEquipmentAtStage.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nEqu | Number of units | |
| Integer | nEquAlt | Number of lead/lag alternate units |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Controls.OBC.CDL.Interfaces.IntegerInput | n | Number of required lead/lag alternate units | |
| Buildings.Controls.OBC.CDL.Interfaces.IntegerInput[nEquAlt] | uIdxSor | Indices of lead/lag alternate equipment sorted by increasing runtime | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanInput[nEqu] | u1Ava | Equipment available signal | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput[nEqu] | y1 | Enable signal |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger[nEqu] | avaInt | Cast available signal to integer | |
| Buildings.Controls.OBC.CDL.Routing.IntegerVectorReplicator | avaIntAltRep | Replicate to support reordering at next step | |
| Buildings.Controls.OBC.CDL.Routing.IntegerExtractor[nEquAlt] | avaIntIdxEquAlt | Available signals of lead/lag alternate equipment reordered based on idxEquAlt | |
| Buildings.Controls.OBC.CDL.Integers.Multiply[nEquAlt] | excUna | Filter out unavailable units | |
| Utilities.TrueArrayConditional | truArrCon | Generate array of size nEqu with nAltReq true elements at uIdxAltSor indices |
Revisions
-
June 10, 2026, by Antoine Gautier:
First implementation.