From 6e327741ad053e78b10ee397159f91f448c2de44 Mon Sep 17 00:00:00 2001 From: Ate Hempenius Date: Thu, 11 Jun 2026 16:35:03 +0200 Subject: [PATCH 1/9] J_EAFlexProfile-+-I_FlexProfileManagement setup --- Zero_engine.alpx | 15 ++ .../Agents/GridConnection/Code/Functions.java | 10 +- _alp/Agents/GridConnection/Code/Functions.xml | 34 ++--- _alp/Agents/GridConnection/Variables.xml | 56 +++++--- _alp/Classes/Class.I_EnergyManagement.java | 7 + .../Class.I_FlexProfileManagement.java | 13 ++ _alp/Classes/Class.J_EAFlexProfile.java | 133 ++++++++++++++++++ _alp/Classes/Class.J_EAProfile.java | 2 +- 8 files changed, 230 insertions(+), 40 deletions(-) create mode 100644 _alp/Classes/Class.I_FlexProfileManagement.java create mode 100644 _alp/Classes/Class.J_EAFlexProfile.java diff --git a/Zero_engine.alpx b/Zero_engine.alpx index e4bb2252..095b012c 100644 --- a/Zero_engine.alpx +++ b/Zero_engine.alpx @@ -1422,6 +1422,11 @@ LARGE_CONNECTION (grootverbruik, > 3x80) 1772100318398 + + 1781186973946 + + 1772100318398 + EULER @@ -2219,6 +2224,16 @@ LARGE_CONNECTION (grootverbruik, > 3x80) 1776078970513 + + 1781184397108 + + 1752677832758 + + + 1781187002718 + + 1781186973946 + com.anylogic.libraries.modules.markup_descriptors diff --git a/_alp/Agents/GridConnection/Code/Functions.java b/_alp/Agents/GridConnection/Code/Functions.java index daccd161..4806cf25 100644 --- a/_alp/Agents/GridConnection/Code/Functions.java +++ b/_alp/Agents/GridConnection/Code/Functions.java @@ -944,7 +944,11 @@ else if (j_ea instanceof J_EAStorageElectric battery) { c_parentCoops.forEach( coop -> coop.v_liveAssetsMetaData.totalInstalledBatteryStorageCapacity_MWh += capacity_MWh); energyModel.v_liveAssetsMetaData.totalInstalledBatteryStorageCapacity_MWh += capacity_MWh; } -} else { +} +else if(j_ea instanceof J_EAFlexProfile flexProfileAsset){ + c_flexProfileAssets.add(flexProfileAsset); +} +else { throw new RuntimeException("Trying to connect GC with unrecognized J_EAFlex asset!"); } /*ALCODEEND*/} @@ -1185,8 +1189,8 @@ else if (j_ea instanceof J_EAStorageElectric) { energyModel.v_liveAssetsMetaData.totalInstalledBatteryStorageCapacity_MWh -= ((J_EAStorageElectric)j_ea).getStorageCapacity_kWh()/1000; } } -else if (j_ea instanceof J_EAConversionAirConditioner) { - p_airco = null; +else if(j_ea instanceof J_EAFlexProfile flexProfileAsset){ + c_flexProfileAssets.remove(flexProfileAsset); } /*ALCODEEND*/} diff --git a/_alp/Agents/GridConnection/Code/Functions.xml b/_alp/Agents/GridConnection/Code/Functions.xml index 2d6e6631..11a4dd86 100644 --- a/_alp/Agents/GridConnection/Code/Functions.xml +++ b/_alp/Agents/GridConnection/Code/Functions.xml @@ -415,7 +415,7 @@ 1753969724598 645 - 360 + 380