From 49934af510979850988c00488f30c35d09601798 Mon Sep 17 00:00:00 2001 From: Luc-Sol Date: Thu, 11 Jun 2026 10:27:50 +0200 Subject: [PATCH] heating preferences change - f_addHeatManagement in the GC now takes heatingPreferences as an argument. This function used to look for an existing heatingPreferences, now this must be passed as an argument. To help with that: - Added f_getHeatingPreferences to the GC. - Moved some functions around on the GC canvas. --- .../Agents/GridConnection/Code/Functions.java | 14 +++-- _alp/Agents/GridConnection/Code/Functions.xml | 52 +++++++++++++------ _alp/Agents/GridConnection/Variables.xml | 26 +++++----- 3 files changed, 60 insertions(+), 32 deletions(-) diff --git a/_alp/Agents/GridConnection/Code/Functions.java b/_alp/Agents/GridConnection/Code/Functions.java index 0b97ac84..0f1c8c22 100644 --- a/_alp/Agents/GridConnection/Code/Functions.java +++ b/_alp/Agents/GridConnection/Code/Functions.java @@ -548,7 +548,7 @@ OL_GridConnectionHeatingType f_getCurrentHeatingType() } /*ALCODEEND*/} -double f_addHeatManagement(OL_GridConnectionHeatingType heatingType,boolean isGhost) +double f_addHeatManagement(OL_GridConnectionHeatingType heatingType,boolean isGhost,J_HeatingPreferences heatingPreferences) {/*ALCODESTART::1754393382442*/ if (heatingType == OL_GridConnectionHeatingType.NONE) { return; @@ -578,9 +578,9 @@ OL_GridConnectionHeatingType f_getCurrentHeatingType() e.printStackTrace(); } -J_HeatingPreferences existingHeatingPreferences = f_getHeatingManagement() != null ? f_getHeatingManagement().getHeatingPreferences() : null; //Store the existing heating preferences +//J_HeatingPreferences existingHeatingPreferences = f_getHeatingManagement() != null ? f_getHeatingManagement().getHeatingPreferences() : null; //Store the existing heating preferences -heatingManagement.setHeatingPreferences(existingHeatingPreferences); // Reasign the existing heating preferences +heatingManagement.setHeatingPreferences(heatingPreferences); // Reasign the existing heating preferences f_setExternalAssetManagement(heatingManagement); /*ALCODEEND*/} @@ -1223,3 +1223,11 @@ boolean f_isAssetManagementActive(Class assetManag } /*ALCODEEND*/} +J_HeatingPreferences f_getHeatingPreferences() +{/*ALCODESTART::1781165937788*/ +if (f_getHeatingManagement() != null) { + return f_getHeatingManagement().getHeatingPreferences(); +} +return null; +/*ALCODEEND*/} + diff --git a/_alp/Agents/GridConnection/Code/Functions.xml b/_alp/Agents/GridConnection/Code/Functions.xml index 2d6e6631..a053ca3e 100644 --- a/_alp/Agents/GridConnection/Code/Functions.xml +++ b/_alp/Agents/GridConnection/Code/Functions.xml @@ -415,7 +415,7 @@ 1753969724598 645 - 360 + 380