From b1166242fa5e4e73e1d83d939e4c537606af4136 Mon Sep 17 00:00:00 2001 From: Ate Hempenius Date: Thu, 7 May 2026 09:45:36 +0200 Subject: [PATCH 1/5] bugfixes --- .../Agents/Zero_Interface/Code/Functions.java | 30 ++++++------- _alp/Agents/Zero_Interface/Code/Functions.xml | 2 +- .../Zero_Interface/Levels/Level.level.xml | 44 +++++++++---------- _alp/Agents/Zero_Loader/Code/Functions.java | 7 ++- _alp/Agents/tabElectricity/Code/Functions.xml | 4 +- .../tabElectricity/Levels/Level.level.xml | 4 +- _alp/Classes/Class.Electrolyser_data.java | 1 + 7 files changed, 49 insertions(+), 43 deletions(-) diff --git a/_alp/Agents/Zero_Interface/Code/Functions.java b/_alp/Agents/Zero_Interface/Code/Functions.java index 01cd4d9..e576d54 100644 --- a/_alp/Agents/Zero_Interface/Code/Functions.java +++ b/_alp/Agents/Zero_Interface/Code/Functions.java @@ -287,12 +287,7 @@ // Set info text -if ( GN.p_realCapacityAvailable ) { - v_clickedObjectText = GN.p_nodeType + "-station, " + Integer.toString( ((int)GN.p_capacity_kW) ) + " kW, ID: " + GN.p_gridNodeID + ", aansluitingen: " + GN.f_getConnectedGridConnections().size() + ", Type station: " + GN.p_description; -} -else { - v_clickedObjectText = GN.p_nodeType + "-station, " + Integer.toString( ((int)GN.p_capacity_kW) ) + " kW (ingeschat), ID: " + GN.p_gridNodeID + ", aansluitingen: " + GN.f_getConnectedGridConnections().size() + ", Type station: " + GN.p_description; -} +f_setSelectedGNText(); // Color the GridNode GN.gisRegion.setFillColor( v_selectionColor ); @@ -380,9 +375,6 @@ else if(b.p_annotation != null){ //Set the button for going to the company UI (needs to be at the end of this function!) f_setUIButton(); -//alle panden met meerdere adressen hebben op dit moment (16-7-24) dezelfde functie(s) voor ieder adres, dus dit is op dit moment zinloos -//f_listFunctions(); - /*ALCODEEND*/} double f_deselectPreviousSelect() @@ -2018,14 +2010,22 @@ Pair f_getPresentationPositionIteration( } /*ALCODEEND*/} -double f_setTrafoText() +double f_setSelectedGNText() {/*ALCODESTART::1750261221085*/ -if ( v_clickedGridNode.p_realCapacityAvailable ) { - v_clickedObjectText = v_clickedGridNode.p_nodeType + "-station, " + Integer.toString( ((int)v_clickedGridNode.p_capacity_kW) ) + " kW, ID: " + v_clickedGridNode.p_gridNodeID + ", aansluitingen: " + v_clickedGridNode.f_getConnectedGridConnections().size() + ", Type station: " + v_clickedGridNode.p_description; -} -else { - v_clickedObjectText = v_clickedGridNode.p_nodeType + "-station, " + Integer.toString( ((int)v_clickedGridNode.p_capacity_kW) ) + " kW (ingeschat), ID: " + v_clickedGridNode.p_gridNodeID + ", aansluitingen: " + v_clickedGridNode.f_getConnectedGridConnections().size() + ", Type station: " + v_clickedGridNode.p_description; +String GNCapacityUnitString = " kW"; +if ( !v_clickedGridNode.p_realCapacityAvailable ) { + GNCapacityUnitString += " (ingeschat)"; } + +//Get total connected gcs +int totalConnectedGCs = findAll(v_clickedGridNode.f_getAllLowerLVLConnectedGridConnections(), gc -> gc.f_isActive()).size(); + +v_clickedObjectText = v_clickedGridNode.p_nodeType + "-station, " + + roundToInt(v_clickedGridNode.p_capacity_kW) + GNCapacityUnitString + + ", ID: " + v_clickedGridNode.p_gridNodeID + + ", aansluitingen: " + totalConnectedGCs + + ", Type station: " + v_clickedGridNode.p_description; + /*ALCODEEND*/} double f_setSpecialGISObjectLegendItem(OL_GISObjectType activeSpecialGISObjectType,ShapeText legendText,ShapeRectangle legendRect) diff --git a/_alp/Agents/Zero_Interface/Code/Functions.xml b/_alp/Agents/Zero_Interface/Code/Functions.xml index 35e242b..6194302 100644 --- a/_alp/Agents/Zero_Interface/Code/Functions.xml +++ b/_alp/Agents/Zero_Interface/Code/Functions.xml @@ -1418,7 +1418,7 @@ VOID double 1750261221085 - + 60 1520