From d2b4ee7273ad736ecc99c357888b42336da09ac7 Mon Sep 17 00:00:00 2001 From: Luc-Sol Date: Wed, 21 May 2025 15:10:26 +0200 Subject: [PATCH 01/15] removed v_hasPV from GC canvas This boolean was already added to the live asset meta data class. To prevent inconsistencies it has been removed from the GC canvas. --- .../Agents/GCNeighborhood/Code/Functions.java | 2 +- .../Agents/GridConnection/Code/Functions.java | 4 ++-- _alp/Agents/GridConnection/Variables.xml | 19 ------------------- 3 files changed, 3 insertions(+), 22 deletions(-) diff --git a/_alp/Agents/GCNeighborhood/Code/Functions.java b/_alp/Agents/GCNeighborhood/Code/Functions.java index 65ffc109..0d9cc437 100644 --- a/_alp/Agents/GCNeighborhood/Code/Functions.java +++ b/_alp/Agents/GCNeighborhood/Code/Functions.java @@ -384,7 +384,7 @@ else if (j_ea.energyAssetType == OL_EnergyAssetType.WINDMILL) { //energyModel.c_productionAssets.add((J_EAProduction)j_ea); if (j_ea.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC) { - v_hasPV = true; + v_liveAssetsMetaData.hasPV = true; v_liveAssetsMetaData.totalInstalledPVPower_kW += ((J_EAProduction)j_ea).getCapacityElectric_kW(); if ( p_parentNodeElectric != null ) { p_parentNodeElectric.f_updateTotalInstalledProductionAssets(OL_EnergyAssetType.PHOTOVOLTAIC, ((J_EAProduction)j_ea).getCapacityElectric_kW(), true); diff --git a/_alp/Agents/GridConnection/Code/Functions.java b/_alp/Agents/GridConnection/Code/Functions.java index 6e6e956c..1a6db546 100644 --- a/_alp/Agents/GridConnection/Code/Functions.java +++ b/_alp/Agents/GridConnection/Code/Functions.java @@ -1167,7 +1167,7 @@ else if (p_primaryHeatingAsset== null && p_secondaryHeatingAsset != null && v_ha //energyModel.c_productionAssets.add((J_EAProduction)j_ea); if (j_ea.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC) { - v_hasPV = true; + v_liveAssetsMetaData.hasPV = true; double capacity_kW = ((J_EAProduction)j_ea).getCapacityElectric_kW(); v_liveAssetsMetaData.totalInstalledPVPower_kW += capacity_kW; if ( p_parentNodeElectric != null ) { @@ -1531,7 +1531,7 @@ else if (j_ea.getEAType() == OL_EnergyAssetType.WINDMILL) { if (j_ea.energyAssetType == OL_EnergyAssetType.PHOTOVOLTAIC) { J_EAProduction otherPV = findFirst(c_productionAssets, x -> x.getEAType() == OL_EnergyAssetType.PHOTOVOLTAIC); if (otherPV == null) { - v_hasPV = false; + v_liveAssetsMetaData.hasPV = false; } double capacity_kW = ((J_EAProduction)j_ea).getCapacityElectric_kW(); v_liveAssetsMetaData.totalInstalledPVPower_kW -= capacity_kW; diff --git a/_alp/Agents/GridConnection/Variables.xml b/_alp/Agents/GridConnection/Variables.xml index 6a5c4c3c..ac7ec367 100644 --- a/_alp/Agents/GridConnection/Variables.xml +++ b/_alp/Agents/GridConnection/Variables.xml @@ -849,25 +849,6 @@ - - 1692972667627 - - 270 - 300 - - false - true - true - - - - 1695824940090 From e758081675bae819105ae664281c300dcea512b4 Mon Sep 17 00:00:00 2001 From: Luc-Sol Date: Thu, 5 Jun 2025 12:54:29 +0200 Subject: [PATCH 02/15] some getters --- _alp/Classes/Class.J_EAConsumption.java | 4 ++++ _alp/Classes/Class.J_ProfilePointer.java | 3 +++ 2 files changed, 7 insertions(+) diff --git a/_alp/Classes/Class.J_EAConsumption.java b/_alp/Classes/Class.J_EAConsumption.java index 985ca830..0720dfb5 100644 --- a/_alp/Classes/Class.J_EAConsumption.java +++ b/_alp/Classes/Class.J_EAConsumption.java @@ -104,6 +104,10 @@ public Pair curtailElectricityConsumption(double curtailment return new Pair(flowsMap, this.energyUse_kW); } + public J_ProfilePointer getProfilePointer() { + return this.profilePointer; + } + @Override public String toString() { return diff --git a/_alp/Classes/Class.J_ProfilePointer.java b/_alp/Classes/Class.J_ProfilePointer.java index a4e28961..19dc1b5e 100644 --- a/_alp/Classes/Class.J_ProfilePointer.java +++ b/_alp/Classes/Class.J_ProfilePointer.java @@ -26,6 +26,9 @@ public double getValue(double t_h) { return this.tableFunction.get(t_h); } + public TableFunction getTableFunction() { + return this.tableFunction; + } @Override public String toString() { return "profile: " + this.name + " current value: " + this.currentValue; From 0f7c214d3bf9163428c597e698d0cc5c458e08c1 Mon Sep 17 00:00:00 2001 From: Ate Hempenius Date: Wed, 11 Jun 2025 15:05:39 +0200 Subject: [PATCH 03/15] gridnode profile --- _alp/Agents/EnergyModel/Code/Functions.java | 5 +- _alp/Agents/EnergyModel/EmbeddedObjects.xml | 3 + _alp/Agents/GridNode/AOC.GridNode.xml | 12 ++-- _alp/Agents/GridNode/Levels/Level.level.xml | 4 +- _alp/Agents/GridNode/Variables.xml | 68 +++++++++++++++------ 5 files changed, 63 insertions(+), 29 deletions(-) diff --git a/_alp/Agents/EnergyModel/Code/Functions.java b/_alp/Agents/EnergyModel/Code/Functions.java index de829a1c..e463c046 100644 --- a/_alp/Agents/EnergyModel/Code/Functions.java +++ b/_alp/Agents/EnergyModel/Code/Functions.java @@ -753,7 +753,10 @@ ArrayList f_getGridConnections() {/*ALCODESTART::1716890117265*/ -return c_gridConnections; +ArrayList copyOfGridConnectionList = new ArrayList<>(c_gridConnections); +copyOfGridConnectionList.removeAll(Arrays.asList(pop_gridConnections)); // Remove all default gridconnections (no flex control, only used for gridnode profile) +return copyOfGridConnectionList; + /*ALCODEEND*/} double f_initializeEngine() diff --git a/_alp/Agents/EnergyModel/EmbeddedObjects.xml b/_alp/Agents/EnergyModel/EmbeddedObjects.xml index a8cd3531..2d00ca3d 100644 --- a/_alp/Agents/EnergyModel/EmbeddedObjects.xml +++ b/_alp/Agents/EnergyModel/EmbeddedObjects.xml @@ -87,6 +87,9 @@ + + + true diff --git a/_alp/Agents/GridNode/AOC.GridNode.xml b/_alp/Agents/GridNode/AOC.GridNode.xml index 2372ef2d..07712a60 100644 --- a/_alp/Agents/GridNode/AOC.GridNode.xml +++ b/_alp/Agents/GridNode/AOC.GridNode.xml @@ -112,7 +112,7 @@ if (p_energyType.equals(OL_EnergyCarriers.HEAT)) { 1705919330576 - 40 + 50 850