Skip to content

Commit c5c490f

Browse files
committed
Sprint 6 Case 1-4 geparametriseerd
De varianten van de sprint 6 cases zijn te 'selecteren' via de parameter p_Sprint6Case in de main agent.
1 parent 0b09548 commit c5c490f

File tree

9 files changed

+527
-55
lines changed

9 files changed

+527
-55
lines changed

HeatingSystemModel/HeatingSystems.alp

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
AnyLogic Project File
55
*************************************************
66
-->
7-
<AnyLogicWorkspace WorkspaceVersion="1.9" AnyLogicVersion="8.7.12.202205250339" AlpVersion="8.7.5">
7+
<AnyLogicWorkspace WorkspaceVersion="1.9" AnyLogicVersion="8.7.12.202205250418" AlpVersion="8.7.5">
88
<Model>
99
<Id>1648027099882</Id>
1010
<Name><![CDATA[HeatingSystems]]></Name>
@@ -2485,7 +2485,7 @@ v_DistrictHeatingAbsorbed_kWh += v_DistrictHeatingAbsorption_kW * timeStep_HR;]]
24852485
<UnitType><![CDATA[NONE]]></UnitType>
24862486
<SdArray>false</SdArray>
24872487
<DefaultValue Class="CodeValue">
2488-
<Code><![CDATA[0.01]]></Code>
2488+
<Code><![CDATA[0.02]]></Code>
24892489
</DefaultValue>
24902490
<ParameterEditor>
24912491
<Id>1650616556419</Id>
@@ -2608,7 +2608,7 @@ v_DistrictHeatingAbsorbed_kWh += v_DistrictHeatingAbsorption_kW * timeStep_HR;]]
26082608
<UnitType><![CDATA[NONE]]></UnitType>
26092609
<SdArray>false</SdArray>
26102610
<DefaultValue Class="CodeValue">
2611-
<Code><![CDATA[60]]></Code>
2611+
<Code><![CDATA[62]]></Code>
26122612
</DefaultValue>
26132613
<ParameterEditor>
26142614
<Id>1650616556437</Id>
@@ -2834,20 +2834,20 @@ if (v_bufferTemp_degC < p_minTempBuffer_degC) { // If PTES temperature drops bel
28342834
t_incentiveMode.setText("power mode");
28352835
double availablePower_kW = max(0,v_trafoMaxPower-trafoVermogen_kW);
28362836
double heatPumpPowerSetpoint = COP*min(availablePower_kW,p_primarySystemMaxPower_kW);
2837-
double boilerSetpoint_kW = max(0,-trafoVermogen_kW - p_primarySystemMaxPower_kW); // Only when more than p_primarySystemMaxPower_kW power is available)
2837+
double boilerSetpoint_kW = min(p_backupSystemMaxPower_kW,max(0,-trafoVermogen_kW - p_primarySystemMaxPower_kW)); // Only when more than p_primarySystemMaxPower_kW power is available)
28382838
f_CalculateHeatProduction(heatPumpPowerSetpoint, p_secondarySystemMaxPower_kW, boilerSetpoint_kW, baseTemp_degC, v_bufferTemp_degC, dt_h);
28392839
} else if (v_bufferTemp_degC < p_bufferTempHeatingTreshold_degC && v_bufferTemp_degC >= p_minTempBuffer_degC) { // If PTES temperature drops below heating treshold, gradually start heating with HP
28402840
//traceln("normal heating");
28412841
t_incentiveMode.setColor(black);
28422842
t_incentiveMode.setText("normal");
28432843
double availablePower_kW = max(0,v_trafoMaxPower-trafoVermogen_kW);
28442844
double heatPumpPowerSetpoint = COP*min(availablePower_kW,min(p_primarySystemMaxPower_kW,max((p_bufferTempHeatingTreshold_degC - v_bufferTemp_degC) / (p_bufferTempHeatingTreshold_degC - p_minTempBuffer_degC) * p_primarySystemMaxPower_kW, -trafoVermogen_kW)));
2845-
double boilerSetpoint = max(0,-trafoVermogen_kW - heatPumpPowerSetpoint/COP);
2845+
double boilerSetpoint = min(p_backupSystemMaxPower_kW,max(0,-trafoVermogen_kW - heatPumpPowerSetpoint/COP));
28462846
f_CalculateHeatProduction(heatPumpPowerSetpoint,0,boilerSetpoint, baseTemp_degC, v_bufferTemp_degC, dt_h);
28472847
} else if ( trafoVermogen_kW < 0 & heatingSystem.p_MyPrimaryHeatingSystem instanceof J_Heatpump & v_bufferTemp_degC < p_maxTempBuffer_degC) { // Overvloed aan stroom in de wijk, zet het in om de PTES op te warmen
28482848
//traceln("opportunity heating");
28492849
double heatPumpPowerSetpoint = COP*min(p_primarySystemMaxPower_kW, -trafoVermogen_kW);
2850-
double boilerSetpoint = max(0,-trafoVermogen_kW - heatPumpPowerSetpoint/COP);
2850+
double boilerSetpoint = min(p_backupSystemMaxPower_kW,max(0,-trafoVermogen_kW - heatPumpPowerSetpoint/COP));
28512851
f_CalculateHeatProduction(heatPumpPowerSetpoint,0,boilerSetpoint, baseTemp_degC, v_bufferTemp_degC, dt_h);
28522852
// f_CalculateHeatProduction(min(-trafoVermogen_kW,p_primarySystemMaxPower_kW) * COP, p_soilTemp_degC, v_bufferTemp_degC, dt_h);
28532853
t_incentiveMode.setColor(green);
@@ -4604,8 +4604,14 @@ public class J_Heatpump extends J_HeatingSystem implements Serializable {
46044604
currentPower_kW = 0;
46054605
hotWaterDelivery_kW = 0;
46064606
}
4607-
heatDelivery_kW = min( heatRequest_kW, (maxPower_kW - currentPower_kW ) * COPheating) ; // Hot water gets priority
4608-
currentPower_kW += heatDelivery_kW / COPheating;
4607+
if ( COPheating > 0 ) {
4608+
heatDelivery_kW = min( heatRequest_kW, (maxPower_kW - currentPower_kW ) * COPheating) ; // Hot water gets priority
4609+
currentPower_kW += heatDelivery_kW / COPheating;
4610+
} else { // Prevent negative heatDelivery and Power when base temp is above destination temp
4611+
heatDelivery_kW = 0;
4612+
currentPower_kW = 0;
4613+
}
4614+
46094615
if( currentPower_kW < - 0.5 ) {
46104616
traceln("household met currentpower from heatpump: " + currentPower_kW);
46114617
}
@@ -4726,7 +4732,7 @@ public class J_DHNetworkMT extends J_DistrictHeatingNetwork implements Serializa
47264732
this.networkDiameter_m = Diameter_m;
47274733
this.tempLevel = "MT";
47284734
this.CAPEX_EURpm = 1000;
4729-
this.networkHeatloss_Wpm2K = 0.4;
4735+
this.networkHeatloss_Wpm2K = 0.5;
47304736
this.minOperatingTemp_degC = 50;
47314737
this.maxOperatingTemp_degC = 65;
47324738
this.deprecationPeriod_yr = 30;
@@ -4853,7 +4859,7 @@ public class J_DHNetworkLT extends J_DistrictHeatingNetwork implements Serializa
48534859
this.networkDiameter_m = networkDiameter_m;
48544860
this.tempLevel = "LT";
48554861
this.CAPEX_EURpm = 800;
4856-
this.networkHeatloss_Wpm2K = 0.5;
4862+
this.networkHeatloss_Wpm2K = 0.6;
48574863
this.minOperatingTemp_degC = 10;
48584864
this.maxOperatingTemp_degC = 40;
48594865
this.deprecationPeriod_yr = 30;

HeatingSystemModel/database/db.lck

16 Bytes
Binary file not shown.

HeatingSystemModel/database/db.log

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*C2*/SET SCHEMA PUBLIC
2+
CREATE TABLE IF NOT EXISTS AL_CONFIGURATION ( PROPERTY_NAME VARCHAR(255) NOT NULL UNIQUE , PROPERTY_VALUE LONGVARCHAR )
3+
CREATE TABLE IF NOT EXISTS AL_GROUPS ( GROUP_NAME VARCHAR(255) NOT NULL PRIMARY KEY , DESCRIPTION LONGVARCHAR )
4+
CREATE TABLE IF NOT EXISTS AL_TABLES ( TABLE_NAME VARCHAR(255) NOT NULL PRIMARY KEY , GROUP_NAME VARCHAR(255) , DESCRIPTION LONGVARCHAR )
5+
CREATE TABLE IF NOT EXISTS AL_CUSTOM_TYPE ( TABLE_NAME VARCHAR(255) , COLUMN_NAME VARCHAR(255) , TYPE VARCHAR(255) , NAME VARCHAR(255) )
6+
CREATE TABLE IF NOT EXISTS AL_VIEWS ( VIEW_NAME VARCHAR(255) NOT NULL UNIQUE , VIEW_DEFINITION LONGVARCHAR , IS_VALID BOOLEAN )
7+
CREATE TABLE IF NOT EXISTS AL_SELECTED_LOG_OBJECTS ( NAME VARCHAR(255) NOT NULL UNIQUE , TYPE VARCHAR(255) )
8+
CREATE TABLE IF NOT EXISTS AL_DB_OBJECTS ( NAME VARCHAR(255) NOT NULL UNIQUE , TYPE VARCHAR(255) , USAGE VARCHAR(255) )
9+
DISCONNECT
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#HSQL Database Engine 2.4.1
2-
#Mon Jul 04 17:33:11 CEST 2022
2+
#Wed Jul 06 10:06:35 CEST 2022
33
tx_timestamp=0
4-
modified=no
4+
modified=yes
55
version=2.4.1

Output/export_kpis.xlsx

18.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)