Skip to content

Commit

Permalink
* mean for return Temperature, #55
Browse files Browse the repository at this point in the history
  • Loading branch information
MStillerEBC committed Oct 1, 2019
1 parent 056fc71 commit 39298c1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyDMPC/ControlFramework/Experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def main():
# try:
# try:

for cur_time in range(0, 86400 , min_samp_inter):
for cur_time in range(0, 10000000 , min_samp_inter):
start_time = time.time()
sys.execute()
#time.sleep(max(0, min_samp_inter - time.time() + start_time))
Expand Down
4 changes: 2 additions & 2 deletions pyDMPC/ControlFramework/Init.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
commands.append(range(308,313,5))
traj_points.append([])
traj_var.append([])
cost_fac.append([-1.0, 0.0, 1000.0, -1000.0, 2000.0, -2000.0, 3000.0, -3000.0, 10.0, 2.0])
cost_fac.append([-1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 100.0, 0.0])
factors.append([1, -10./4.18/8./100.])

sys_id.append(1)
Expand Down Expand Up @@ -118,6 +118,6 @@
commands.append(range(0,105,5))
traj_points.append(range(280,290,1))
traj_var.append(["supplyTemperature.T"])
cost_fac.append([-1.0, 0.0, 10.0, -10.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0])
cost_fac.append([-1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0])
factors.append([0,0])
#Legend: cost_fac.append([real_cost_field, cost_downstr_neigh, cost_dev_setpoint_penalty, cost_dev_setpoint_reward, cost_integ_penalty, cost_integ_reward, cost_diff_penalty, cost_diff_reward, real_cost_boiler, real_cost_heatpump])
Original file line number Diff line number Diff line change
Expand Up @@ -260,14 +260,16 @@ partial model GeothermalHeatPumpControlledBase
extent={{6,-6},{-6,6}},
rotation=0,
origin={194,-76})));
Buildings.Controls.OBC.CDL.Continuous.MovingMean movMea(delta=94672800)
annotation (Placement(transformation(extent={{-6,-6},{6,6}},
rotation=-90,
origin={-144,-94})));
equation
connect(getTStorageLower.y, coldStorageTemperature) annotation (Line(points={{-139,58},
{78,58},{78,80}}, color={0,0,127}));
connect(getTStorageUpper.y, heatStorageTemperature) annotation (Line(points={{-139,74},
{-122,74},{-122,60},{60,60},{60,80}},
color={0,0,127}));
connect(returnTemSensor.T, returnTemperature) annotation (Line(points={{
-107,9.2},{-107,-94},{-144,-94},{-144,-120}}, color={0,0,127}));
connect(prescribedHeatFlow.port, vol2.heatPort)
annotation (Line(points={{116,-40},{116,-44}}, color={191,0,0}));
connect(vol1.heatPort, prescribedHeatFlow1.port)
Expand Down Expand Up @@ -333,6 +335,10 @@ equation
color={191,0,0}));
connect(cellarTemperature.port, heatStorage.heatPort)
annotation (Line(points={{188,-76},{49.2,-76}}, color={191,0,0}));
connect(returnTemperature, movMea.y)
annotation (Line(points={{-144,-120},{-144,-100.6}}, color={0,0,127}));
connect(returnTemSensor.T, movMea.u) annotation (Line(points={{-107,9.2},{
-107,-86},{-144,-86},{-144,-86.8}}, color={0,0,127}));
annotation (experiment(StopTime=86400, Interval=10), Documentation(info="<html>
<p>Base class of an example demonstrating the use of a heat pump connected to two storages and a geothermal source. A replaceable model is connected in the flow line of the heating circuit. A peak load device can be added here. This model also includes basic controllers.</p>
</html>", revisions="<html>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ model GeothermalHeatPumpSystem
heatPumpTab(tablePower=[0,266.15,275.15,280.15,283.15,293.15; 308.15,1650,1700,
1750,1850,1900; 323.15,2250,2200,2300,2500,2550],
tableHeatFlowCondenser=[0,266.16,275.15,280.15,283.15,293.15; 308.15,4850,
5800,6500,7400,8150; 323.15,5000,5600,6450,8350,8750]));
5800,6500,7400,8150; 323.15,5000,5600,6450,8350,8750]),
movMea(delta=7200));


AixLib.Fluid.Sources.Boundary_pT coldConsumerFlow(redeclare package Medium =
Expand Down

0 comments on commit 39298c1

Please sign in to comment.