blockStageAvailability
Compute stage availability
Information
A stage is deemed available if all of the following are true:
- Each unit required to run at that stage without lead/lag alternate is available.
- The number of units required to run at that stage – with or without lead/lag alternate – that are available is greater than or equal to the number of units required to run at that stage.
- The number of units required to run at that stage – with or without lead/lag alternate – is nonzero. This condition is used by Buildings.Templates.Plants.Controls.PolyvalentHeatPumps.StagingParameters to encode that a stage is not feasible.
Otherwise, the stage is deemed unavailable.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | have_php | false | Set to true for plants with polyvalent heat pumps |
| Real[:,:] | staEqu | Staging matrix – Equipment required for each stage | |
| Integer | nSta | if have_php then integer((1 + sqrt(1 + 4*size(staEqu, 1)))/2) - 1 else size(staEqu, 1) | Number of stages |
| Integer | nEqu | size(staEqu, 2) | Number of equipment |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Controls.OBC.CDL.Interfaces.BooleanInput[nEqu] | u1Ava | Equipment available signal | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput[nSta] | y1 | Stage available signal | |
| Buildings.Controls.OBC.CDL.Interfaces.IntegerInput | uStaOpp | Stage index of opposite mode |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Controls.OBC.CDL.Reals.Sources.Constant[nSta,nEqu] | matStaEqu | Staging matrix | |
| Buildings.Controls.OBC.CDL.Routing.BooleanVectorReplicator | booVecRep | Replicate equipment available signal | |
| Buildings.Controls.OBC.CDL.Logical.MultiAnd[nSta] | isAva | Return true if stage available | |
| Buildings.Controls.OBC.CDL.Integers.GreaterEqual[nSta] | isReqAltAvaGreReq | Return true if number of required available equipment higher than number of required equipment | |
| Utilities.CountTrue[nSta] | nReqOrAltAva | Number of units required (with or without lead/lag alternate) and available | |
| BaseClasses.SelectEquipmentAtStage[nSta] | selEquSta | Select equipment at stage | |
| PolyvalentHeatPumps.ExtractStagingMatrix | extSta | Extract staging matrix for the opposite mode stage index | |
| Buildings.Controls.OBC.CDL.Integers.GreaterThreshold[nSta] | notZer | True if the number of units required (with or without lead/lag alternate) is nonzero | |
| Utilities.CountTrue[nSta] | nReqAndAva | Number of units required (without lead/lag alternate) and available | |
| Buildings.Controls.OBC.CDL.Integers.Equal[nSta] | allReqAva | True if all units required (without lead/lag alternate) are available |
Revisions
-
July 10, 2026, by Antoine Gautier:
Refactored to support plants with polyvalent heat pumps.
This is for #4512. -
March 29, 2024, by Antoine Gautier:
First implementation.