blockSelectModeState

Equipment state and mode selection at a given stage

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

TypeNameDefaultDescription
Booleanhave_chiWatSet to true for plants that provide CHW
IntegernStaHpNumber 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
IntegernHpNumber of reversible heat pumps
IntegernAltHp_selectnHpNumber of reversible heat pumps subject to lead/lag alternation
IntegernAltHpif nPhp > 0 then nHp else nAltHp_selectNumber of reversible heat pumps subject to lead/lag alternation
IntegernPhpNumber of polyvalent units
IntegernStaif nPhp > 0 then nHp + nPhp else size(staHp, 1)Number of stages
IntegernColif nPhp > 0 then nHp + 2*nPhp else size(staHp, 2)Number of columns in staging matrix

Connectors

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput[nAltHp]uIdxSorHpIndices of heat pumps sorted by increasing runtime
Buildings.Controls.OBC.CDL.Interfaces.IntegerInputuStaHeaHeating stage index
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput[nHp]u1AvaHeaHpHP heating mode available signal
Buildings.Controls.OBC.CDL.Interfaces.RealInput[nCol,nSta]staTraHeaTranspose of heating staging matrix at current cooling stage
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput[nHp]y1HeaHpHP heating mode command
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput[nPhp]uIdxSorPhpIndices of polyvalent units sorted by increasing runtime
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput[nPhp]u1AvaHeaPhpPolyvalent HP heating-only mode available signal
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput[nPhp]u1AvaShcPhpPolyvalent HP SHC mode available signal
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput[nPhp]y1HeaPhpPolyvalent HP heating-only mode command
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput[nPhp]y1ShcPhpPolyvalent HP SHC mode command
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput[nPhp]y1HeaOrShcPhpTrue if polyvalent HP commanded on in heating-only or SHC mode
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput[nHp + nPhp]y1HeaHpPhpHeating mode command – HP (up to nHp) and polyvalent HP (from nHp+1)
Buildings.Controls.OBC.CDL.Interfaces.IntegerInputuStaCooCooling stage index
Buildings.Controls.OBC.CDL.Interfaces.RealInput[nCol,nSta]staTraCooTranspose of cooling staging matrix at current heating stage
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput[nPhp]u1AvaCooPhpPolyvalent HP cooling-only mode available signal
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput[nPhp]y1CooPhpPolyvalent HP cooling-only mode command
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput[nHp]y1CooHpHP cooling mode command
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput[nHp + nPhp]y1CooHpPhpCooling mode command – HP (up to nHp) and polyvalent HP (from nHp+1)
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput[nHp]u1AvaCooHpHP cooling mode available signal

Components

TypeNameDefaultDescription
Buildings.Controls.OBC.CDL.Routing.RealExtractor[nCol]reqEquStaHeaExtract equipment required at given heating stage
Buildings.Controls.OBC.CDL.Routing.IntegerScalarReplicatorintScaRepHeaReplicate signal
Buildings.Controls.OBC.CDL.Integers.Sources.ConstantoneConstant
Buildings.Controls.OBC.CDL.Integers.MaxmaxIntHeaMaximum between stage index and 1
Buildings.Controls.OBC.CDL.Integers.GreaterThresholdgreZerHeaCheck if stage index is greater than zero
Buildings.Controls.OBC.CDL.Conversions.BooleanToRealbooToReaHeaCast to real
Buildings.Controls.OBC.CDL.Routing.RealScalarReplicatorreaScaRepHeaReplicate signal
Buildings.Controls.OBC.CDL.Reals.Multiply[nCol]voiStaZerHeaVoid if stage is equal to zero
Buildings.Controls.OBC.CDL.Routing.RealExtractSignalreqHpStaHeaExtract heat pumps required at given heating stage
Buildings.Controls.OBC.CDL.Routing.RealExtractSignalreqPhpHeaStaExtract polyvalent units required in heating-only mode at given heating stage
Buildings.Controls.OBC.CDL.Routing.RealExtractSignalreqPhpShcStaExtract polyvalent units required in SHC mode at given heating stage
StagingRotation.BaseClasses.SelectSortedAvailableselSorAvaHeaHpSelect units by priority order and availability – HP
StagingRotation.BaseClasses.SelectSortedAvailableselSorAvaPhpHeaSelect units by priority order and availability – Polyvalent HP in heating-only mode
StagingRotation.BaseClasses.SelectSortedAvailableselSorAvaPhpShcSelect units by priority order and availability – Polyvalent HP in SHC mode
Buildings.Controls.OBC.CDL.Logical.And[nHp]isHpAvaAltNeeHeaTrue if available and lead/lag alternate needed to meet stage requirement
Buildings.Controls.OBC.CDL.Logical.And[nPhp]isPhpAvaReqOrAltNeeHeaTrue if available and required or indexed as lead/lag alternate and needed to meet stage requirement
Buildings.Controls.OBC.CDL.Logical.And[nPhp]isPhpAvaReqOrAltNeeShcTrue if available and required or indexed as lead/lag alternate and needed to meet stage requirement
StagingRotation.BaseClasses.SelectEquipmentAtStageselEquStaHpHeaSelect equipment at stage
StagingRotation.BaseClasses.SelectEquipmentAtStageselEquStaPhpHeaSelect equipment at stage
StagingRotation.BaseClasses.SelectEquipmentAtStageselEquStaPhpShcSelect equipment at stage
Buildings.Controls.OBC.CDL.Logical.Or[nPhp]onHeaOrShcTrue if polyvalent HP commanded on in either heating-only or SHC mode
Buildings.Controls.OBC.CDL.Logical.Or[nHp]enaHeaHpEnable 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]traMatStaHpTranspose of HP staging matrix
Buildings.Controls.OBC.CDL.Routing.RealExtractor[nCol]reqEquStaCooExtract equipment required at given cooling stage
Buildings.Controls.OBC.CDL.Routing.IntegerScalarReplicatorintScaRepCooReplicate signal
Buildings.Controls.OBC.CDL.Integers.MaxmaxIntCooMaximum between stage index and 1
Buildings.Controls.OBC.CDL.Integers.GreaterThresholdgreZerCooCheck if stage index is greater than zero
Buildings.Controls.OBC.CDL.Conversions.BooleanToRealbooToReaCooCast to real
Buildings.Controls.OBC.CDL.Routing.RealScalarReplicatorreaScaRepCooReplicate signal
Buildings.Controls.OBC.CDL.Reals.Multiply[nCol]voiStaZerCooVoid if stage is equal to zero
Buildings.Controls.OBC.CDL.Routing.RealExtractSignalreqPhpCooStaExtract polyvalent units required in cooling-only mode at given cooling stage
StagingRotation.BaseClasses.SelectEquipmentAtStageselEquStaPhpCooSelect equipment at stage
StagingRotation.BaseClasses.SelectSortedAvailableselSorAvaPhpCooSelect units by priority order and availability – Polyvalent HP in cooling-only mode
Buildings.Controls.OBC.CDL.Logical.And[nPhp]isPhpAvaReqOrAltNeeCooTrue if available and required or indexed as lead/lag alternate and needed to meet stage requirement
PolyvalentHeatPumps.ModeAlternationselModPhpMode selection for polyvalent HP
Buildings.Controls.OBC.CDL.Routing.RealExtractSignalreqHpStaCooExtract heat pumps required at given cooling stage
StagingRotation.BaseClasses.SelectSortedAvailableselSorAvaCooHpSelect units by priority order and availability – HP
Buildings.Controls.OBC.CDL.Logical.And[nHp]isHpAvaAltNeeCooTrue if available and lead/lag alternate needed to meet stage requirement
StagingRotation.BaseClasses.SelectEquipmentAtStageselEquStaHpCooSelect equipment at stage
Buildings.Controls.OBC.CDL.Logical.Or[nHp]enaCooHpEnable 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.