From ef4caad5ab68d8ea030179da4f09021df0f1bfdb Mon Sep 17 00:00:00 2001 From: GillisHommen <98752265+GillisHommen@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:21:46 +0100 Subject: [PATCH 1/2] J_EA function f_updateAllFlows() is now overloaded with a method without arguments When f_updateAllFlows() is called without argument, the J_EA uses the current value of v_powerFraction_fr in the asset itself. --- Zero_engine.alp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/Zero_engine.alp b/Zero_engine.alp index c280b650..b1cf9d7a 100644 --- a/Zero_engine.alp +++ b/Zero_engine.alp @@ -4,7 +4,7 @@ AnyLogic Project File ************************************************* --> - + 1658477103134 @@ -26829,7 +26829,7 @@ dsm_winterWeekSupplyDataSets_kW.createEmptyDataSets(v_activeEnergyCarriers, (int 1.0 - <![CDATA[NET LOAD]]> + <![CDATA[GRID LOAD]]> 0 -16776961 @@ -43039,7 +43039,7 @@ if( p_householdEV != null && p_chargingAttitudeVehicles == OL_ChargingAttitude.C } ]]> - + VOID 1676477303264 @@ -43118,7 +43118,7 @@ p_primaryHeatingAsset.v_powerFraction_fr = powerFraction_heatPump_fr; //traceln( "heatpumpt power fraction: " + powerFraction_heatPump_fr); ]]> - + VOID 1676976246060 @@ -43501,7 +43501,7 @@ if ( p_heatBuffer != null){ p_heatBuffer.removeEnergyAsset(); }]]> - + VOID 1726301776809 @@ -43530,7 +43530,7 @@ else if (p_primaryHeatingAsset instanceof J_EAConversionGasBurner && p_BuildingT } ]]> - + VOID 1726301785545 @@ -43556,7 +43556,7 @@ else { traceln("House " + p_gridConnectionID + " has heatingtype DISTRICT HEAT, but no delivery set or building asset!"); } ]]> - + VOID 1726334759211 @@ -53441,6 +53441,11 @@ abstract public class J_EA implements Cloneable { //return this.flowsMap; } + public void f_updateAllFlows() { + this.f_updateAllFlows(this.v_powerFraction_fr); + } + + public void clear() { flowsMap.clear(); energyUse_kW = 0; From 9e48c67b4e5a2a66c4ffc1429bc1576676c9d907 Mon Sep 17 00:00:00 2001 From: GillisHommen <98752265+GillisHommen@users.noreply.github.com> Date: Wed, 18 Dec 2024 14:20:07 +0100 Subject: [PATCH 2/2] Add method f_setPowerFraction_fr to J_EA needed when wanting to set v_powerFraction_fr from other packages (.alp files) --- Zero_engine.alp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Zero_engine.alp b/Zero_engine.alp index b1cf9d7a..9f92cdfc 100644 --- a/Zero_engine.alp +++ b/Zero_engine.alp @@ -53445,6 +53445,9 @@ abstract public class J_EA implements Cloneable { this.f_updateAllFlows(this.v_powerFraction_fr); } + public void f_setPowerFraction_fr(double powerFraction_fr) { + this.v_powerFraction_fr = powerFraction_fr; + } public void clear() { flowsMap.clear();