Skip to content

Commit

Permalink
Batch pr master (#3767)
Browse files Browse the repository at this point in the history
* Remove reference to network design data record in Combined.PartialBuildingTimeSeriesWithETS

* Renamed CDL.Logical.TrueHoldWithReset to TrueHold

For #3689

* Expand to full class names

* Refactored implementation to avoid infinite event iteration in OpenModelica

For #3754

* wrong variable description in Fluid.HeatExchangers

* corrected location of revisions in annotation

* Corrected assertion for operating mode

For #3664

---------

Co-authored-by: David Blum <[email protected]>
Co-authored-by: AntoineGautier <[email protected]>
Co-authored-by: hcasperfu <[email protected]>
  • Loading branch information
4 people authored Apr 2, 2024
1 parent eb4ca96 commit c5fd934
Show file tree
Hide file tree
Showing 143 changed files with 492 additions and 611 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,6 @@ model ControllerChillerDXHeatingEconomizer
annotation (Placement(transformation(extent={{-60,-30},{-40,-10}})));
Buildings.Controls.OBC.CDL.Reals.Switch swiFan "Switch fan on"
annotation (Placement(transformation(extent={{70,120},{90,140}})));
Buildings.Controls.OBC.CDL.Reals.Hysteresis hysHea(
final uLow=0.01,
final uHigh=0.05)
"Hysteresis for heating"
annotation (Placement(transformation(extent={{-30,120},{-10,140}})));
Buildings.Controls.OBC.CDL.Logical.MultiOr orFan(nin=3)
"Switch fan on if heating, cooling, or occupied"
annotation (Placement(transformation(extent={{40,94},{60,114}})));
Expand All @@ -226,6 +221,9 @@ model ControllerChillerDXHeatingEconomizer
"Chiller on signal based on room temperature"
annotation (Placement(transformation(extent={{20,-80},{40,-60}})));

Controls.OBC.CDL.Reals.Greater heaOnTRoo(h=0.5)
"Heater on signal based on room temperature"
annotation (Placement(transformation(extent={{-60,120},{-40,140}})));
protected
Modelica.Blocks.Sources.Constant TSetSupChiConst(
final k=TSupChi_nominal)
Expand Down Expand Up @@ -271,21 +269,17 @@ equation
138},{68,138}}, color={0,0,127}));
connect(swiFan.y, yFan) annotation (Line(points={{92,130},{96,130},{96,90},{
110,90}}, color={0,0,127}));
connect(conSup.yHea, hysHea.u) annotation (Line(points={{-39,86},{-34,86},{
-34,130},{-32,130}}, color={0,0,127}));
connect(swiFan.u2, orFan.y) annotation (Line(points={{68,130},{64,130},{64,104},{62,104}},
color={255,0,255}));
connect(hysHea.y, orFan.u[1]) annotation (Line(points={{-8,130},{24,130},{24,
108.667},{38,108.667}},
color={255,0,255}));
connect(conEco.TMixSet, conCooVal.u_s) annotation (Line(points={{39,78},{-10,
78},{-10,-20},{-2,-20}}, color={0,0,127}));
connect(and1.y, chiOn) annotation (Line(points={{91,-30},{96,-30},{96,-54},{110,
-54}}, color={255,0,255}));
connect(conEco.yCoiSta, and1.u1) annotation (Line(points={{61,62},{64,62},{64,
-30},{68,-30}}, color={255,0,255}));
connect(uOcc, orFan.u[2]) annotation (Line(points={{-120,0},{-14,0},{-14,104},
{38,104}}, color={255,0,255}));
connect(uOcc, orFan.u[1]) annotation (Line(points={{-120,0},{-14,0},{-14,
101.667},{38,101.667}},
color={255,0,255}));
connect(TMix, conEco.TMix) annotation (Line(points={{-120,30},{-26,30},{-26,75},
{39,75}}, color={0,0,127}));
connect(TOut, conEco.TOut) annotation (Line(points={{-120,-40},{-66,-40},{-66,
Expand All @@ -303,8 +297,14 @@ equation
connect(chiOnTRoo.y, conEco.cooSta) annotation (Line(points={{42,-70},{50,-70},
{50,40},{34,40},{34,62},{39,62}}, color={255,0,255}));

connect(chiOnTRoo.y, orFan.u[3]) annotation (Line(points={{42,-70},{50,-70},{
50,40},{34,40},{34,99.3333},{38,99.3333}}, color={255,0,255}));
connect(chiOnTRoo.y, orFan.u[2]) annotation (Line(points={{42,-70},{50,-70},{
50,40},{34,40},{34,104},{38,104}}, color={255,0,255}));
connect(heaOnTRoo.y, orFan.u[3]) annotation (Line(points={{-38,130},{20,130},
{20,106.333},{38,106.333}}, color={255,0,255}));
connect(heaOnTRoo.u2, TRoo) annotation (Line(points={{-62,122},{-86,122},{-86,
-80},{-120,-80}}, color={0,0,127}));
connect(TSetRooHea, heaOnTRoo.u1) annotation (Line(points={{-120,120},{-80,
120},{-80,130},{-62,130}}, color={0,0,127}));
annotation (
defaultComponentName="conChiDXHeaEco",
Icon(graphics={Line(points={{-100,-100},{0,2},{-100,100}}, color=
Expand All @@ -316,6 +316,11 @@ heating coil and a cooling coil.
</html>", revisions="<html>
<ul>
<li>
March 28, 2024, by David Blum:<br/>
Adjust heating hysteresis to avoid chattering.
This is for <a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3735\">issue 3735</a>.
</li>
<li>
November 20, 2020, by David Blum:<br/>
Turn fan on when setup cooling required.
This is for <a href=\"https://github.com/lbl-srg/modelica-buildings/issues/2265\">issue 2265</a>.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,34 @@
within Buildings.Controls.DemandResponse.BaseClasses;
block BaselinePrediction "Predicts the baseline consumption"
extends Buildings.Controls.DemandResponse.BaseClasses.PartialDemandResponse(nIn=1,
nOut=1);
extends Modelica.Blocks.Icons.DiscreteBlock;

parameter Integer nSam
"Number of intervals in a day for which baseline is computed";

parameter Integer nPre(min=1)
"Number of intervals for which future load need to be predicted (set to one to only predict current time, or to nSam to predict one day)";

parameter Buildings.Controls.Predictors.Types.PredictionModel predictionModel
"Load prediction model";

parameter Integer nHis(min=1) = 10 "Number of history terms to be stored";

Modelica.Blocks.Interfaces.RealInput ECon(unit="J")
"Consumed electrical energy"
annotation (Placement(transformation(extent={{-140,-50},{-100,-10}}),
iconTransformation(extent={{-120,-30},{-100,-10}})));
Modelica.Blocks.Interfaces.RealOutput PPre[nPre](each unit="W")
"Predicted power consumption for the current time interval"
annotation (Placement(transformation(extent={{100,-10},{120,10}}),
iconTransformation(extent={{100,-10},{120,10}})));

Modelica.Blocks.Interfaces.RealInput TOutFut[nPre-1](each unit="K")
if (predictionModel == Buildings.Controls.Predictors.Types.PredictionModel.WeatherRegression)
"Future outside air temperatures"
annotation (Placement(
transformation(extent={{-140,-110},{-100,-70}}),
iconTransformation(extent={{-120,-100},{-100,-80}})));

Modelica.Blocks.Interfaces.RealInput TOut(unit="K", displayUnit="degC")
if (predictionModel == Buildings.Controls.Predictors.Types.PredictionModel.WeatherRegression)
"Outside air temperature"
Expand Down Expand Up @@ -41,7 +65,7 @@ equation
color={0,0,127},
smooth=Smooth.None));
connect(basLin.PPre, PPre) annotation (Line(
points={{11,0},{40,0},{40,-80},{110,-80}},
points={{11,0},{110,0}},
color={0,0,127},
smooth=Smooth.None));
connect(stoHis.u, isEventDay) annotation (Line(
Expand Down Expand Up @@ -93,6 +117,12 @@ the current type of day, then the predicted power consumption
</html>", revisions="<html>
<ul>
<li>
March 29, 2024, by Michael Wetter:<br/>
Refactored implementation to avoid an infinite event iteration in OpenModelica.<br/>
This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3754\">#3754</a>.
</li>
<li>
March 20, 2014 by Michael Wetter:<br/>
First implementation.
</li>
Expand Down
31 changes: 0 additions & 31 deletions Buildings/Controls/DemandResponse/BaseClasses/NormalOperation.mo

This file was deleted.

This file was deleted.

37 changes: 0 additions & 37 deletions Buildings/Controls/DemandResponse/BaseClasses/ShedOperation.mo

This file was deleted.

3 changes: 0 additions & 3 deletions Buildings/Controls/DemandResponse/BaseClasses/package.order
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
BaselinePrediction
NormalOperation
PartialDemandResponse
ShedOperation
Loading

0 comments on commit c5fd934

Please sign in to comment.