From 8c6aa75b554c305f547d28089911c736809bbd23 Mon Sep 17 00:00:00 2001 From: GillisHommen <98752265+GillisHommen@users.noreply.github.com> Date: Mon, 24 Mar 2025 12:23:24 +0100 Subject: [PATCH 1/3] Curtailmentmode 'Price' split into MarketPrice and NodalPricing previously, Price was always nodalPricing. (a leftover from Holon experiments) --- Zero_engine.alpx | 6 +++++- _alp/Agents/GridConnection/Code/Functions.java | 14 +++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Zero_engine.alpx b/Zero_engine.alpx index 52ebee94..e31289fa 100644 --- a/Zero_engine.alpx +++ b/Zero_engine.alpx @@ -1103,7 +1103,11 @@ + diff --git a/_alp/Agents/GridConnection/Code/Functions.java b/_alp/Agents/GridConnection/Code/Functions.java index 4b7f73bf..13e11294 100644 --- a/_alp/Agents/GridConnection/Code/Functions.java +++ b/_alp/Agents/GridConnection/Code/Functions.java @@ -1917,7 +1917,19 @@ else if (j_ea.energyAssetType == OL_EnergyAssetType.CHP) { } } break; - case PRICE: + case MARKETPRICE: + if(energyModel.pp_dayAheadElectricityPricing_eurpMWh.getCurrentValue() < 0.0) { + if (fm_currentBalanceFlows_kW.get(OL_EnergyCarriers.ELECTRICITY) < 0.0) { // Feedin, bring to zero! + for (J_EAProduction j_ea : c_productionAssets) { + j_ea.curtailElectricityProduction( - fm_currentBalanceFlows_kW.get(OL_EnergyCarriers.ELECTRICITY)); + if (!(fm_currentBalanceFlows_kW.get(OL_EnergyCarriers.ELECTRICITY) < 0.0)) { + break; + } + } + } + } + break; + case NODALPRICING: // Prevent feedin when nodal price is negative double priceTreshold_eur = -0.0; if(l_parentNodeElectric.getConnectedAgent().v_currentTotalNodalPrice_eurpkWh < priceTreshold_eur) { From c4db68558209d8236b62f2d59a888c18b9f95588 Mon Sep 17 00:00:00 2001 From: GillisHommen <98752265+GillisHommen@users.noreply.github.com> Date: Thu, 27 Mar 2025 16:28:43 +0100 Subject: [PATCH 2/3] Replaced f_batteryManagementSimple with f_batteryManagementSelfConsumption Adjusted OL_BatteryOperationMode_kW accordingly. --- Zero_engine.alpx | 2 +- _alp/Agents/EnergyModel/Code/Functions.java | 4 ++-- _alp/Agents/GCUtility/Code/Functions.java | 4 ++-- .../Agents/GridConnection/Code/Functions.java | 24 ++++--------------- _alp/Agents/GridConnection/Code/Functions.xml | 6 ++--- _alp/Agents/GridNode/Code/Functions.java | 10 ++++---- 6 files changed, 17 insertions(+), 33 deletions(-) diff --git a/Zero_engine.alpx b/Zero_engine.alpx index e31289fa..2778c986 100644 --- a/Zero_engine.alpx +++ b/Zero_engine.alpx @@ -971,7 +971,7 @@