blockModeAlternation
Information
Heating-only
When a stage transition yields a change in both the number of staged units in heating mode and the number of staged units in SHC mode, i.e., a unit switches from/to heating-only to/from SHC mode: the units previously enabled in cooling mode are removed from the staging order for the heating enable logic. The heating enable logic can thus disable a unit previously enabled in either heating or SHC mode, or enable a unit previously enabled in SHC mode or disabled.
At any other time, the units previously enabled in cooling or SHC mode are removed from the staging order for the heating enable logic. The heating enable logic can thus only disable a unit previously enabled in heating mode, or enable a unit previously disabled.
Cooling-only
When a stage transition yields a change in both the number of staged units in cooling mode and the number of staged units in SHC mode, i.e., a unit switches from/to cooling-only to/from SHC mode: the units previously enabled in heating mode are removed from the staging order for the cooling enable logic. The cooling enable logic can thus disable a unit previously enabled in either cooling or SHC mode, or enable a unit previously enabled in SHC mode or disabled.
At any other time, the units previously enabled in heating or SHC mode are removed from the staging order for the cooling enable logic. The cooling enable logic can thus only disable a unit previously enabled in cooling mode, or enable a unit previously disabled.
SHC
At any time, the units currently enabled in heating or cooling mode are removed from the staging order for the SHC enable logic. The SHC enable logic can thus only disable a unit enabled in SHC mode, or enable a disabled unit. It cannot disable a unit that has been enabled in heating or cooling mode.
Details
Staging logic requirement
The alternation logic in this block assumes that stage transitions are elementary in terms of staged unit counts: either the number of staged units changes by one in exactly one operating mode – a unit is staged on or off – or the number of staged units decreases by one in one operating mode and increases by one in another operating mode – a mode switch at plant level, which the enable logics may realize with two distinct units. The staging logic shall preclude any other transition. Under this assumption, a simultaneous change in the number of staged units in a single mode and in SHC mode identifies without ambiguity a mode switch between that mode and SHC mode.
Resolution order
The heating and cooling enable logics resolve against the unit assignment prior to the stage transition, whereas the SHC enable logic resolves against the resulting heating and cooling enable commands. This establishes the resolution order between the three logics: at a transition where a unit switches between a single mode and SHC mode, the unit claimed by the heating or cooling enable logic is removed from the staging order for the SHC enable logic at the same time instant.
Note that a unit switching from SHC mode to a single mode, or conversely, is not subject to the minimum off-time required by Buildings.Templates.Plants.Controls.HeatPumps.Subsequences.EquipmentAvailability for the alternation between heating-only and cooling-only mode.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | nPhp | Number of polyvalent HP |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Controls.OBC.CDL.Interfaces.IntegerInput[nPhp] | uIdxSor | Indices of units sorted by increasing runtime | |
| Buildings.Controls.OBC.CDL.Interfaces.IntegerInput | nHea | Number of units to be staged in heating mode | |
| Buildings.Controls.OBC.CDL.Interfaces.IntegerInput | nCoo | Number of units to be staged in cooling mode | |
| Buildings.Controls.OBC.CDL.Interfaces.IntegerInput | nShc | Number of units to be staged in SHC mode | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanInput[nPhp] | u1Hea | Enable command of each unit in heating mode, indexed by unit | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanInput[nPhp] | u1Coo | Enable command of each unit in cooling mode, indexed by unit | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanInput[nPhp] | u1Shc | Enable command of each unit in SHC mode, indexed by unit | |
| Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput[nPhp] | yIdxSorHea | Staging order for the heating enable logic | |
| Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput[nPhp] | yIdxSorCoo | Staging order for the cooling enable logic | |
| Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput[nPhp] | yIdxSorShc | Staging order for the SHC enable logic |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Controls.OBC.CDL.Integers.Change | chaHea | Detect a change in the number of units staged in heating mode | |
| Buildings.Controls.OBC.CDL.Integers.Change | chaCoo | Detect a change in the number of units staged in cooling mode | |
| Buildings.Controls.OBC.CDL.Integers.Change | chaShc | Detect a change in the number of units staged in SHC mode | |
| Buildings.Controls.OBC.CDL.Routing.BooleanScalarReplicator | repHea | Replicate heating count change to all units | |
| Buildings.Controls.OBC.CDL.Routing.BooleanScalarReplicator | repCoo | Replicate cooling count change to all units | |
| Buildings.Controls.OBC.CDL.Routing.BooleanScalarReplicator | repShc | Replicate SHC count change to all units | |
| Buildings.Controls.OBC.CDL.Logical.And[nPhp] | andHea | True at a heating-only to/from SHC mode switch | |
| Buildings.Controls.OBC.CDL.Logical.And[nPhp] | andCoo | True at a cooling-only to/from SHC mode switch | |
| Buildings.Controls.OBC.CDL.Logical.Or[nPhp] | orSin | Units enabled in heating or cooling mode | |
| Buildings.Controls.OBC.CDL.Logical.Pre[nPhp] | preHea | Enable command of each unit in heating mode prior to stage transition | |
| Buildings.Controls.OBC.CDL.Logical.Pre[nPhp] | preCoo | Enable command of each unit in cooling mode prior to stage transition | |
| Buildings.Controls.OBC.CDL.Logical.Pre[nPhp] | preShc | Enable command of each unit in SHC mode prior to stage transition | |
| Buildings.Templates.Plants.Controls.StagingRotation.BaseClasses.RemoveFromStagingOrder | remHeaRes | Restrictive heating order: remove units previously enabled in cooling mode | |
| Buildings.Templates.Plants.Controls.StagingRotation.BaseClasses.RemoveFromStagingOrder | remHeaSwi | Heating order at mode switch: also remove units previously enabled in SHC mode | |
| Buildings.Templates.Plants.Controls.StagingRotation.BaseClasses.RemoveFromStagingOrder | remCooRes | Restrictive cooling order: remove units previously enabled in heating mode | |
| Buildings.Templates.Plants.Controls.StagingRotation.BaseClasses.RemoveFromStagingOrder | remCooSwi | Cooling order at mode switch: also remove units previously enabled in SHC mode | |
| Buildings.Templates.Plants.Controls.StagingRotation.BaseClasses.RemoveFromStagingOrder | remShc | SHC order: remove units currently enabled in heating or cooling mode | |
| Buildings.Controls.OBC.CDL.Integers.Switch[nPhp] | swiHea | Apply the mode-switch heating order at a mode switch, the restrictive one otherwise | |
| Buildings.Controls.OBC.CDL.Integers.Switch[nPhp] | swiCoo | Apply the mode-switch cooling order at a mode switch, the restrictive one otherwise |
Revisions
-
July 10, 2026, by Antoine Gautier:
First implementation.
This is for #4512.