blockSelectModeState
Information
State alternation
Heat pumps are lead/lag controlled as specified in Buildings.Templates.Plants.Controls.StagingRotation.SortRuntime, in all operating modes.
A single runtime point accumulates per heat pump inclusive of all operating mode runtimes.
Mode alternation
Plants with reversible heat pumps
Alternation between heating and cooling mode is subject to the requirements specified in Buildings.Templates.Plants.Controls.HeatPumps.Subsequences.EquipmentAvailability.
Plants with polyvalents heat pumps
Alternation between heating-only and cooling-only mode is subject to the requirements specified in Buildings.Templates.Plants.Controls.HeatPumps.Subsequences.EquipmentAvailability.
Alternation between heating-only or cooling-only mode and SHC mode is subject to the requirements specified in Buildings.Templates.Plants.Controls.PolyvalentHeatPumps.ModeAlternation.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | have_chiWat | Set to true for plants that provide CHW | |
| Integer | nStaHp | Number of stages in HP staging matrix | |
| Real[:,:] | staHp | {min(iSta, nHp)/nHp for _ in 1:nHp, iSta in 1:nStaHp} | HP staging matrix – Equipment required for each stage |
| Real[:,:] | traStaHp | {staHp[i, j] for i in 1:nStaHp, j in 1:nHp} | Transpose of staging matrix |
| Integer | nHp | Number of reversible heat pumps | |
| Integer | nAltHp_select | nHp | Number of reversible heat pumps subject to lead/lag alternation |
| Integer | nAltHp | if nPhp > 0 then nHp else nAltHp_select | Number of reversible heat pumps subject to lead/lag alternation |
| Integer | nPhp | Number of polyvalent units | |
| Integer | nSta | if nPhp > 0 then nHp + nPhp else size(staHp, 1) | Number of stages |
| Integer | nCol | if nPhp > 0 then nHp + 2*nPhp else size(staHp, 2) | Number of columns in staging matrix |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Controls.OBC.CDL.Interfaces.IntegerInput[nAltHp] | uIdxSorHp | Indices of heat pumps sorted by increasing runtime | |
| Buildings.Controls.OBC.CDL.Interfaces.IntegerInput | uStaHea | Heating stage index | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanInput[nHp] | u1AvaHeaHp | HP heating mode available signal | |
| Buildings.Controls.OBC.CDL.Interfaces.RealInput[nCol,nSta] | staTraHea | Transpose of heating staging matrix at current cooling stage | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput[nHp] | y1HeaHp | HP heating mode command | |
| Buildings.Controls.OBC.CDL.Interfaces.IntegerInput[nPhp] | uIdxSorPhp | Indices of polyvalent units sorted by increasing runtime | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanInput[nPhp] | u1AvaHeaPhp | Polyvalent HP heating-only mode available signal | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanInput[nPhp] | u1AvaShcPhp | Polyvalent HP SHC mode available signal | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput[nPhp] | y1HeaPhp | Polyvalent HP heating-only mode command | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput[nPhp] | y1ShcPhp | Polyvalent HP SHC mode command | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput[nPhp] | y1HeaOrShcPhp | True if polyvalent HP commanded on in heating-only or SHC mode | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput[nHp + nPhp] | y1HeaHpPhp | Heating mode command – HP (up to nHp) and polyvalent HP (from nHp+1) | |
| Buildings.Controls.OBC.CDL.Interfaces.IntegerInput | uStaCoo | Cooling stage index | |
| Buildings.Controls.OBC.CDL.Interfaces.RealInput[nCol,nSta] | staTraCoo | Transpose of cooling staging matrix at current heating stage | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanInput[nPhp] | u1AvaCooPhp | Polyvalent HP cooling-only mode available signal | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput[nPhp] | y1CooPhp | Polyvalent HP cooling-only mode command | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput[nHp] | y1CooHp | HP cooling mode command | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput[nHp + nPhp] | y1CooHpPhp | Cooling mode command – HP (up to nHp) and polyvalent HP (from nHp+1) | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanInput[nHp] | u1AvaCooHp | HP cooling mode available signal |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Controls.OBC.CDL.Routing.RealExtractor[nCol] | reqEquStaHea | Extract equipment required at given heating stage | |
| Buildings.Controls.OBC.CDL.Routing.IntegerScalarReplicator | intScaRepHea | Replicate signal | |
| Buildings.Controls.OBC.CDL.Integers.Sources.Constant | one | Constant | |
| Buildings.Controls.OBC.CDL.Integers.Max | maxIntHea | Maximum between stage index and 1 | |
| Buildings.Controls.OBC.CDL.Integers.GreaterThreshold | greZerHea | Check if stage index is greater than zero | |
| Buildings.Controls.OBC.CDL.Conversions.BooleanToReal | booToReaHea | Cast to real | |
| Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator | reaScaRepHea | Replicate signal | |
| Buildings.Controls.OBC.CDL.Reals.Multiply[nCol] | voiStaZerHea | Void if stage is equal to zero | |
| Buildings.Controls.OBC.CDL.Routing.RealExtractSignal | reqHpStaHea | Extract heat pumps required at given heating stage | |
| Buildings.Controls.OBC.CDL.Routing.RealExtractSignal | reqPhpHeaSta | Extract polyvalent units required in heating-only mode at given heating stage | |
| Buildings.Controls.OBC.CDL.Routing.RealExtractSignal | reqPhpShcSta | Extract polyvalent units required in SHC mode at given heating stage | |
| StagingRotation.BaseClasses.SelectSortedAvailable | selSorAvaHeaHp | Select units by priority order and availability – HP | |
| StagingRotation.BaseClasses.SelectSortedAvailable | selSorAvaPhpHea | Select units by priority order and availability – Polyvalent HP in heating-only mode | |
| StagingRotation.BaseClasses.SelectSortedAvailable | selSorAvaPhpShc | Select units by priority order and availability – Polyvalent HP in SHC mode | |
| Buildings.Controls.OBC.CDL.Logical.And[nHp] | isHpAvaAltNeeHea | True if available and lead/lag alternate needed to meet stage requirement | |
| Buildings.Controls.OBC.CDL.Logical.And[nPhp] | isPhpAvaReqOrAltNeeHea | True if available and required or indexed as lead/lag alternate and needed to meet stage requirement | |
| Buildings.Controls.OBC.CDL.Logical.And[nPhp] | isPhpAvaReqOrAltNeeShc | True if available and required or indexed as lead/lag alternate and needed to meet stage requirement | |
| StagingRotation.BaseClasses.SelectEquipmentAtStage | selEquStaHpHea | Select equipment at stage | |
| StagingRotation.BaseClasses.SelectEquipmentAtStage | selEquStaPhpHea | Select equipment at stage | |
| StagingRotation.BaseClasses.SelectEquipmentAtStage | selEquStaPhpShc | Select equipment at stage | |
| Buildings.Controls.OBC.CDL.Logical.Or[nPhp] | onHeaOrShc | True if polyvalent HP commanded on in either heating-only or SHC mode | |
| Buildings.Controls.OBC.CDL.Logical.Or[nHp] | enaHeaHp | Enable HP required without lead/lag alternate and available or lead/lag alternate to meet stage requirement | |
| Buildings.Controls.OBC.CDL.Reals.Sources.Constant[nCol,nSta] | traMatStaHp | Transpose of HP staging matrix | |
| Buildings.Controls.OBC.CDL.Routing.RealExtractor[nCol] | reqEquStaCoo | Extract equipment required at given cooling stage | |
| Buildings.Controls.OBC.CDL.Routing.IntegerScalarReplicator | intScaRepCoo | Replicate signal | |
| Buildings.Controls.OBC.CDL.Integers.Max | maxIntCoo | Maximum between stage index and 1 | |
| Buildings.Controls.OBC.CDL.Integers.GreaterThreshold | greZerCoo | Check if stage index is greater than zero | |
| Buildings.Controls.OBC.CDL.Conversions.BooleanToReal | booToReaCoo | Cast to real | |
| Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator | reaScaRepCoo | Replicate signal | |
| Buildings.Controls.OBC.CDL.Reals.Multiply[nCol] | voiStaZerCoo | Void if stage is equal to zero | |
| Buildings.Controls.OBC.CDL.Routing.RealExtractSignal | reqPhpCooSta | Extract polyvalent units required in cooling-only mode at given cooling stage | |
| StagingRotation.BaseClasses.SelectEquipmentAtStage | selEquStaPhpCoo | Select equipment at stage | |
| StagingRotation.BaseClasses.SelectSortedAvailable | selSorAvaPhpCoo | Select units by priority order and availability – Polyvalent HP in cooling-only mode | |
| Buildings.Controls.OBC.CDL.Logical.And[nPhp] | isPhpAvaReqOrAltNeeCoo | True if available and required or indexed as lead/lag alternate and needed to meet stage requirement | |
| PolyvalentHeatPumps.ModeAlternation | selModPhp | Mode selection for polyvalent HP | |
| Buildings.Controls.OBC.CDL.Routing.RealExtractSignal | reqHpStaCoo | Extract heat pumps required at given cooling stage | |
| StagingRotation.BaseClasses.SelectSortedAvailable | selSorAvaCooHp | Select units by priority order and availability – HP | |
| Buildings.Controls.OBC.CDL.Logical.And[nHp] | isHpAvaAltNeeCoo | True if available and lead/lag alternate needed to meet stage requirement | |
| StagingRotation.BaseClasses.SelectEquipmentAtStage | selEquStaHpCoo | Select equipment at stage | |
| Buildings.Controls.OBC.CDL.Logical.Or[nHp] | enaCooHp | Enable HP required without lead/lag alternate and available or lead/lag alternate to meet stage requirement |
Revisions
-
July 10, 2026, by Antoine Gautier:
First implementation.
This is for #4512.