This package contains control sequences for heat pump plants.
This block implements the sequence of operation for plants with air-to-water
heat pumps. Most parts of the sequence of operation are similar to that
described in ASHRAE, 2024 for chiller plants.
The supported plant configurations are enumerated in the table below.
For plants with polyvalent heat pumps, the staging matrix is
programmatically generated, under the assumption that all units (polyvalent
heat pumps on the one hand, and optionally reversible heat pumps on the
other hand) are equally sized. See the documentation of
Buildings.Templates.Plants.Controls.PolyvalentHeatPumps.StagingParameters
for the associated logic.
Depending on the plant configuration, the term "primary HW pumps" (and the
corresponding variables containing *pumHeaWatPri*) refers
either to primary HW pumps for plants with separate primary HW and CHW pumps
(either headered or dedicated) or to dedicated primary pumps for plants with
common primary pumps serving both the HW and CHW loops.
At its current stage of development, this controller contains no logic for
handling faulted equipment. It is therefore assumed that any equipment is
available at all times.
block AirToWater
parameter Buildings.Templates.Plants.Controls.Types.PlantHeatPump typ =
Buildings.Templates.Plants.Controls.Types.PlantHeatPump.Reversible
;
final parameter Boolean have_heaWat = true
;
final parameter Boolean have_chiWat = typ <>
Buildings.Templates.Plants.Controls.Types.PlantHeatPump.HeatingOnly
;
final parameter Boolean have_hrc = typ ==
Buildings.Templates.Plants.Controls.Types.PlantHeatPump.ReversibleHeatRecovery
;
final parameter Boolean have_hp = typ <>
Buildings.Templates.Plants.Controls.Types.PlantHeatPump.Polyvalent
;
final parameter Boolean have_php = typ ==
Buildings.Templates.Plants.Controls.Types.PlantHeatPump.ReversiblePolyvalent
or typ == Buildings.Templates.Plants.Controls.Types.PlantHeatPump.Polyvalent
;
parameter Boolean is_priOnl = false
;
parameter Boolean have_valHpInlIso(start=false)
;
parameter Boolean have_valHpOutIso(start=false)
;
parameter Boolean have_valPhpInlIso(start=false)
;
parameter Boolean have_valPhpOutIso(start=false)
;
final parameter Boolean have_pumHeaWatPri = have_heaWat
;
parameter Boolean have_pumChiWatPriDedHp_select(start=false) = false
;
final parameter Boolean have_pumChiWatPriDedHp =
if have_hp
and have_chiWat
and not have_pumPriHdr
then have_pumChiWatPriDedHp_select
else false
;
final parameter Boolean have_pumChiWatPri = have_chiWat
and (have_pumPriHdr
or have_pumChiWatPriDedHp
or have_php)
;
parameter Boolean have_pumPriHdr
;
parameter Boolean have_pumHeaWatPriVar_select(start=true) = true
;
parameter Boolean have_pumChiWatPriVar_select(start=true) = true
;
final parameter Boolean have_pumHeaWatPriVar = have_pumHeaWatPri
and (is_priOnl
or have_pumHeaWatPriVar_select)
;
final parameter Boolean have_pumChiWatPriVar = have_pumChiWatPri
and (is_priOnl
or have_pumChiWatPriVar_select)
;
final parameter Boolean have_pumPriCtlDp = is_priOnl
;
final parameter Boolean have_pumHeaWatSec = have_heaWat
and not is_priOnl
;
final parameter Boolean have_pumChiWatSec = have_chiWat
and not is_priOnl
;
final parameter Boolean have_pumSecHdr = true
;
final parameter Boolean have_pumSecCtlDp = have_pumHeaWatSec
or have_pumChiWatSec
;
final parameter Boolean have_senVPri = is_priOnl
;
final parameter Boolean have_senTPriSup = true
;
parameter Boolean have_senTPriRet_select(start=false) = false
;
final parameter Boolean have_senTPriRet =
if is_priOnl
then true
else have_senTPriRet_select
;
parameter Boolean have_senTLooRet_select(start=false) = false
;
final parameter Boolean have_senTLooRet = is_priOnl
and (
if have_hrc
then true
else have_senTLooRet_select)
;
final parameter Boolean have_senVLoo = is_priOnl
and have_hrc
;
final parameter Boolean have_senVSec =
not is_priOnl
;
final parameter Boolean have_senTSec =
not is_priOnl
;
final parameter Boolean have_senVHeaWatPri = have_heaWat
and have_senVPri
;
final parameter Boolean have_senVHeaWatLoo = have_heaWat
and have_senVLoo
;
final parameter Boolean have_senVHeaWatSec = have_heaWat
and have_senVSec
;
final parameter Boolean have_senVChiWatPri = have_chiWat
and have_senVPri
;
final parameter Boolean have_senVChiWatLoo = have_chiWat
and have_senVLoo
;
final parameter Boolean have_senVChiWatSec = have_chiWat
and have_senVSec
;
final parameter Boolean have_senTHeaWatPriSup = have_heaWat
and have_senTPriSup
;
final parameter Boolean have_senTHeaWatPriRet = have_heaWat
and have_senTPriRet
;
final parameter Boolean have_senTChiWatPriSup = have_chiWat
and have_senTPriSup
;
final parameter Boolean have_senTChiWatPriRet = have_chiWat
and have_senTPriRet
;
final parameter Boolean have_senTHeaWatSecSup = have_heaWat
and have_senTSec
;
final parameter Boolean have_senTChiWatSecSup = have_chiWat
and have_senTSec
;
final parameter Boolean have_senTHeaWatLooRet = have_heaWat
and have_senTLooRet
;
final parameter Boolean have_senTChiWatLooRet = have_chiWat
and have_senTLooRet
;
final parameter Boolean have_senTHeaWatSecRet = have_heaWat
and have_senTSec
;
final parameter Boolean have_senTChiWatSecRet = have_chiWat
and have_senTSec
;
parameter Integer nHp_select(min=
if have_hp
then 1
else 0, start=1)
;
final parameter Integer nHp =
if have_hp
then nHp_select
else 0
;
parameter Integer nPhp_select(min=
if have_php
then 1
else 0, start=1)
;
final parameter Integer nPhp =
if have_php
then nPhp_select
else 0
;
parameter Integer nPumHeaWatPri_select(
min=
if have_pumHeaWatPri
then 1
else 0,
start=0) = nHp + nPhp
;
final parameter Integer nPumHeaWatPriDedHp =
if have_hp
and not have_pumPriHdr
then nHp
else 0
;
final parameter Integer nPumHeaWatPriDedPhp =
if have_php
and not have_pumPriHdr
then nPhp
else 0
;
final parameter Integer nPumHeaWatPri =
if have_pumHeaWatPri
and have_pumPriHdr
then nPumHeaWatPri_select
elseif have_pumHeaWatPri
and not have_pumPriHdr
then nHp + nPhp
else 0
;
parameter Integer nPumChiWatPri_select(
min=
if have_pumChiWatPri
then 1
else 0,
start=0) = nHp + nPhp
;
final parameter Integer nPumChiWatPriDedHp =
if have_pumChiWatPriDedHp
then nHp
else 0
;
final parameter Integer nPumChiWatPriDedPhp =
if have_php
and not have_pumPriHdr
then nPhp
else 0
;
final parameter Integer nPumChiWatPri =
if have_pumChiWatPri
and have_pumPriHdr
then nPumChiWatPri_select
elseif have_pumChiWatPri
and not have_pumPriHdr
then nPumChiWatPriDedHp + nPumChiWatPriDedPhp
else 0
;
parameter Integer nPumHeaWatSec_select(
min=
if have_pumHeaWatSec
then 1
else 0,
start=0) = nHp + nPhp
;
final parameter Integer nPumHeaWatSec =
if have_pumHeaWatSec
then nPumHeaWatSec_select
else 0
;
parameter Integer nPumChiWatSec_select(
min=
if have_pumChiWatSec
then 1
else 0,
start=0) = nHp + nPhp
;
final parameter Integer nPumChiWatSec =
if have_pumChiWatSec
then nPumChiWatSec_select
else 0
;
parameter Boolean have_senDpHeaWatRemWir(start=false) = false
;
parameter Integer nSenDpHeaWatRem(min=
if have_heaWat
then 1
else 0, start=0)
;
parameter Boolean have_senDpChiWatRemWir(start=false) = false
;
parameter Integer nSenDpChiWatRem(min=
if have_chiWat
then 1
else 0, start=0)
;
parameter Real THeaWatSup_nominal(
min=273.15,
start=50 + 273.15,
unit="K",
displayUnit="degC")
;
parameter Real THeaWatSupSet_min(
min=273.15,
start=25 + 273.15,
unit="K",
displayUnit="degC")
;
parameter Real TOutHeaWatLck(
min=273.15,
start=21 + 273.15,
unit="K",
displayUnit="degC") = 294.15
;
parameter Real capHeaHp_nominal[nHp](
min=
fill(0, nHp),
start=
fill(1, nHp),
unit=
fill("W", nHp))
;
parameter Real VHeaWatHp_flow_nominal[nHp](
min=
fill(0, nHp),
start=
fill(1E-6, nHp),
unit=
fill("m3/s", nHp))
;
parameter Real VHeaWatHp_flow_min[nHp](
min=
fill(0, nHp),
start=
fill(0, nHp),
unit=
fill("m3/s", nHp))
;
parameter Real capHeaPhp_nominal[nPhp](
min=
fill(0, nPhp),
start=
fill(1, nPhp),
unit=
fill("W", nPhp))
;
parameter Real capHeaShcPhp_nominal[nPhp](
min=
fill(0, nPhp),
start=
fill(1, nPhp),
unit=
fill("W", nPhp))
;
parameter Real VHeaWatPhp_flow_nominal[nPhp](
min=
fill(0, nPhp),
start=
fill(0, nPhp),
unit=
fill("m3/s", nPhp))
;
parameter Real VHeaWatPhp_flow_min[nPhp](
min=
fill(0, nPhp),
start=
fill(0, nPhp),
unit=
fill("m3/s", nPhp))
;
parameter Real VHeaWatPri_flow_nominal(min=0, start=0, unit="m3/s") =
sum(
cat(1, VHeaWatHp_flow_nominal, VHeaWatPhp_flow_nominal))
;
parameter Real VHeaWatSec_flow_nominal(min=0, start=0, unit="m3/s")
;
parameter Real dpHeaWatRemSet_max[nSenDpHeaWatRem](
min=
fill(0, nSenDpHeaWatRem),
start=
fill(5E4, nSenDpHeaWatRem),
unit=
fill("Pa", nSenDpHeaWatRem))
;
parameter Real dpHeaWatRemSet_min(min=0, start=5 * 6894, unit="Pa") = 5 * 6894
;
parameter Real yPumHeaWatPriHdrSet(max=2, min=0, start=1, unit="1")
;
parameter Real yPumHeaWatPriDedHpSet(max=2, min=0, start=1, unit="1")
;
parameter Real yPumHeaWatPriDedPhpSet(max=2, min=0, start=1, unit="1")
;
parameter Real TChiWatSup_nominal(
min=273.15,
start=7 + 273.15,
unit="K",
displayUnit="degC")
;
parameter Real TChiWatSupSet_max(
min=273.15,
start=15 + 273.15,
unit="K",
displayUnit="degC")
;
parameter Real TOutChiWatLck(
min=273.15,
start=16 + 273.15,
unit="K",
displayUnit="degC") = 289.15
;
parameter Real capCooHp_nominal[nHp](
min=
fill(0, nHp),
start=
fill(1, nHp),
unit=
fill("W", nHp))
;
parameter Real VChiWatHp_flow_nominal[nHp](
min=
fill(0, nHp),
start=
fill(1E-6, nHp),
unit=
fill("m3/s", nHp))
;
parameter Real VChiWatHp_flow_min[nHp](
min=
fill(0, nHp),
start=
fill(0, nHp),
unit=
fill("m3/s", nHp))
;
parameter Real capCooPhp_nominal[nPhp](
min=
fill(0, nPhp),
start=
fill(1, nPhp),
unit=
fill("W", nPhp))
;
parameter Real capCooShcPhp_nominal[nPhp](
min=
fill(0, nPhp),
start=
fill(1, nPhp),
unit=
fill("W", nPhp))
;
parameter Real VChiWatPhp_flow_nominal[nPhp](
min=
fill(0, nPhp),
start=
fill(1E-6, nPhp),
unit=
fill("m3/s", nPhp))
;
parameter Real VChiWatPhp_flow_min[nPhp](
min=
fill(0, nPhp),
start=
fill(0, nPhp),
unit=
fill("m3/s", nPhp))
;
parameter Real VChiWatPri_flow_nominal(min=0, start=0, unit="m3/s") =
sum(
cat(1, VChiWatHp_flow_nominal, VChiWatPhp_flow_nominal))
;
parameter Real VChiWatSec_flow_nominal(min=0, start=1E-6, unit="m3/s")
;
parameter Real dpChiWatRemSet_max[nSenDpChiWatRem](
min=
fill(0, nSenDpChiWatRem),
start=
fill(5E4, nSenDpChiWatRem),
unit=
fill("Pa", nSenDpChiWatRem))
;
parameter Real dpChiWatRemSet_min(min=0, start=5 * 6894, unit="Pa") = 5 * 6894
;
parameter Real yPumChiWatPriHdrSet(max=2, min=0, start=1, unit="1")
;
parameter Real yPumChiWatPriDedHpSet(max=2, min=0, start=1, unit="1")
;
parameter Real yPumChiWatPriDedPhpSet(max=2, min=0, start=1, unit="1")
;
parameter Real cp_default(min=0, unit="J/(kg.K)") = 4184
;
parameter Real rho_default(min=0, unit="kg/m3") = 996
;
parameter Boolean have_inpSch = false
;
parameter Real schHea[:, 2](start=[0, 1; 24 * 3600, 1]) = [0, 1; 24 * 3600, 1]
;
parameter Real schCoo[:, 2](start=[0, 1; 24 * 3600, 1]) = [0, 1; 24 * 3600, 1]
;
parameter Integer nReqIgnHeaWat(min=0) = 0
;
parameter Integer nReqIgnChiWat(min=0) = 0
;
parameter Real dTOutLck(min=0, unit="K") = 0.5
;
parameter Real dtRunEna(min=0, unit="s") = 15 * 60
;
parameter Real dtReqDis(min=0, unit="s") = 3 * 60
;
final parameter Integer nStaHp =
size(staHp, 1)
;
parameter Real staHp[:, :](
each final max=1,
each final min=0,
each final unit="1") = {i / nHp
for _
in 1:nHp, i
in 1:nHp}
;
final parameter Integer nSta =
if have_php
then nHp + nPhp
else nStaHp
;
final parameter Integer nAltHp(
final min=0) =
if have_hp
and not have_php
then (
if nHp == 1
then 1
else max(
{
sum(
{(
if staHp[i, j] > 0
and staHp[i, j] < 1
then 1
else 0)
for j
in 1:nHp})
for i
in 1:nStaHp}))
else nHp
;
parameter Integer idxAltHp_select[:](
each final min=1) = 1:nHp
;
final parameter Integer idxAltHp[:] =
if have_hp
and not have_php
then idxAltHp_select
else 1:nHp
;
parameter Real plrSta(max=1, min=0, start=0.9, unit="1") = 0.9
;
parameter Real dTHea(min=0, unit="K") = 2.5
;
parameter Real dTCoo(min=0, unit="K") = 1
;
parameter Real dtVal(min=0, start=90, unit="s") = 90
;
parameter Real dtRunSta(min=0, unit="s", displayUnit="min") = 900
;
parameter Real dtOff(min=0, unit="s") = 900
;
parameter Real dtOffHp(min=0, unit="s") = 180
;
parameter Real dtPri(min=0, unit="s") = 900
;
parameter Real dtSec(min=0, start=600, unit="s") = 600
;
parameter Real dtRunPumSta(min=0, start=600, unit="s") = 600
;
parameter Real dtRunFaiSafPumSta(min=0, start=300, unit="s") = 300
;
parameter Real dtRunFaiSafLowYPumSta(min=0, start=600, unit="s") = dtRunPumSta
;
parameter Real dVOffUpPumSta(max=1, min=0, start=0.03, unit="1") = 0.03
;
parameter Real dVOffDowPumSta(max=1, min=0, start=0.03, unit="1") =
dVOffUpPumSta
;
parameter Real dpOffPumSta(min=0, start=1E4, unit="Pa") = 1E4
;
parameter Real yUpPumSta(min=0, start=0.99, unit="1") = 0.99
;
parameter Real yDowPumSta(min=0, start=0.4, unit="1") = 0.4
;
parameter Real dtHol(min=0, unit="s") = 900
;
parameter Real resDpHeaWat_max(max=1, min=0, unit="1") = 0.5
;
parameter Real resTHeaWatSup_min(max=1, min=0, unit="1") = resDpHeaWat_max
;
parameter Real resDpChiWat_max(max=1, min=0, unit="1") = 0.5
;
parameter Real resTChiWatSup_min(max=1, min=0, unit="1") = resDpChiWat_max
;
parameter Real res_init(max=1, min=0, unit="1") = 1
;
parameter Real res_min(max=1, min=0, unit="1") = 0
;
parameter Real res_max(max=1, min=0, unit="1") = 1
;
parameter Real dtDel(min=100 * 1E-15, unit="s") = 900
;
parameter Real dtResHeaWat(min=1E-3, unit="s") = 300
;
parameter Integer nReqResIgnHeaWat(min=0) = 2
;
parameter Real triHeaWat(max=0, unit="1") = -0.02
;
parameter Real rspHeaWat(min=0, unit="1") = 0.03
;
parameter Real rspHeaWat_max(min=0, unit="1") = 0.07
;
parameter Real dtResChiWat(min=1E-3, unit="s") = 300
;
parameter Integer nReqResIgnChiWat(min=0) = 2
;
parameter Real triChiWat(max=0, unit="1") = -0.02
;
parameter Real rspChiWat(min=0, unit="1") = 0.03
;
parameter Real rspChiWat_max(min=0, unit="1") = 0.07
;
parameter Real yPumHeaWatPri_min(max=1, min=0, start=0.1, unit="1") = 0.1
;
parameter Real kCtlDpHeaWat(
min=100 * Buildings.Controls.OBC.CDL.Constants.eps,
start=1) = 1
;
parameter Real TiCtlDpHeaWat(
min=100 * Buildings.Controls.OBC.CDL.Constants.eps,
start=60,
unit="s") = 60
;
parameter Real yPumChiWatPri_min(max=1, min=0, start=0.1, unit="1") = 0.1
;
parameter Real kCtlDpChiWat(
min=100 * Buildings.Controls.OBC.CDL.Constants.eps,
start=1) = 1
;
parameter Real TiCtlDpChiWat(
min=100 * Buildings.Controls.OBC.CDL.Constants.eps,
start=60,
unit="s") = 60
;
parameter Real yPumHeaWatSec_min(max=1, min=0, start=0.1, unit="1") = 0.1
;
parameter Real yPumChiWatSec_min(max=1, min=0, start=0.1, unit="1") = 0.1
;
parameter Real kValMinByp(min=0, start=1) = 1
;
parameter Modelica.Units.SI.Time TiValMinByp(
min=Buildings.Controls.OBC.CDL.Constants.small,
start=0.5) = 60
;
parameter Boolean have_reqFloHrc(start=false) = false
;
parameter Real TChiWatSupHrc_min(
min=273.15,
start=4 + 273.15,
unit="K",
displayUnit="degC")
;
parameter Real THeaWatSupHrc_max(
min=273.15,
start=60 + 273.15,
unit="K",
displayUnit="degC")
;
parameter Real COPHeaHrc_nominal(min=1.1, start=2.8, unit="1")
;
parameter Real capCooHrc_min(min=0, start=0, unit="W")
;
parameter Real capHeaHrc_min(min=0, start=0, unit="W")
;
parameter Real dtLoaHrc(min=0, start=600, unit="s") = 600
;
parameter Real dtTem1Hrc(min=0, start=180, unit="s") = 180
;
parameter Real dtTem2Hrc(min=0, start=60, unit="s") = 60
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput nReqPlaHeaWat
if have_heaWat
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TOut(
final unit="K",
final quantity="ThermodynamicTemperature",
displayUnit="degC")
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1SchHea
if have_heaWat
and have_inpSch
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput nReqPlaChiWat
if have_chiWat
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1SchCoo
if have_chiWat
and have_inpSch
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput nReqResHeaWat
if have_heaWat
;
Buildings.Controls.OBC.CDL.Interfaces.IntegerInput nReqResChiWat
if have_chiWat
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1Php_actual[nPhp]
if have_php
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1PumHeaWatPriDedPhp_actual[nPumHeaWatPriDedPhp]
if have_pumHeaWatPri
and not have_pumPriHdr
and have_php
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1PumChiWatPriHdr_actual[nPumChiWatPri]
if have_pumChiWatPri
and have_pumPriHdr
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1PumHeaWatSec_actual[nPumHeaWatSec]
if have_pumHeaWatSec
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1PumChiWatSec_actual[nPumChiWatSec]
if have_pumChiWatSec
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput THeaWatPriRet(
final unit="K",
displayUnit="degC")
if have_senTHeaWatPriRet
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput VHeaWatPri_flow(
final unit="m3/s")
if have_senVHeaWatPri
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput dpHeaWatLoc(
final unit="Pa")
if have_heaWat
and not have_senDpHeaWatRemWir
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput dpHeaWatLocSet[nSenDpHeaWatRem](
each final unit="Pa")
if have_heaWat
and not have_senDpHeaWatRemWir
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput dpHeaWatRem[nSenDpHeaWatRem](
each final unit="Pa")
if have_heaWat
and have_senDpHeaWatRemWir
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput dpChiWatLoc(
final unit="Pa")
if have_chiWat
and not have_senDpChiWatRemWir
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput dpChiWatLocSet[nSenDpChiWatRem](
each final unit="Pa")
if have_chiWat
and not have_senDpChiWatRemWir
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput dpChiWatRem[nSenDpChiWatRem](
each final unit="Pa")
if have_chiWat
and have_senDpChiWatRemWir
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1ValHeaWatHpInlIso[nHp]
if have_heaWat
and have_valHpInlIso
and have_hp
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1ValHeaWatHpOutIso[nHp]
if have_heaWat
and have_valHpOutIso
and have_hp
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1ValChiWatHpInlIso[nHp]
if have_chiWat
and have_valHpInlIso
and have_hp
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1ValChiWatHpOutIso[nHp]
if have_chiWat
and have_valHpOutIso
and have_hp
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1PumHeaWatPriHdr[nPumHeaWatPri]
if have_pumHeaWatPri
and have_pumPriHdr
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1PumChiWatPriHdr[nPumChiWatPri]
if have_pumChiWatPri
and have_pumPriHdr
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1PumHeaWatSec[nPumHeaWatSec]
if have_pumHeaWatSec
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1PumChiWatSec[nPumChiWatSec]
if have_pumChiWatSec
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1Hp[nHp]
if have_hp
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1HeaHp[nHp]
if have_hp
and have_heaWat
and have_chiWat
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1HeaPhp[nPhp]
if have_php
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1CooPhp[nPhp]
if have_php
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1ValHeaWatPhpInlIso[nPhp]
if have_php
and have_valPhpInlIso
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1ValChiWatPhpInlIso[nPhp]
if have_php
and have_valPhpInlIso
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1ValHeaWatPhpOutIso[nPhp]
if have_php
and have_valPhpOutIso
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1ValChiWatPhpOutIso[nPhp]
if have_php
and have_valPhpOutIso
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput dpHeaWatRemSet[nSenDpHeaWatRem](
each final min=0,
each final unit="Pa")
if have_heaWat
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput dpChiWatRemSet[nSenDpChiWatRem](
each final min=0,
each final unit="Pa")
if have_chiWat
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yPumHeaWatPriHdr(
final unit="1")
if have_pumHeaWatPriVar
and have_pumPriHdr
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yPumChiWatPriHdr(
final unit="1")
if have_pumChiWatPriVar
and have_pumPriHdr
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yPumHeaWatSec(
final unit="1")
if have_pumHeaWatSec
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yPumChiWatSec(
final unit="1")
if have_pumChiWatSec
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput TChiWatSupSet(
final unit="K",
displayUnit="degC")
if have_chiWat
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput THeaWatSupSet(
final unit="K",
displayUnit="degC")
if have_heaWat
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TChiWatPriRet(
final unit="K",
displayUnit="degC")
if have_senTChiWatPriRet
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput VChiWatPri_flow(
final unit="m3/s")
if have_senVChiWatPri
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1Hp_actual[nHp]
if have_hp
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yPumHeaWatPriDedHp[nPumHeaWatPriDedHp](
each final unit="1")
if have_pumHeaWatPriVar
and not have_pumPriHdr
and have_hp
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yPumChiWatPriDedHp[nPumChiWatPriDedHp](
each final unit="1")
if have_pumChiWatPriVar
and have_pumChiWatPriDedHp
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput THeaWatLooOrSecRet(
final unit="K",
displayUnit="degC")
if have_senTHeaWatSecRet
or have_senTHeaWatLooRet
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput VHeaWatLooOrSec_flow(
final unit="m3/s")
if have_senVHeaWatSec
or have_senVHeaWatLoo
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TChiWatLooOrSecRet(
final unit="K",
displayUnit="degC")
if have_senTChiWatSecRet
or have_senTChiWatLooRet
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput VChiWatLooOrSec_flow(
final unit="m3/s")
if have_senVChiWatSec
or have_senVChiWatLoo
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput THeaWatSupHpSet[nHp](
each final unit="K",
each final quantity="ThermodynamicTemperature",
each displayUnit="degC")
if have_heaWat
and have_hp
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput THeaWatPriSup(
final unit="K",
displayUnit="degC")
if have_senTHeaWatPriSup
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TChiWatPriSup(
final unit="K",
displayUnit="degC")
if have_senTChiWatPriSup
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput THeaWatSecSup(
final unit="K",
displayUnit="degC")
if have_senTHeaWatSecSup
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TChiWatSecSup(
final unit="K",
displayUnit="degC")
if have_senTChiWatSecSup
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1Hrc
if have_hrc
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1CooHrc
if have_hrc
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1PumChiWatHrc
if have_hrc
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1PumHeaWatHrc
if have_hrc
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput THeaWatSupHrcSet(
final unit="K",
displayUnit="degC")
if have_hrc
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput TChiWatRetUpsHrc(
final unit="K",
displayUnit="degC")
if have_hrc
;
Buildings.Controls.OBC.CDL.Interfaces.RealInput THeaWatRetUpsHrc(
final unit="K",
displayUnit="degC")
if have_hrc
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1Hrc_actual
if have_hrc
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1ReqFloChiWat
if have_hrc
and have_reqFloHrc
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1ReqFloConWat
if have_hrc
and have_reqFloHrc
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yValHeaWatMinByp(
final unit="1")
if have_heaWat
and is_priOnl
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yValChiWatMinByp(
final unit="1")
if have_chiWat
and is_priOnl
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput TChiWatSupHpSet[nHp](
each final unit="K",
each final quantity="ThermodynamicTemperature",
each displayUnit="degC")
if have_chiWat
and have_hp
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput TChiWatSupHrcSet(
final unit="K",
displayUnit="degC")
if have_hrc
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1PumChiWatPriDedHp_actual[nPumChiWatPriDedHp]
if have_pumChiWatPri
and have_pumChiWatPriDedHp
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1PumChiWatPriDedPhp_actual[nPumChiWatPriDedPhp]
if have_pumChiWatPri
and not have_pumPriHdr
and have_php
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1PumChiWatPriDedHp[nPumChiWatPriDedHp]
if have_pumChiWatPri
and have_pumChiWatPriDedHp
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1PumChiWatPriDedPhp[nPumChiWatPriDedPhp]
if have_pumChiWatPri
and not have_pumPriHdr
and have_php
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yPumChiWatPriDedPhp[nPumChiWatPriDedPhp](
each final unit="1")
if have_pumChiWatPriVar
and not have_pumPriHdr
and have_php
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1PumHeaWatPriDedHp_actual[nPumHeaWatPriDedHp]
if have_pumHeaWatPri
and not have_pumPriHdr
and have_hp
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1PumHeaWatPriDedHp[nPumHeaWatPriDedHp]
if have_pumHeaWatPri
and have_hp
and not have_pumPriHdr
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput y1PumHeaWatPriDedPhp[nPumHeaWatPriDedPhp]
if have_pumHeaWatPri
and have_php
and not have_pumPriHdr
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput yPumHeaWatPriDedPhp[nPumHeaWatPriDedPhp](
each final unit="1")
if have_pumHeaWatPriVar
and not have_pumPriHdr
and have_php
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput THeaWatSupPhpSet[nPhp](
each final unit="K",
each final quantity="ThermodynamicTemperature",
each displayUnit="degC")
if have_heaWat
and have_php
;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput TChiWatSupPhpSet[nPhp](
each final unit="K",
each final quantity="ThermodynamicTemperature",
each displayUnit="degC")
if have_chiWat
and have_php
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant u1AvaHp[nHp](
each k=true)
if have_hp
;
Enabling.Enable enaHea(
final typ=Buildings.Templates.Plants.Controls.Types.Application.Heating,
final TOutLck=TOutHeaWatLck,
final dTOutLck=dTOutLck,
final dtReq=dtReqDis,
final dtRun=dtRunEna,
final have_inpSch=have_inpSch,
final nReqIgn=nReqIgnHeaWat,
final sch=schHea)
if have_heaWat
;
Utilities.StageIndex idxStaHea(
final use_twoMod=have_php,
final nSta=nSta,
final dtRun=dtRunSta)
if have_heaWat
;
StagingRotation.StageAvailability avaStaHea(
final have_php=have_php,
final staEqu=
if have_php
then staPhp.staHea
else staHp)
if have_heaWat
;
Subsequences.SelectModeState selMod(
final have_chiWat=have_chiWat,
final nStaHp=nStaHp,
final staHp=staHp,
final nHp=nHp,
final nAltHp_select=nAltHp,
final nPhp=nPhp)
;
Subsequences.EventSequencingMultiple seqEve(
final nHp=nHp,
final nPhp=nPhp,
final have_heaWat=have_heaWat,
final have_chiWat=have_chiWat,
final have_valHpInlIso=have_valHpInlIso,
final have_valHpOutIso=have_valHpOutIso,
final have_valPhpInlIso=have_valPhpInlIso,
final have_valPhpOutIso=have_valPhpOutIso,
final have_pumPriHdr=have_pumPriHdr,
final have_pumChiWatPriDedHp=have_pumChiWatPriDedHp,
final nPumHeaWatPri=nPumHeaWatPri,
final nPumChiWatPri=nPumChiWatPri,
final dtVal=dtVal,
final dtOff=dtOffHp)
;
StagingRotation.StageAvailability avaStaCoo(
final have_php=have_php,
final staEqu=
if have_php
then staPhp.staCoo
else staHp)
if have_chiWat
;
StagingRotation.StageChangeCommand chaStaHea(
typ=Buildings.Templates.Plants.Controls.Types.Application.Heating,
final have_php=have_php,
final have_pumSec=have_pumHeaWatSec,
final have_inpPlrSta=false,
final plrSta=plrSta,
final staEqu=
if have_php
then staPhp.staHea
else staHp,
final capEqu={
if i <= nHp
then capHeaHp_nominal[i]
elseif i <= nHp + nPhp
then capHeaPhp_nominal[i - nHp]
else capHeaShcPhp_nominal[i - nHp - nPhp]
for i
in 1:nHp + 2 * nPhp},
final dtRun=dtRunSta,
final cp_default=cp_default,
final rho_default=rho_default,
final dT=dTHea,
final dtPri=dtPri,
final dtSec=dtSec)
if have_heaWat
;
Enabling.Enable enaCoo(
final typ=Buildings.Templates.Plants.Controls.Types.Application.Cooling,
final TOutLck=TOutChiWatLck,
final dTOutLck=dTOutLck,
final dtReq=dtReqDis,
final dtRun=dtRunEna,
final have_inpSch=have_inpSch,
final nReqIgn=nReqIgnChiWat,
final sch=schCoo)
if have_chiWat
;
StagingRotation.StageChangeCommand chaStaCoo(
final typ=Buildings.Templates.Plants.Controls.Types.Application.Cooling,
final have_php=have_php,
final have_pumSec=have_pumChiWatSec,
final have_inpPlrSta=false,
final plrSta=plrSta,
final staEqu=
if have_php
then staPhp.staCoo
else staHp,
final capEqu={
if i <= nHp
then capCooHp_nominal[i]
elseif i <= nHp + nPhp
then capCooPhp_nominal[i - nHp]
else capCooShcPhp_nominal[i - nHp - nPhp]
for i
in 1:nHp + 2 * nPhp},
final dtRun=dtRunSta,
final cp_default=cp_default,
final rho_default=rho_default,
final dT=dTCoo,
final dtPri=dtPri,
final dtSec=dtSec)
if have_chiWat
;
Utilities.StageIndex idxStaCoo(
final use_twoMod=have_php,
final nSta=nSta,
final dtRun=dtRunSta)
if have_chiWat
;
Subsequences.EquipmentAvailability avaHeaCooHp[nHp](
each final is_php=false,
each final have_heaWat=have_heaWat,
each final have_chiWat=have_chiWat,
each final dtOff=dtOff)
if have_hp
;
StagingRotation.SortRuntime sorRunTimHp(
final idxEquAlt=idxAltHp, nin=nHp)
if have_hp
;
Pumps.Generic.StagingHeadered staPumHeaWatPri(
final is_pri=true,
final is_ctlDp=have_pumPriCtlDp,
final have_valInlIso=
if have_hp
then have_valHpInlIso
else have_valPhpInlIso,
final have_valOutIso=
if have_hp
then have_valHpOutIso
else have_valPhpOutIso,
final nEqu=nHp + nPhp,
final nPum=nPumHeaWatPri,
final is_hdr=have_pumPriHdr,
final dtRun=dtRunPumSta,
final dVOffUp=dVOffUpPumSta,
final dVOffDow=dVOffDowPumSta,
final nSenDp=
if have_senDpHeaWatRemWir
then nSenDpHeaWatRem
else 1,
final V_flow_nominal=VHeaWatPri_flow_nominal,
final dtRunFaiSaf=dtRunFaiSafPumSta,
final dtRunFaiSafLowY=dtRunFaiSafLowYPumSta,
final dpOff=dpOffPumSta,
final yUp=yUpPumSta,
final yDow=yDowPumSta)
if have_pumHeaWatPri
;
Pumps.Generic.StagingHeadered staPumChiWatPri(
final is_pri=true,
final is_ctlDp=have_pumPriCtlDp,
final have_valInlIso=
if have_hp
then have_valHpInlIso
else have_valPhpInlIso,
final have_valOutIso=
if have_hp
then have_valHpOutIso
else have_valPhpOutIso,
final nEqu=nHp + nPhp,
final nPum=nPumChiWatPri,
final is_hdr=have_pumPriHdr,
final dtRun=dtRunPumSta,
final dVOffUp=dVOffUpPumSta,
final dVOffDow=dVOffDowPumSta,
final nSenDp=
if have_senDpChiWatRemWir
then nSenDpChiWatRem
else 1,
final V_flow_nominal=VChiWatPri_flow_nominal,
final dtRunFaiSaf=dtRunFaiSafPumSta,
final dtRunFaiSafLowY=dtRunFaiSafLowYPumSta,
final dpOff=dpOffPumSta,
final yUp=yUpPumSta,
final yDow=yDowPumSta)
if have_pumChiWatPri
;
Pumps.Generic.StagingHeadered staPumChiWatSec(
final is_pri=false,
final nEqu=nHp + nPhp,
final nPum=nPumChiWatSec,
final is_hdr=have_pumSecHdr,
final is_ctlDp=have_pumSecCtlDp,
final nSenDp=
if have_senDpChiWatRemWir
then nSenDpChiWatRem
else 1,
final V_flow_nominal=VChiWatSec_flow_nominal,
final dtRun=dtRunPumSta,
final dtRunFaiSaf=dtRunFaiSafPumSta,
final dtRunFaiSafLowY=dtRunFaiSafLowYPumSta,
final dVOffUp=dVOffUpPumSta,
final dVOffDow=dVOffDowPumSta,
final dpOff=dpOffPumSta,
final yUp=yUpPumSta,
final yDow=yDowPumSta)
if have_pumChiWatSec
;
Pumps.Generic.StagingHeadered staPumHeaWatSec(
final is_pri=false,
final nEqu=nHp + nPhp,
final nPum=nPumHeaWatSec,
final is_hdr=have_pumSecHdr,
final is_ctlDp=have_pumSecCtlDp,
final nSenDp=
if have_senDpHeaWatRemWir
then nSenDpHeaWatRem
else 1,
final V_flow_nominal=VHeaWatSec_flow_nominal,
final dtRun=dtRunPumSta,
final dtRunFaiSaf=dtRunFaiSafPumSta,
final dtRunFaiSafLowY=dtRunFaiSafLowYPumSta,
final dVOffUp=dVOffUpPumSta,
final dVOffDow=dVOffDowPumSta,
final dpOff=dpOffPumSta,
final yUp=yUpPumSta,
final yDow=yDowPumSta)
if have_pumHeaWatSec
;
Utilities.PlaceholderReal THeaWatRet(
final have_inp=have_senTHeaWatPriRet
and have_senVHeaWatPri,
final have_inpPh=true)
if have_heaWat
;
Utilities.PlaceholderReal VHeaWatSta_flow(
final have_inp=have_senTHeaWatPriRet
and have_senVHeaWatPri,
final have_inpPh=true)
if have_heaWat
;
Utilities.PlaceholderReal TChiWatRet(
final have_inp=have_senTChiWatPriRet
and have_senVChiWatPri,
final have_inpPh=true)
if have_chiWat
;
Utilities.PlaceholderReal VChiWatSta_flow(
final have_inp=have_senTChiWatPriRet
and have_senVChiWatPri,
final have_inpPh=true)
if have_chiWat
;
StagingRotation.StageCompletion comStaCoo(
final nPhp=nPhp,
nin=nHp + 2 * nPhp)
if have_chiWat
;
StagingRotation.StageCompletion comStaHea(
final nPhp=nPhp,
nin=nHp + 2 * nPhp)
if have_heaWat
;
Setpoints.PlantReset resHeaWat(
final TSup_nominal=THeaWatSup_nominal,
final TSupSetLim=THeaWatSupSet_min,
final dpSet_max=dpHeaWatRemSet_max,
final dpSet_min=dpHeaWatRemSet_min,
final dtDel=dtDel,
final dtHol=dtHol,
final dtRes=dtResHeaWat,
final nReqResIgn=nReqResIgnHeaWat,
final nSenDpRem=nSenDpHeaWatRem,
final resDp_max=resDpHeaWat_max,
final resTSup_min=resTHeaWatSup_min,
final res_init=res_init,
final res_max=res_max,
final res_min=res_min,
final rsp=rspHeaWat,
final rsp_max=rspHeaWat_max,
final tri=triHeaWat)
if have_heaWat
;
Setpoints.PlantReset resChiWat(
final TSup_nominal=TChiWatSup_nominal,
final TSupSetLim=TChiWatSupSet_max,
final dpSet_max=dpChiWatRemSet_max,
final dpSet_min=dpChiWatRemSet_min,
final dtDel=dtDel,
final dtHol=dtHol,
final dtRes=dtResChiWat,
final nReqResIgn=nReqResIgnChiWat,
final nSenDpRem=nSenDpChiWatRem,
final resDp_max=resDpChiWat_max,
final resTSup_min=resTChiWatSup_min,
final res_init=res_init,
final res_max=res_max,
final res_min=res_min,
final rsp=rspChiWat,
final rsp_max=rspChiWat_max,
final tri=triChiWat)
if have_chiWat
;
Pumps.Primary.VariableSpeedWithHeatPumps ctlPumPri(
final have_heaWat=have_heaWat,
final have_chiWat=have_chiWat,
final have_pumPriCtlDp=have_pumPriCtlDp,
final have_pumPriHdr=have_pumPriHdr,
final have_pumChiWatPriDedHp=have_pumChiWatPriDedHp,
final nHp=nHp,
final nPhp=nPhp,
final nPumHeaWatPri=nPumHeaWatPri,
final nPumChiWatPri=nPumChiWatPri,
final yPumHeaWatPriHdrSet=yPumHeaWatPriHdrSet,
final yPumChiWatPriHdrSet=yPumChiWatPriHdrSet,
final yPumHeaWatPriDedHpSet=yPumHeaWatPriDedHpSet,
final yPumChiWatPriDedHpSet=yPumChiWatPriDedHpSet,
final yPumHeaWatPriDedPhpSet=yPumHeaWatPriDedPhpSet,
final yPumChiWatPriDedPhpSet=yPumChiWatPriDedPhpSet,
final have_senDpChiWatRemWir=have_senDpChiWatRemWir,
final have_senDpHeaWatRemWir=have_senDpHeaWatRemWir,
final kCtlDpChiWat=kCtlDpChiWat,
final kCtlDpHeaWat=kCtlDpHeaWat,
final nSenDpChiWatRem=nSenDpChiWatRem,
final nSenDpHeaWatRem=nSenDpHeaWatRem,
final TiCtlDpChiWat=TiCtlDpChiWat,
final TiCtlDpHeaWat=TiCtlDpHeaWat,
final yPumChiWatPri_min=yPumChiWatPri_min,
final yPumHeaWatPri_min=yPumHeaWatPri_min)
if have_pumHeaWatPriVar
or have_pumChiWatPriVar
;
Pumps.Generic.ControlDifferentialPressure ctlPumHeaWatSec(
final have_senDpRemWir=have_senDpHeaWatRemWir,
final nPum=nPumHeaWatSec,
final nSenDpRem=nSenDpHeaWatRem,
final y_min=yPumHeaWatSec_min,
final k=kCtlDpHeaWat,
final Ti=TiCtlDpHeaWat)
if have_pumHeaWatSec
and have_pumSecCtlDp
;
Pumps.Generic.ControlDifferentialPressure ctlPumChiWatSec(
final have_senDpRemWir=have_senDpChiWatRemWir,
final nPum=nPumChiWatSec,
final nSenDpRem=nSenDpChiWatRem,
final y_min=yPumChiWatSec_min,
final k=kCtlDpChiWat,
final Ti=TiCtlDpChiWat)
if have_pumChiWatSec
and have_pumSecCtlDp
;
Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator repTChiWatSupHpSet(
final nout=nHp)
if have_chiWat
and have_hp
;
Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator repTHeaWatSupHpSet(
final nout=nHp)
if have_heaWat
and have_hp
;
HeatRecoveryChillers.Controller hrc(
final COPHea_nominal=COPHeaHrc_nominal,
final TChiWatSup_min=TChiWatSupHrc_min,
final THeaWatSup_max=THeaWatSupHrc_max,
final capCoo_min=capCooHrc_min,
final capHea_min=capHeaHrc_min,
final cp_default=cp_default,
final dtLoa=dtLoaHrc,
final dtRun=dtRunEna,
final dtTem1=dtTem1Hrc,
final dtTem2=dtTem2Hrc,
final have_reqFlo=have_reqFloHrc,
final rho_default=rho_default)
if have_hrc
;
Buildings.Controls.OBC.CDL.Routing.RealExtractSignal pasDpHeaWatRemSet(
final nin=nSenDpHeaWatRem,
final nout=nSenDpHeaWatRem)
if have_heaWat
and have_senDpHeaWatRemWir
;
Buildings.Controls.OBC.CDL.Routing.RealExtractSignal pasDpChiWatRemSet(
final nin=nSenDpChiWatRem,
final nout=nSenDpChiWatRem)
if have_chiWat
and have_senDpChiWatRemWir
;
MinimumFlow.ControllerHeatPumps ctlFloMin(
final have_chiWat=have_chiWat,
final have_heaWat=have_heaWat,
final have_pumPriHdr=have_pumPriHdr,
have_pumChiWatPriDedHp=have_pumChiWatPriDedHp,
final nHp=nHp,
final nPhp=nPhp,
final have_valInlIso=have_valHpInlIso
or have_valPhpInlIso,
final have_valOutIso=have_valHpOutIso
or have_valPhpOutIso,
final k=kValMinByp,
final Ti=TiValMinByp,
final VChiWat_flow_min={
if i <= nHp
then VChiWatHp_flow_min[i]
else VChiWatPhp_flow_min[i - nHp]
for i
in 1:nHp + nPhp},
final VChiWat_flow_nominal={
if i <= nHp
then VChiWatHp_flow_nominal[i]
else VChiWatPhp_flow_nominal[i - nHp]
for i
in 1:nHp + nPhp},
final VHeaWat_flow_min={
if i <= nHp
then VHeaWatHp_flow_min[i]
else VHeaWatPhp_flow_min[i - nHp]
for i
in 1:nHp + nPhp},
final VHeaWat_flow_nominal={
if i <= nHp
then VHeaWatHp_flow_nominal[i]
else VHeaWatPhp_flow_nominal[i - nHp]
for i
in 1:nHp + nPhp})
if is_priOnl
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant u1AvaPhp[nPhp](
each k=true)
if have_php
;
PolyvalentHeatPumps.StagingParameters staPhp(
final nHp=nHp,
final nPhp=nPhp)
;
Subsequences.EquipmentAvailability avaHeaCooPhp[nPhp](
each final is_php=true,
each final have_heaWat=have_heaWat,
each final have_chiWat=have_chiWat,
each final dtOff=dtOff)
if have_php
;
Subsequences.RoutingPrimaryPumpStatus rouPumChiWatPri(
final have_pumPriHdr=have_pumPriHdr,
final nPumPriDedHp=nPumChiWatPriDedHp,
final nPumPriDedPhp=nPumChiWatPriDedPhp,
final nPumPri=nPumChiWatPri)
if have_pumChiWatPri
;
Buildings.Controls.OBC.CDL.Interfaces.BooleanInput u1PumHeaWatPriHdr_actual[nPumHeaWatPri]
if have_pumHeaWatPri
and have_pumPriHdr
;
Subsequences.RoutingPrimaryPumpStatus rouPumHeaWatPri(
final have_pumPriHdr=have_pumPriHdr,
final nPumPriDedHp=nPumHeaWatPriDedHp,
final nPumPriDedPhp=nPumHeaWatPriDedPhp,
final nPumPri=nPumHeaWatPri)
if have_pumHeaWatPri
;
Buildings.Controls.OBC.CDL.Utilities.Assert assPlaCfg(
message="Primary-secondary plants with headered pumps are not supported when both reversible and polyvalent HP are present")
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant conIsPriOnl(
final k=is_priOnl)
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant conNotRevPhp(
k=typ <>
Buildings.Templates.Plants.Controls.Types.PlantHeatPump.ReversiblePolyvalent)
;
Buildings.Controls.OBC.CDL.Logical.Sources.Constant conNotHavePumPriHdr(
final k=
not have_pumPriHdr)
;
Buildings.Controls.OBC.CDL.Logical.MultiOr mulOrConfSupported(nin=3)
;
Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator repTHeaWatSupPhpSet(
final nout=nPhp)
if have_heaWat
and have_php
;
Buildings.Controls.OBC.CDL.Routing.RealScalarReplicator repTChiWatSupPhpSet(
final nout=nPhp)
if have_chiWat
and have_php
;
PolyvalentHeatPumps.AssertMinimumRuntime assMinRunTimPhp(
final nUni=nPhp)
if have_php
;
PolyvalentHeatPumps.AssertMinimumRuntime assMinOffTimPhp(
use_runTim=false,
final nUni=nPhp,
dt_min=15 * 60)
if have_php
;
StagingRotation.SortRuntime sorRunTimPhp(nin=nPhp)
if have_php
;
Buildings.Controls.OBC.CDL.Logical.And y1ShcPhp[nPhp]
if have_php
;
Subsequences.AssertMinimumRuntime assMinRunTimHp(
final have_chiWat=have_chiWat,
final nUni=nHp)
if have_hp
;
Subsequences.AssertMinimumRuntime assMinOffTimHp(
final have_chiWat=have_chiWat,
use_runTim=false,
final nUni=nHp,
dt_min=15 * 60)
if have_hp
;
equation
connect(u1SchHea, enaHea.u1Sch);
connect(nReqPlaHeaWat, enaHea.nReqPla);
connect(TOut, enaHea.TOut);
connect(enaHea.y1, idxStaHea.u1Lea);
connect(avaStaHea.y1, idxStaHea.u1AvaSta);
connect(idxStaHea.y, selMod.uStaHea);
connect(seqEve.y1ValHeaWatOutIso[1:nHp], y1ValHeaWatHpOutIso);
connect(seqEve.y1ValHeaWatInlIso[1:nHp], y1ValHeaWatHpInlIso);
connect(seqEve.y1ValChiWatInlIso[1:nHp], y1ValChiWatHpInlIso);
connect(seqEve.y1ValChiWatOutIso[1:nHp], y1ValChiWatHpOutIso);
connect(idxStaHea.y, chaStaHea.uSta);
connect(chaStaHea.y1Dow, idxStaHea.u1Dow);
connect(chaStaHea.y1Up, idxStaHea.u1Up);
connect(chaStaHea.y1Lck, chaStaCoo.u1Lck);
connect(chaStaHea.uStaOppNexHig, chaStaCoo.yStaNexHig);
connect(avaStaHea.y1, chaStaHea.u1AvaSta);
connect(nReqPlaChiWat, enaCoo.nReqPla);
connect(TOut, enaCoo.TOut);
connect(u1SchCoo, enaCoo.u1Sch);
connect(avaStaCoo.y1, chaStaCoo.u1AvaSta);
connect(enaCoo.y1, idxStaCoo.u1Lea);
connect(chaStaCoo.y1Up, idxStaCoo.u1Up);
connect(chaStaCoo.y1Dow, idxStaCoo.u1Dow);
connect(idxStaCoo.y, selMod.uStaCoo);
connect(avaStaCoo.y1, idxStaCoo.u1AvaSta);
connect(idxStaCoo.y, chaStaCoo.uSta);
connect(staPumHeaWatPri.y1Ded_actual, seqEve.u1PumHeaWatPriDed_actual);
connect(staPumHeaWatPri.y1Hdr_actual, seqEve.u1PumHeaWatPriHdr_actual);
connect(staPumHeaWatPri.y1, y1PumHeaWatPriHdr);
connect(staPumHeaWatPri.y1[nPumHeaWatPri - nPumHeaWatPriDedPhp +
1:nPumHeaWatPri], y1PumHeaWatPriDedPhp);
connect(staPumHeaWatPri.y1[1:nPumHeaWatPriDedHp], y1PumHeaWatPriDedHp);
connect(staPumChiWatPri.y1Ded_actual, seqEve.u1PumChiWatPriDed_actual);
connect(staPumChiWatPri.y1Hdr_actual, seqEve.u1PumChiWatPriHdr_actual);
connect(staPumChiWatPri.y1, y1PumChiWatPriHdr);
connect(staPumChiWatPri.y1[nPumChiWatPri - nPumChiWatPriDedPhp +
1:nPumChiWatPri], y1PumChiWatPriDedPhp);
connect(staPumChiWatPri.y1[1:nPumChiWatPriDedHp], y1PumChiWatPriDedHp);
connect(seqEve.y1PumChiWatPri, staPumChiWatPri.u1PumPri);
connect(rouPumChiWatPri.y1, staPumChiWatPri.u1Pum_actual);
connect(rouPumHeaWatPri.y1, staPumHeaWatPri.u1Pum_actual);
connect(staPumHeaWatSec.y1, y1PumHeaWatSec);
connect(staPumChiWatSec.y1, y1PumChiWatSec);
connect(u1PumHeaWatSec_actual, staPumHeaWatSec.u1Pum_actual);
connect(u1PumChiWatSec_actual, staPumChiWatSec.u1Pum_actual);
connect(staPumHeaWatPri.y1, y1PumHeaWatPriHdr);
connect(seqEve.y1PumHeaWatPri, staPumHeaWatPri.u1PumPri);
connect(VHeaWatLooOrSec_flow, staPumHeaWatSec.V_flow);
connect(VChiWatLooOrSec_flow, staPumChiWatSec.V_flow);
connect(THeaWatPriRet, THeaWatRet.u);
connect(THeaWatRet.y, chaStaHea.TRet);
connect(THeaWatLooOrSecRet, THeaWatRet.uPh);
connect(VHeaWatPri_flow, VHeaWatSta_flow.u);
connect(VHeaWatSta_flow.y, chaStaHea.V_flow);
connect(VHeaWatLooOrSec_flow, VHeaWatSta_flow.uPh);
connect(TChiWatPriRet, TChiWatRet.u);
connect(TChiWatRet.y, chaStaCoo.TRet);
connect(TChiWatLooOrSecRet, TChiWatRet.uPh);
connect(VChiWatPri_flow, VChiWatSta_flow.u);
connect(VChiWatSta_flow.y, chaStaCoo.V_flow);
connect(VChiWatLooOrSec_flow, VChiWatSta_flow.uPh);
connect(enaHea.y1, staPumHeaWatSec.u1Pla);
connect(enaCoo.y1, staPumChiWatSec.u1Pla);
connect(seqEve.y1ValHeaWatInlIso, staPumHeaWatPri.u1ValInlIso);
connect(seqEve.y1ValHeaWatOutIso, staPumHeaWatPri.u1ValOutIso);
connect(seqEve.y1ValChiWatInlIso, staPumChiWatPri.u1ValInlIso);
connect(seqEve.y1ValChiWatOutIso, staPumChiWatPri.u1ValOutIso);
connect(u1Hp_actual, sorRunTimHp.u1Run);
connect(u1AvaHp.y, sorRunTimHp.u1Ava);
connect(idxStaCoo.y, comStaCoo.uSta);
connect(comStaCoo.y1, chaStaCoo.u1StaPro);
connect(u1Hp_actual, comStaCoo.u1_actual[1:nHp]);
connect(u1Php_actual, comStaCoo.u1_actual[nHp + 1:nHp + nPhp]);
connect(u1Php_actual, comStaCoo.u1_actual[nHp + nPhp + 1:nHp + 2 * nPhp]);
connect(y1Hp, comStaCoo.u1[1:nHp]);
connect(y1CooPhp, comStaCoo.u1[nHp + 1:nHp + nPhp]);
connect(idxStaHea.y, comStaHea.uSta);
connect(u1Hp_actual, comStaHea.u1_actual[1:nHp]);
connect(u1Php_actual, comStaHea.u1_actual[nHp + 1:nHp + nPhp]);
connect(u1Php_actual, comStaHea.u1_actual[nHp + nPhp + 1:nHp + 2 * nPhp]);
connect(y1Hp, comStaHea.u1[1:nHp]);
connect(y1HeaPhp, comStaHea.u1[nHp + 1:nHp + nPhp]);
connect(comStaHea.y1, chaStaHea.u1StaPro);
connect(resHeaWat.dpSet, dpHeaWatRemSet);
connect(resChiWat.dpSet, dpChiWatRemSet);
connect(nReqResHeaWat, resHeaWat.nReqRes);
connect(nReqResChiWat, resChiWat.nReqRes);
connect(enaCoo.y1, resChiWat.u1Ena);
connect(enaHea.y1, resHeaWat.u1Ena);
connect(comStaHea.y1, resHeaWat.u1StaPro);
connect(comStaCoo.y1, resChiWat.u1StaPro);
connect(resChiWat.TSupSet, chaStaCoo.TSupSet);
connect(resHeaWat.TSupSet, chaStaHea.TSupSet);
connect(ctlPumPri.yPumHeaWatPriHdr, yPumHeaWatPriHdr);
connect(ctlPumPri.yPumChiWatPriHdr, yPumChiWatPriHdr);
connect(ctlPumPri.yPumHeaWatPriDedHp, yPumHeaWatPriDedHp);
connect(ctlPumPri.yPumHeaWatPriDedPhp, yPumHeaWatPriDedPhp);
connect(y1PumHeaWatPriHdr, ctlPumPri.u1PumHeaWatPriHdr);
connect(y1PumChiWatPriHdr, ctlPumPri.u1PumChiWatPriHdr);
connect(y1PumHeaWatPriDedHp, ctlPumPri.u1PumHeaWatPriDedHp);
connect(y1PumChiWatPriDedHp, ctlPumPri.u1PumChiWatPriDedHp);
connect(y1PumHeaWatPriDedPhp, ctlPumPri.u1PumHeaWatPriDedPhp);
connect(y1PumChiWatPriDedPhp, ctlPumPri.u1PumChiWatPriDedPhp);
connect(y1HeaHp, ctlPumPri.u1HeaHp);
connect(ctlPumHeaWatSec.y, yPumHeaWatSec);
connect(ctlPumChiWatSec.y, yPumChiWatSec);
connect(u1PumHeaWatSec_actual, ctlPumHeaWatSec.y1_actual);
connect(u1PumChiWatSec_actual, ctlPumChiWatSec.y1_actual);
connect(resChiWat.dpSet, ctlPumChiWatSec.dpRemSet);
connect(dpHeaWatRem, ctlPumHeaWatSec.dpRem);
connect(resHeaWat.dpSet, ctlPumHeaWatSec.dpRemSet);
connect(dpHeaWatLoc, ctlPumHeaWatSec.dpLoc);
connect(dpHeaWatLocSet, ctlPumHeaWatSec.dpLocSet);
connect(dpChiWatRem, ctlPumChiWatSec.dpRem);
connect(dpChiWatLocSet, ctlPumChiWatSec.dpLocSet);
connect(dpChiWatLoc, ctlPumChiWatSec.dpLoc);
connect(resChiWat.TSupSet, repTChiWatSupHpSet.u);
connect(resHeaWat.TSupSet, repTHeaWatSupHpSet.u);
connect(resChiWat.TSupSet, TChiWatSupSet);
connect(resHeaWat.TSupSet, THeaWatSupSet);
connect(hrc.y1, y1Hrc);
connect(hrc.y1Coo, y1CooHrc);
connect(hrc.y1PumChiWat, y1PumChiWatHrc);
connect(hrc.y1PumHeaWat, y1PumHeaWatHrc);
connect(TChiWatSupSet, hrc.TChiWatSupSet);
connect(THeaWatSupSet, hrc.THeaWatSupSet);
connect(enaCoo.y1, hrc.u1Coo);
connect(enaHea.y1, hrc.u1Hea);
connect(TChiWatRetUpsHrc, hrc.TChiWatRetUpsHrc);
connect(THeaWatRetUpsHrc, hrc.THeaWatRetUpsHrc);
connect(THeaWatLooOrSecRet, hrc.THeaWatHrcLvg);
connect(TChiWatLooOrSecRet, hrc.TChiWatHrcLvg);
connect(u1Hrc_actual, hrc.u1Hrc_actual);
connect(u1ReqFloChiWat, hrc.u1ReqFloChiWat);
connect(u1ReqFloConWat, hrc.u1ReqFloConWat);
connect(TChiWatPriSup, chaStaCoo.TPriSup);
connect(THeaWatSecSup, chaStaHea.TSecSup);
connect(TChiWatSecSup, chaStaCoo.TSecSup);
connect(THeaWatPriSup, chaStaHea.TPriSup);
connect(ctlPumHeaWatSec.y, staPumHeaWatSec.y);
connect(ctlPumChiWatSec.y, staPumChiWatSec.y);
connect(ctlPumHeaWatSec.dpLocSetMax, staPumHeaWatSec.dpSet[1]);
connect(ctlPumChiWatSec.dpLocSetMax, staPumChiWatSec.dpSet[1]);
connect(dpHeaWatLoc, staPumHeaWatSec.dp[1]);
connect(dpChiWatLoc, staPumChiWatSec.dp[1]);
connect(dpChiWatRem, staPumChiWatSec.dp);
connect(dpHeaWatRem, staPumHeaWatSec.dp);
connect(resHeaWat.dpSet, pasDpHeaWatRemSet.u);
connect(pasDpHeaWatRemSet.y, staPumHeaWatSec.dpSet);
connect(pasDpChiWatRemSet.y, staPumChiWatSec.dpSet);
connect(resChiWat.dpSet, pasDpChiWatRemSet.u);
connect(resChiWat.dpSet, ctlPumPri.dpChiWatRemSet);
connect(resHeaWat.dpSet, ctlPumPri.dpHeaWatRemSet);
connect(dpHeaWatRem, ctlPumPri.dpHeaWatRem);
connect(dpHeaWatLocSet, ctlPumPri.dpHeaWatLocSet);
connect(dpHeaWatLoc, ctlPumPri.dpHeaWatLoc);
connect(pasDpHeaWatRemSet.y, staPumHeaWatPri.dpSet);
connect(pasDpChiWatRemSet.y, staPumChiWatPri.dpSet);
connect(ctlPumPri.dpChiWatLocSetMax, staPumChiWatPri.dpSet[1]);
connect(ctlPumPri.dpHeaWatLocSetMax, staPumHeaWatPri.dpSet[1]);
connect(ctlPumPri.yPumHeaWatPriHdr, staPumHeaWatPri.y);
connect(ctlPumPri.yPumChiWatPriHdr, staPumChiWatPri.y);
connect(ctlPumPri.yPumChiWatPriDedHp, yPumChiWatPriDedHp);
connect(ctlPumPri.yPumChiWatPriDedPhp, yPumChiWatPriDedPhp);
connect(u1PumHeaWatPriHdr_actual, ctlPumPri.u1PumHeaWatPriHdr_actual);
connect(u1PumChiWatPriHdr_actual, ctlPumPri.u1PumChiWatPriHdr_actual);
connect(u1PumHeaWatPriDedHp_actual, ctlPumPri.u1PumHeaWatPriDedHp_actual);
connect(u1PumChiWatPriDedHp_actual, ctlPumPri.u1PumChiWatPriDedHp_actual);
connect(u1PumHeaWatPriDedPhp_actual, ctlPumPri.u1PumHeaWatPriDedPhp_actual);
connect(u1PumChiWatPriDedPhp_actual, ctlPumPri.u1PumChiWatPriDedPhp_actual);
connect(dpChiWatRem, ctlPumPri.dpChiWatRem);
connect(dpChiWatLocSet, ctlPumPri.dpChiWatLocSet);
connect(dpChiWatLoc, ctlPumPri.dpChiWatLoc);
connect(dpHeaWatRem, staPumHeaWatPri.dp);
connect(dpChiWatRem, staPumChiWatPri.dp);
connect(dpHeaWatLoc, staPumHeaWatPri.dp[1]);
connect(dpChiWatLoc, staPumChiWatPri.dp[1]);
connect(VChiWatPri_flow, staPumChiWatPri.V_flow);
connect(VHeaWatPri_flow, staPumHeaWatPri.V_flow);
connect(ctlFloMin.yValHeaWatMinByp, yValHeaWatMinByp);
connect(ctlFloMin.yValChiWatMinByp, yValChiWatMinByp);
connect(y1Hp, ctlFloMin.u1Hp);
connect(y1HeaHp, ctlFloMin.u1HeaHp);
connect(y1HeaPhp, ctlFloMin.u1HeaPhp);
connect(y1CooPhp, ctlFloMin.u1CooPhp);
connect(seqEve.y1ValHeaWatInlIso, ctlFloMin.u1ValHeaWatInlIso);
connect(seqEve.y1ValHeaWatOutIso, ctlFloMin.u1ValHeaWatOutIso);
connect(seqEve.y1ValChiWatInlIso, ctlFloMin.u1ValChiWatInlIso);
connect(seqEve.y1ValChiWatOutIso, ctlFloMin.u1ValChiWatOutIso);
connect(u1PumHeaWatPriDedHp_actual, ctlFloMin.u1PumHeaWatPriDedHp_actual);
connect(u1PumHeaWatPriDedPhp_actual, ctlFloMin.u1PumHeaWatPriDedPhp_actual);
connect(u1PumChiWatPriDedHp_actual, ctlFloMin.u1PumChiWatPriDedHp_actual);
connect(u1PumChiWatPriDedPhp_actual, ctlFloMin.u1PumChiWatPriDedPhp_actual);
connect(VHeaWatPri_flow, ctlFloMin.VHeaWatPri_flow);
connect(VChiWatPri_flow, ctlFloMin.VChiWatPri_flow);
connect(repTHeaWatSupHpSet.y, THeaWatSupHpSet);
connect(repTChiWatSupHpSet.y, TChiWatSupHpSet);
connect(TChiWatSupSet, TChiWatSupHrcSet);
connect(THeaWatSupSet, THeaWatSupHrcSet);
connect(idxStaCoo.y, avaStaHea.uStaOpp);
connect(idxStaHea.y, avaStaCoo.uStaOpp);
connect(idxStaCoo.y, chaStaHea.uStaOpp);
connect(idxStaHea.y, chaStaCoo.uStaOpp);
connect(chaStaHea.staTra, selMod.staTraHea);
connect(chaStaCoo.staTra, selMod.staTraCoo);
connect(sorRunTimHp.yIdx, selMod.uIdxSorHp);
connect(sorRunTimPhp.yIdx, selMod.uIdxSorPhp);
connect(u1AvaHp.y, avaHeaCooHp.u1Ava);
connect(avaHeaCooHp.y1Hea, avaStaHea.u1Ava[1:nHp]);
connect(avaHeaCooHp.y1Coo, avaStaCoo.u1Ava[1:nHp]);
connect(avaHeaCooPhp.y1Coo, avaStaCoo.u1Ava[nHp + 1:nHp + nPhp]);
connect(avaHeaCooPhp.y1Shc, avaStaCoo.u1Ava[nHp + nPhp + 1:nHp + 2 * nPhp]);
connect(avaHeaCooPhp.y1Hea, avaStaHea.u1Ava[nHp + 1:nHp + nPhp]);
connect(avaHeaCooPhp.y1Shc, avaStaHea.u1Ava[nHp + nPhp + 1:nHp + 2 * nPhp]);
connect(u1AvaPhp.y, avaHeaCooPhp.u1Ava);
connect(selMod.y1HeaPhp, avaHeaCooPhp.u1EnaHea);
connect(selMod.y1ShcPhp, avaHeaCooPhp.u1EnaShc);
connect(selMod.y1HeaHp, avaHeaCooHp.u1EnaHea);
connect(selMod.y1CooPhp, avaHeaCooPhp.u1EnaCoo);
connect(selMod.y1CooHp, avaHeaCooHp.u1EnaCoo);
connect(avaHeaCooHp.y1Coo, selMod.u1AvaCooHp);
connect(avaHeaCooHp.y1Hea, selMod.u1AvaHeaHp);
connect(avaHeaCooPhp.y1Hea, selMod.u1AvaHeaPhp);
connect(avaHeaCooPhp.y1Shc, selMod.u1AvaShcPhp);
connect(avaHeaCooPhp.y1Coo, selMod.u1AvaCooPhp);
connect(seqEve.y1ValHeaWatInlIso[nHp + 1:nHp + nPhp], y1ValHeaWatPhpInlIso);
connect(seqEve.y1ValChiWatInlIso[nHp + 1:nHp + nPhp], y1ValChiWatPhpInlIso);
connect(seqEve.y1ValHeaWatOutIso[nHp + 1:nHp + nPhp], y1ValHeaWatPhpOutIso);
connect(seqEve.y1ValChiWatOutIso[nHp + 1:nHp + nPhp], y1ValChiWatPhpOutIso);
connect(idxStaCoo.y, idxStaHea.uStaOpp);
connect(idxStaHea.y, idxStaCoo.uStaOpp);
connect(u1PumChiWatPriHdr_actual, rouPumChiWatPri.u1PumPriHdr_actual);
connect(u1PumChiWatPriDedHp_actual, rouPumChiWatPri.u1PumPriDedHp_actual);
connect(u1PumChiWatPriDedPhp_actual, rouPumChiWatPri.u1PumPriDedPhp_actual);
connect(u1PumHeaWatPriHdr_actual, rouPumHeaWatPri.u1PumPriHdr_actual);
connect(u1PumHeaWatPriDedHp_actual, rouPumHeaWatPri.u1PumPriDedHp_actual);
connect(u1PumHeaWatPriDedPhp_actual, rouPumHeaWatPri.u1PumPriDedPhp_actual);
connect(conIsPriOnl.y, mulOrConfSupported.u[1]);
connect(conNotRevPhp.y, mulOrConfSupported.u[2]);
connect(conNotHavePumPriHdr.y, mulOrConfSupported.u[3]);
connect(mulOrConfSupported.y, assPlaCfg.u);
connect(resChiWat.TSupSet, repTChiWatSupPhpSet.u);
connect(resHeaWat.TSupSet, repTHeaWatSupPhpSet.u);
connect(repTHeaWatSupPhpSet.y, THeaWatSupPhpSet);
connect(repTChiWatSupPhpSet.y, TChiWatSupPhpSet);
connect(seqEve.y1Hp, y1Hp);
connect(seqEve.y1HeaHp, y1HeaHp);
connect(seqEve.y1HeaPhp, y1HeaPhp);
connect(seqEve.y1CooPhp, y1CooPhp);
connect(selMod.y1HeaHpPhp, seqEve.u1HeaHpPhp);
connect(selMod.y1ShcPhp, seqEve.u1ShcPhp);
connect(selMod.y1CooHpPhp, seqEve.u1CooHpPhp);
connect(y1HeaPhp, assMinRunTimPhp.u1Hea);
connect(y1CooPhp, assMinRunTimPhp.u1Coo);
connect(y1HeaPhp, assMinOffTimPhp.u1Hea);
connect(y1CooPhp, assMinOffTimPhp.u1Coo);
connect(u1Php_actual, sorRunTimPhp.u1Run);
connect(u1AvaPhp.y, sorRunTimPhp.u1Ava);
connect(idxStaCoo.y, selMod.uStaCoo);
connect(chaStaCoo.staTra, selMod.staTraCoo);
connect(y1HeaPhp, y1ShcPhp.u1);
connect(y1CooPhp, y1ShcPhp.u2);
connect(y1ShcPhp.y, comStaCoo.u1[nHp + nPhp + 1:nHp + 2 * nPhp]);
connect(y1ShcPhp.y, comStaHea.u1[nHp + nPhp + 1:nHp + 2 * nPhp]);
connect(y1Hp, assMinRunTimHp.u1);
connect(y1HeaHp, assMinRunTimHp.u1Hea);
connect(y1Hp, assMinOffTimHp.u1);
connect(y1HeaHp, assMinOffTimHp.u1Hea);
connect(VChiWatLooOrSec_flow, hrc.VChiWatLoa_flow);
connect(VHeaWatLooOrSec_flow, hrc.VHeaWatLoa_flow);
end AirToWater;